feat(core): allow to debug KickPlayer() (#1549)

This commit is contained in:
Francesco Borzì
2019-03-05 22:58:40 +01:00
committed by GitHub
parent e7ace60e59
commit 0758677578
19 changed files with 44 additions and 39 deletions

View File

@@ -758,7 +758,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recvData)
if (PlayerLoading() || GetPlayer() != NULL)
{
sLog->outError("Player tries to login again, AccountId = %d", GetAccountId());
KickPlayer();
KickPlayer("Player tries to login again");
return;
}
@@ -768,7 +768,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recvData)
if (!IsLegitCharacterForAccount(GUID_LOPART(playerGuid)))
{
sLog->outError("Account (%u) can't login with that character (%u).", GetAccountId(), GUID_LOPART(playerGuid));
KickPlayer();
KickPlayer("Account can't login with this character");
return;
}
@@ -794,7 +794,7 @@ void WorldSession::HandlePlayerLoginOpcode(WorldPacket & recvData)
}
if (p->GetGUID() != playerGuid)
sess->KickPlayer(); // no return, go to normal loading
sess->KickPlayer("No return, go to normal loading"); // no return, go to normal loading
else
{
// pussywizard: players stay ingame no matter what (prevent abuse), but allow to turn it off to stop crashing
@@ -883,7 +883,7 @@ void WorldSession::HandlePlayerLoginFromDB(LoginQueryHolder* holder)
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
KickPlayer("HandlePlayerLoginFromDB"); // 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
m_playerLoading = false;
@@ -1744,7 +1744,7 @@ void WorldSession::HandleCharCustomize(WorldPacket& recvData)
sLog->outError("Account %u, IP: %s tried to customise character %u, but it does not belong to their account!",
GetAccountId(), GetRemoteAddress().c_str(), GUID_LOPART(guid));
recvData.rfinish();
KickPlayer();
KickPlayer("HandleCharCustomize");
return;
}
@@ -2043,7 +2043,7 @@ void WorldSession::HandleCharFactionOrRaceChange(WorldPacket& recvData)
sLog->outError("Account %u, IP: %s tried to factionchange character %u, but it does not belong to their account!",
GetAccountId(), GetRemoteAddress().c_str(), GUID_LOPART(guid));
recvData.rfinish();
KickPlayer();
KickPlayer("HandleCharFactionOrRaceChange");
return;
}