diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 5702a67..8279b0a 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -45,6 +45,7 @@ enum Spells AnticheatMgr::AnticheatMgr() { + uint32 _alertFrequency = 0; } AnticheatMgr::~AnticheatMgr() @@ -169,6 +170,13 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem if (!sConfigMgr->GetOption("Anticheat.DetectTelePlaneHack", true)) return; + //Celestial Planetarium Observer Battle has a narrow path that false flags + if (player && GetWMOAreaTableEntryByTripple(5202, 0, 24083)) + return; + + if (player->HasAuraType(SPELL_AURA_WATER_WALK) || player->HasAuraType(SPELL_AURA_WATER_BREATHING) || player->HasAuraType(SPELL_AURA_GHOST)) + return; + ObjectGuid key = player->GetGUID(); uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos); @@ -178,13 +186,6 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem if (!distance2D) return; - //Celestial Planetarium Observer Battle has a narrow path that false flags - if (player && GetWMOAreaTableEntryByTripple(5202, 0, 24083)) - return; - - if (player->HasAuraType(SPELL_AURA_WATER_WALK) || player->HasAuraType(SPELL_AURA_WATER_BREATHING) || player->HasAuraType(SPELL_AURA_GHOST)) - return; - if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP) return; @@ -287,8 +288,6 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo) if (!sConfigMgr->GetOption("Anticheat.DetectZaxisHack", true)) return; - ObjectGuid key = player->GetGUID(); - // If he is flying we dont need to check if (movementInfo.HasMovementFlag(MOVEMENTFLAG_CAN_FLY | MOVEMENTFLAG_FLYING)) return; @@ -307,6 +306,8 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo) if (player->GetLiquidData().Status == LIQUID_MAP_ABOVE_WATER) return; + ObjectGuid key = player->GetGUID(); + uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos); // We don't need to check for a ignore z if the player hasn't moved