Merge remote branch 'origin/master' into 330

This commit is contained in:
tomrus88 2009-11-19 16:22:58 +03:00
commit 72b9dc318e
69 changed files with 683 additions and 213 deletions

View file

@ -42,6 +42,7 @@
#include "CellImpl.h"
#include "ObjectMgr.h"
#include "ObjectAccessor.h"
#include "ObjectDefines.h"
#include "CreatureAI.h"
#include "Formulas.h"
#include "Group.h"
@ -4318,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
@ -14471,6 +14473,8 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// clear charm/summon related fields
SetCharm(NULL);
SetPet(NULL);
SetTargetGUID(0);
SetChannelObjectGUID(0);
SetCharmerGUID(0);
SetOwnerGUID(0);
SetCreatorGUID(0);
@ -15619,6 +15623,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);