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

@@ -50,7 +50,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
// possible errors in the coordinate validity check
if (!MapManager::IsValidMapCoord(loc))
{
KickPlayer();
KickPlayer("!MapManager::IsValidMapCoord(loc)");
return;
}
@@ -119,7 +119,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
Cell cell(pair);
if (!GridCoord(cell.GridX(), cell.GridY()).IsCoordValid())
{
KickPlayer();
KickPlayer("!GridCoord(cell.GridX(), cell.GridY()).IsCoordValid()");
return;
}
newMap->LoadGrid(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
@@ -167,7 +167,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
Cell cell2(pair2);
if (!GridCoord(cell2.GridX(), cell2.GridY()).IsCoordValid())
{
KickPlayer();
KickPlayer("!GridCoord(cell2.GridX(), cell2.GridY()).IsCoordValid()");
return;
}
newMap->LoadGrid(GetPlayer()->GetPositionX(), GetPlayer()->GetPositionY());
@@ -577,7 +577,7 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recvData)
{
sLog->outBasic("Player %s from account id %u kicked for incorrect speed (must be %f instead %f)",
_player->GetName().c_str(), GetAccountId(), _player->GetSpeed(move_type), newspeed);
KickPlayer();
KickPlayer("Incorrect speed");
}
}
}