[8829] some more places where we call redundant SaveToDB

i also added now my assert with which i've found them..
maybe someone want's to look at other cases too :)
This commit is contained in:
balrok 2009-11-18 18:53:47 +01:00
parent 37ba6623bb
commit 7a2764e0fe
6 changed files with 13 additions and 8 deletions

View file

@ -4319,7 +4319,8 @@ void Player::CreateCorpse()
void Player::SpawnCorpseBones()
{
if(sObjectAccessor.ConvertCorpseForPlayer(GetGUID()))
SaveToDB(); // prevent loading as ghost without corpse
if (!GetSession()->PlayerLogoutWithSave()) // at logout we will already store the player
SaveToDB(); // prevent loading as ghost without corpse
}
Corpse* Player::GetCorpse() const
@ -15619,6 +15620,7 @@ bool Player::_LoadHomeBind(QueryResult *result)
void Player::SaveToDB()
{
// we should assure this: assert((m_nextSave != sWorld.getConfig(CONFIG_INTERVAL_SAVE)));
// delay auto save at any saves (manual, in code, or autosave)
m_nextSave = sWorld.getConfig(CONFIG_INTERVAL_SAVE);
@ -20766,4 +20768,4 @@ void Player::SendDuelCountdown(uint32 counter)
WorldPacket data(SMSG_DUEL_COUNTDOWN, 4);
data << uint32(counter); // seconds
GetSession()->SendPacket(&data);
}
}