EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Development::Bug Reports (https://www.eqemulator.org/forums/forumdisplay.php?f=591)
-   -   I hope your corpse rots! ;) (https://www.eqemulator.org/forums/showthread.php?t=23851)

gernblan 11-02-2007 01:26 PM

I hope your corpse rots! ;)
 
Maybe I am crazy but are player corpse rot timers broken when set to leave corpse?

I mean they just don't rot.

We have 505 players corpses server wide right now and counting, all the way back to the 26th of October (the last time I cleaned out the table).

KLS 11-02-2007 05:23 PM

The timer resets when the zone shuts down.

John Adams 11-03-2007 05:56 AM

Gernblan, do you make your players retreive their corpses after death, or leave naked corpses? I know you can turn off corpses altogether, but that might not be what you need for your server rules.

gernblan 11-03-2007 07:46 AM

Quote:

Originally Posted by KLS (Post 140134)
The timer resets when the zone shuts down.

Ok that makes sense.

Thanks!

gernblan 11-03-2007 07:47 AM

Quote:

Originally Posted by John Adams (Post 140149)
Gernblan, do you make your players retreive their corpses after death, or leave naked corpses? I know you can turn off corpses altogether, but that might not be what you need for your server rules.

My server has no death penalty.. we try to leave corpses so that in a raid they can res people back that die... but beyond that corpses have no other use to us.

John Adams 11-03-2007 07:50 AM

In that case, could you just put your "rot timer" to something horribly low, since if a raid wipes and does not rez and get back to business within, say, 30 mins, the corpses poof? I understand it's just a maintenance issue for you. When I took the Abyss DB, I was shocked how many dead bodies were lying around, too. :)

gernblan 11-03-2007 02:35 PM

Yeah it may come down to that, thanks for the great suggestions!

cavedude 11-04-2007 02:05 AM

I think another thing that would help this issue is if the server can be changed so that empty corpses poof once they have been rezzed. I know on GC players rezz, but since corpses don't drop items (yet, haha!) they don't ever loot so the corpses stay until they finally rot.

LostZaphod 11-26-2007 10:17 AM

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.....


All times are GMT -4. The time now is 11:21 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.