From 42d0b39847d2207cab2f0ac997bc1069617c2081 Mon Sep 17 00:00:00 2001 From: M'Dic Date: Fri, 5 Jan 2024 16:29:26 -0500 Subject: [PATCH] update (anticheat): False hits and reorder --- src/server/game/Anticheat/AnticheatMgr.cpp | 35 +++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/src/server/game/Anticheat/AnticheatMgr.cpp b/src/server/game/Anticheat/AnticheatMgr.cpp index ca6ae6203cb..8b803d0d817 100644 --- a/src/server/game/Anticheat/AnticheatMgr.cpp +++ b/src/server/game/Anticheat/AnticheatMgr.cpp @@ -537,6 +537,19 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo, if (!distance2D) return; + // The anticheat is disabled on transports, so we need to be sure that the player is indeed on a transport. + GameObject* transportGobj = player->GetMap()->GetGameObject(movementInfo.transport.guid); + if (transportGobj && transportGobj->IsTransport()) + { + return; + } + + // The anticheat check is disabled on Elevators, so we need to be sure that the player is indeed on a transport. + if (player->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT)) + { + return; + } + if (!player->HasUnitMovementFlag(MOVEMENTFLAG_DISABLE_GRAVITY) && movementInfo.jump.zspeed < -10.0f) return; @@ -982,17 +995,31 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo) if (player->GetLiquidStatus() == LIQUID_MAP_ABOVE_WATER) return; + // The anticheat is disabled on transports, so we need to be sure that the player is indeed on a transport. + GameObject* transportGobj = player->GetMap()->GetGameObject(movementInfo.transport.guid); + if (transportGobj && transportGobj->IsTransport()) + { + return; + } + + // The anticheat check is disabled on Elevators, so we need to be sure that the player is indeed on a transport. + if (player->HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT)) + { + return; + } + // We exempt select areas found in 335 to prevent false hack hits if (player->GetAreaId()) { switch (player->GetAreaId()) { - case 4273: //Celestial Planetarium Observer Battle has a narrow path that false flags - case 495: //Ring of Judgement just being in the area false flags - case 4161: //Wymrest Temple just being in the area false flags case 10: // Duskwood bridge case 40: // Westfall bridge case 321: // Hammerfall wooden balcony + case 369: // Thunder Ridge being on the over hang cliff + case 495: //Ring of Judgement just being in the area false flags + case 4273: //Celestial Planetarium Observer Battle has a narrow path that false flags + case 4161: //Wymrest Temple just being in the area false flags return; } } @@ -1047,7 +1074,7 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo) } if (sWorld->getBoolConfig(CONFIG_ANTICHEAT_CM_ALERTSCREEN)) { // display warning at the center of the screen, hacky way? - std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] AIGNORE-Z HACK COUNTER MEASURE ALERT"; + std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] IGNORE-Z HACK COUNTER MEASURE ALERT"; WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1)); data << str; sWorld->SendGlobalGMMessage(&data);