Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #16  
Old 09-06-2008, 07:12 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #17  
Old 09-07-2008, 06:52 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #18  
Old 09-07-2008, 08:20 PM
Flare83
Sarnak
 
Join Date: Aug 2008
Location: usa
Posts: 43
Default

it's working for me on 1129 and peq cvs /shrug
__________________
thenameless.site88.net
Reply With Quote
  #19  
Old 09-07-2008, 09:23 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #20  
Old 09-08-2008, 03:41 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

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?
Reply With Quote
  #21  
Old 09-08-2008, 07:22 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

NPC:CorpseUnlockTimer 300000
NPC:EmptyNPCCorpseDecayTimeMS 2000
NPC:MajorNPCCorpseDecayTimeMS 1200000
NPC:MinorNPCCorpseDecayTimeMS 600000

Removing the rule doesn't seem to make any difference.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 01:02 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3