[11210] Set moveflags from CMSG_MOVE_SET_CAN_FLY_ACK to proper mover.

Also check cheating case.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
Vinolentus 2011-02-28 01:53:29 +03:00 committed by VladimirMangos
parent 65b631a8e4
commit fe0f42d30c
2 changed files with 10 additions and 3 deletions

View file

@ -1479,7 +1479,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
DEBUG_LOG("WORLD: CMSG_MOVE_SET_CAN_FLY_ACK");
//recv_data.hexlike();
ObjectGuid guid; // guid - unused
ObjectGuid guid;
MovementInfo movementInfo;
recv_data >> guid.ReadAsPacked();
@ -1487,7 +1487,14 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode( WorldPacket & recv_data )
recv_data >> movementInfo;
recv_data >> Unused<float>(); // unk2
_player->m_movementInfo.SetMovementFlags(movementInfo.GetMovementFlags());
if (_player->GetMover()->GetObjectGuid() != guid)
{
DEBUG_LOG("WorldSession::HandleMoveSetCanFlyAckOpcode: player %s, mover %s, received %s, ignored",
_player->GetGuidStr().c_str(), _player->GetMover()->GetGuidStr().c_str(), guid.GetString().c_str());
return;
}
_player->GetMover()->m_movementInfo.SetMovementFlags(movementInfo.GetMovementFlags());
}
void WorldSession::HandleRequestPetInfoOpcode( WorldPacket & /*recv_data */)