feat(Core/Anticheat): Preparation to implement new passive anticheat … (#5516)

This commit is contained in:
UltraNix
2021-05-07 18:10:44 +02:00
committed by GitHub
parent 0e8e21b812
commit 2189ac0b08
13 changed files with 406 additions and 64 deletions

View File

@@ -1623,8 +1623,7 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
ObjectGuid guid;
recv_data >> guid.ReadAsPacked();
// pussywizard: typical check for incomming movement packets
if (!_player->m_mover || !_player->m_mover->IsInWorld() || _player->m_mover->IsDuringRemoveFromWorld() || guid != _player->m_mover->GetGUID())
if (!_player)
{
recv_data.rfinish(); // prevent warnings spam
return;
@@ -1638,6 +1637,8 @@ void WorldSession::HandleMoveSetCanFlyAckOpcode(WorldPacket& recv_data)
recv_data.read_skip<float>(); // unk2
sScriptMgr->AnticheatSetCanFlybyServer(_player, movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY));
_player->m_mover->m_movementInfo.flags = movementInfo.GetMovementFlags();
}