From 36b0b2f87fcf7b70432c790a221f8ecc15388478 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Wed, 3 Aug 2016 01:03:44 +0200 Subject: [PATCH] [AZTH] fixed kick for players with change flags --- src/server/game/Handlers/CharacterHandler.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/server/game/Handlers/CharacterHandler.cpp b/src/server/game/Handlers/CharacterHandler.cpp index 8b0d8209ba..a580bc0107 100644 --- a/src/server/game/Handlers/CharacterHandler.cpp +++ b/src/server/game/Handlers/CharacterHandler.cpp @@ -782,12 +782,6 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recvData) return; } - // [AZTH] hack for instant80 ( we're forcing all change faction and race ) - if (p->HasAtLoginFlag(AT_LOGIN_CHANGE_FACTION) || p->HasAtLoginFlag(AT_LOGIN_CHANGE_RACE)) { - sess->KickPlayer(); - } - // [/AZTH] - if (p->GetGUID() != playerGuid) sess->KickPlayer(); // no return, go to normal loading else @@ -885,6 +879,15 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder* holder) return; } + // [AZTH] hack for instant80 ( we're forcing all change faction and race ) + if (pCurrChar->HasAtLoginFlag(AT_LOGIN_CHANGE_FACTION) || pCurrChar->HasAtLoginFlag(AT_LOGIN_CHANGE_RACE)) { + // following instruction allow core to destroy the Player instance + LogoutRequest(0); + KickPlayer(); // disconnect client, player no set to session and it will not deleted or saved at kick + return; + } + // [/AZTH] + pCurrChar->GetMotionMaster()->Initialize(); pCurrChar->SendDungeonDifficulty(false);