diff --git a/src/game/Anticheat/MovementAnticheat/MovementAnticheat.cpp b/src/game/Anticheat/MovementAnticheat/MovementAnticheat.cpp index b4f1ff40760..d93d74ec0d9 100644 --- a/src/game/Anticheat/MovementAnticheat/MovementAnticheat.cpp +++ b/src/game/Anticheat/MovementAnticheat/MovementAnticheat.cpp @@ -686,7 +686,7 @@ uint32 MovementAnticheat::HandlePositionTests(Player* pPlayer, MovementInfo& mov if (IsFlagAckOpcode(opcode)) { me->m_movementInfo.moveFlags = movementInfo.moveFlags; - me->m_movementInfo.CorrectData(me); + me->m_movementInfo.CorrectData(); } if (HAS_CHEAT(CHEAT_TYPE_OVERSPEED_JUMP) && diff --git a/src/game/Handlers/MovementHandler.cpp b/src/game/Handlers/MovementHandler.cpp index f5a4ac5efa4..4065ffeab7a 100644 --- a/src/game/Handlers/MovementHandler.cpp +++ b/src/game/Handlers/MovementHandler.cpp @@ -520,7 +520,7 @@ void WorldSession::HandleForceSpeedChangeAckOpcodes(WorldPacket& recvData) { // Can only change flags and speed for not current active mover. pMover->m_movementInfo.moveFlags = movementInfo.moveFlags; - pMover->m_movementInfo.CorrectData(pMover); + pMover->m_movementInfo.CorrectData(); } } @@ -629,7 +629,7 @@ void WorldSession::HandleMovementFlagChangeToggleAck(WorldPacket& recvData) { // Can only change flags and speed for not current active mover. pMover->m_movementInfo.moveFlags = movementInfo.moveFlags; - pMover->m_movementInfo.CorrectData(pMover); + pMover->m_movementInfo.CorrectData(); } } while (false); @@ -730,7 +730,7 @@ void WorldSession::HandleMoveRootAck(WorldPacket& recvData) { // Can only change flags and speed for not current active mover. pMover->m_movementInfo.moveFlags = movementInfo.moveFlags; - pMover->m_movementInfo.CorrectData(pMover); + pMover->m_movementInfo.CorrectData(); } } while (false); @@ -1098,7 +1098,7 @@ void WorldSession::HandleMoverRelocation(Unit* pMover, MovementInfo& movementInf Player* const pPlayerMover = pMover->ToPlayer(); movementInfo.sourceSessionGuid = GetGUID(); - movementInfo.CorrectData(pMover); + movementInfo.CorrectData(); // Prevent client from removing root flag. if (pMover->HasUnitMovementFlag(MOVEFLAG_ROOT) && !movementInfo.HasMovementFlag(MOVEFLAG_ROOT)) diff --git a/src/game/Objects/MovementInfo.h b/src/game/Objects/MovementInfo.h index 90b15bd9c1c..38b98702427 100644 --- a/src/game/Objects/MovementInfo.h +++ b/src/game/Objects/MovementInfo.h @@ -22,10 +22,8 @@ #include "ObjectGuid.h" #include "Timer.h" -class Unit; - // [-ZERO] Need check and update -// used in most movement packets (send and received) +// used in most movement packets (sent and received) enum MovementFlags { MOVEFLAG_NONE = 0x00000000, // 0 @@ -168,7 +166,7 @@ class MovementInfo // Read/Write methods void Read(ByteBuffer &data); void Write(ByteBuffer &data) const; - void CorrectData(Unit* mover = nullptr); + void CorrectData(); // Movement flags manipulations void AddMovementFlag(int f) { moveFlags |= f; } @@ -261,5 +259,4 @@ inline ByteBuffer& operator>> (ByteBuffer& buf, MovementInfo& mi) return buf; } - #endif diff --git a/src/game/Objects/Object.cpp b/src/game/Objects/Object.cpp index 79eb89bc95a..a5d053b9fac 100644 --- a/src/game/Objects/Object.cpp +++ b/src/game/Objects/Object.cpp @@ -103,7 +103,7 @@ void MovementInfo::Read(ByteBuffer &data) } } -void MovementInfo::CorrectData(Unit* mover) +void MovementInfo::CorrectData() { // Nostalrius: remove incompatible flags, causing client freezes for example #define REMOVE_VIOLATING_FLAGS(check, maskToRemove) \