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

Development::Bug Reports Post detailed bug reports and what you would like to see next in the emu here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 11-26-2007, 10:17 AM
LostZaphod
Sarnak
 
Join Date: May 2006
Posts: 43
Default Remove Rotten Corpses

I think the function "LoadPlayerCorpses" is run when a zone is loaded up. If we put a function to check if the corpses have rotted,
it should resolve the issue. Keep in mind this is depends on real time and not game time...
If the server is off for 2 days, it does not move the rot time.....

In PlayerCorpse.cpp find
Code:
bool ZoneDatabase::LoadPlayerCorpses(int32 iZoneID) {
Under the line
Code:
unsigned long* lengths;
#####WARNING UNTESTED CODE#####
Warning, I took a look at this, but have not actually run the code. BACKUP the table, player_corpses BEFORE USING.....
Add this
Code:
	if(!RuleB(Zone, EnableShadowrest))
	{
		RunQuery(query, MakeAnyLenString(&query, "update player_corpses set IsBurried=1 where zoneid= %u and (UNIX_TIMESTAMP(timeofdeath) + %u) < UNIX_TIMESTAMP(NOW())  ", iZoneID, RuleI(Character, CorpseDecayTimeMS)), errbuf);
	}
	else
	{
		RunQuery(query, MakeAnyLenString(&query, "delete from player_corpses where zoneid= %u and (UNIX_TIMESTAMP(timeofdeath) + %u) < UNIX_TIMESTAMP(NOW())  ", iZoneID, RuleI(Character, CorpseDecayTimeMS)), errbuf);
	}
	safe_delete_array(query);
####WARNING UNTESTED CODE#####
Warning, I took a look at this, but have not actually run the code. BACKUP the table, player_corpses BEFORE USING.....
Reply With Quote
 


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 02:23 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3