* Corpse related cleanup (author: Hunuza)

* Avoid saving of the corpse in arenas (author: VladimirMangos)

--HG--
branch : trunk
This commit is contained in:
azazel
2010-08-06 00:15:29 +06:00
parent 4773aad26b
commit f9a51dc214
16 changed files with 34 additions and 178 deletions
@@ -343,6 +343,22 @@ Corpse* ObjectAccessor::ConvertCorpseForPlayer(uint64 player_guid, bool /*insign
*/
}
void ObjectAccessor::RemoveOldCorpses()
{
time_t now = time(NULL);
Player2CorpsesMapType::iterator next;
for (Player2CorpsesMapType::iterator itr = i_player2corpse.begin(); itr != i_player2corpse.end(); itr = next)
{
next = itr;
++next;
if (!itr->second->IsExpired(now))
continue;
ConvertCorpseForPlayer(itr->first);
}
}
void ObjectAccessor::Update(uint32 /*diff*/)
{
UpdateDataMapType update_players;