@@ -16657,6 +16657,7 @@ bool Player::LoadFromDB(uint32 guid, SQLQueryHolder *holder)
|
||||
_LoadInstanceTimeRestrictions(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADINSTANCELOCKTIMES));
|
||||
_LoadBGData(holder->GetPreparedResult(PLAYER_LOGIN_QUERY_LOADBGDATA));
|
||||
|
||||
GetSession()->SetPlayer(this);
|
||||
MapEntry const* mapEntry = sMapStore.LookupEntry(mapId);
|
||||
if (!mapEntry || !IsPositionValid())
|
||||
{
|
||||
|
||||
@@ -776,6 +776,7 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||
// "GetAccountId() == db stored account id" checked in LoadFromDB (prevent login not own character using cheating tools)
|
||||
if (!pCurrChar->LoadFromDB(GUID_LOPART(playerGuid), holder))
|
||||
{
|
||||
SetPlayer(NULL);
|
||||
KickPlayer(); // disconnect client, player no set to session and it will not deleted or saved at kick
|
||||
delete pCurrChar; // delete it manually
|
||||
delete holder; // delete all unprocessed queries
|
||||
@@ -784,9 +785,6 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder* holder)
|
||||
}
|
||||
|
||||
pCurrChar->GetMotionMaster()->Initialize();
|
||||
|
||||
SetPlayer(pCurrChar);
|
||||
|
||||
pCurrChar->SendDungeonDifficulty(false);
|
||||
|
||||
WorldPacket data(SMSG_LOGIN_VERIFY_WORLD, 20);
|
||||
|
||||
Reference in New Issue
Block a user