|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum) |
09-06-2008, 07:12 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
I don't know why, but I am running 1129 which should have this code in it (and I see it in the source), but even after I set the rule, it doesn't seem to actually work. Corpses still wait 20 minutes to decay.
Maybe the code for the IsEmpty check needs to go after the normal decay timer checks? I know it was working that way when I tried the code that Theeper posted.
|
|
|
|
09-07-2008, 06:52 PM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Unless the new corpse decay timer is working for people and I just have something set incorrectly (let me know if so), then I am going to try moving it the next time I do a build. I am planning to move it from here (noted in RED):
Code:
Corpse::Corpse(NPC* in_npc, ItemList* in_itemlist, int32 in_npctypeid, const NPCType** in_npctypedata, int32 in_decaytime)
// vesuvias - appearence fix
: Mob("Unnamed_Corpse","",0,0,in_npc->GetGender(),in_npc->GetRace(),in_npc->GetClass(),BT_Humanoid//bodytype added
,in_npc->GetDeity(),in_npc->GetLevel(),in_npc->GetNPCTypeID(),in_npc->GetSize(),0,
in_npc->GetHeading(),in_npc->GetX(),in_npc->GetY(),in_npc->GetZ(),0,
in_npc->GetTexture(),in_npc->GetHelmTexture(),
0,0,0,0,0,0,0,0,0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0),
corpse_decay_timer(in_decaytime),
corpse_delay_timer(RuleI(NPC, CorpseUnlockTimer)),
corpse_graveyard_timer(0)
{
corpse_graveyard_timer.Disable();
memset(item_tint, 0, sizeof(item_tint));
pIsChanged = false;
p_PlayerCorpse = false;
pLocked = false;
BeingLootedBy = 0xFFFFFFFF;
if (in_itemlist) {
itemlist = *in_itemlist;
in_itemlist->clear();
}
SetCash(in_npc->GetCopper(), in_npc->GetSilver(), in_npc->GetGold(), in_npc->GetPlatinum());
if(IsEmpty())
{
corpse_decay_timer.SetTimer(RuleI(NPC,EmptyNPCCorpseDecayTimeMS)+1000);
}
npctype_id = in_npctypeid;
SetPKItem(0);
charid = 0;
dbid = 0;
p_depop = false;
strcpy(orgname, in_npc->GetName());
strcpy(name, in_npc->GetName());
// Added By Hogie
for(int count = 0; count < 100; count++) {
if ((level >= npcCorpseDecayTimes[count].minlvl) && (level <= npcCorpseDecayTimes[count].maxlvl)) {
corpse_decay_timer.SetTimer(npcCorpseDecayTimes[count].seconds*1000);
break;
}
}
// Added By Hogie -- End
for (int i=0; i<MAX_LOOTERS; i++)
looters[i] = 0;
this->rezzexp = 0;
}
To here:
Code:
Corpse::Corpse(NPC* in_npc, ItemList* in_itemlist, int32 in_npctypeid, const NPCType** in_npctypedata, int32 in_decaytime)
// vesuvias - appearence fix
: Mob("Unnamed_Corpse","",0,0,in_npc->GetGender(),in_npc->GetRace(),in_npc->GetClass(),BT_Humanoid//bodytype added
,in_npc->GetDeity(),in_npc->GetLevel(),in_npc->GetNPCTypeID(),in_npc->GetSize(),0,
in_npc->GetHeading(),in_npc->GetX(),in_npc->GetY(),in_npc->GetZ(),0,
in_npc->GetTexture(),in_npc->GetHelmTexture(),
0,0,0,0,0,0,0,0,0,
0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0,0,0,0,0,0,0),
corpse_decay_timer(in_decaytime),
corpse_delay_timer(RuleI(NPC, CorpseUnlockTimer)),
corpse_graveyard_timer(0)
{
corpse_graveyard_timer.Disable();
memset(item_tint, 0, sizeof(item_tint));
pIsChanged = false;
p_PlayerCorpse = false;
pLocked = false;
BeingLootedBy = 0xFFFFFFFF;
if (in_itemlist) {
itemlist = *in_itemlist;
in_itemlist->clear();
}
SetCash(in_npc->GetCopper(), in_npc->GetSilver(), in_npc->GetGold(), in_npc->GetPlatinum());
npctype_id = in_npctypeid;
SetPKItem(0);
charid = 0;
dbid = 0;
p_depop = false;
strcpy(orgname, in_npc->GetName());
strcpy(name, in_npc->GetName());
// Added By Hogie
for(int count = 0; count < 100; count++) {
if ((level >= npcCorpseDecayTimes[count].minlvl) && (level <= npcCorpseDecayTimes[count].maxlvl)) {
corpse_decay_timer.SetTimer(npcCorpseDecayTimes[count].seconds*1000);
break;
}
}
// Added By Hogie -- End
if(IsEmpty())
{
corpse_decay_timer.SetTimer(RuleI(NPC,EmptyNPCCorpseDecayTimeMS)+1000);
}
for (int i=0; i<MAX_LOOTERS; i++)
looters[i] = 0;
this->rezzexp = 0;
}
This is my only guess as to why the new decay timer code isn't currently working for me. Especially since it was working perfectly when I added Theeper's code in manually before this was added into the official source. My guess is that the following code that currently comes after the IsEmpty check is still being used even if the corpse is empty and the decay timer is being overwritten to follow these rules instead of using the new IsEmpty rule:
Code:
for(int count = 0; count < 100; count++) {
if ((level >= npcCorpseDecayTimes[count].minlvl) && (level <= npcCorpseDecayTimes[count].maxlvl)) {
corpse_decay_timer.SetTimer(npcCorpseDecayTimes[count].seconds*1000);
break;
}
}
I will try out the move of the IsEmpty check code and see if that resolves the problem.
|
|
|
|
09-07-2008, 08:20 PM
|
Sarnak
|
|
Join Date: Aug 2008
Location: usa
Posts: 43
|
|
it's working for me on 1129 and peq cvs /shrug
|
09-07-2008, 09:23 PM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
Weird, I can't tell why it isn't working for me then... I have the rule set and it appears to be loading the rule:
Code:
[Debug] [RULES__CHANGE] Set rule NPC:EmptyNPCCorpseDecayTimeMS to value 2000
Anyone know why this might not be working for me, please? I guess this should probably be something I post in the support section. But since I had already discussed it here, I will leave it here for now. I will keep checking for why it is happening if no one else can think of why it might be.
|
09-08-2008, 03:41 AM
|
Administrator
|
|
Join Date: Sep 2006
Posts: 1,348
|
|
No money on the corpses right? Does it work if you delete the rule from your DB?
If not what other rules pertaining to corpses are set and what to?
|
09-08-2008, 07:22 AM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
NPC:CorpseUnlockTimer 300000
NPC:EmptyNPCCorpseDecayTimeMS 2000
NPC:MajorNPCCorpseDecayTimeMS 1200000
NPC:MinorNPCCorpseDecayTimeMS 600000
Removing the rule doesn't seem to make any difference.
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 02:35 PM.
|
|
|
|
|
|
|
|
|
|
|
|
|