From f98708fae4327bfcd7cf407842d0b5e6ff8e7ac0 Mon Sep 17 00:00:00 2001 From: MDIC Date: Sun, 13 Feb 2022 12:32:38 -0500 Subject: [PATCH] move the if statement down one that way it will still log in the table if it is less then auto reported. --- src/AnticheatMgr.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 750918b..6af06d1 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -201,14 +201,17 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn float xDiff = fabs(lastX - newX); float yDiff = fabs(lastY - newY); - if ((xDiff >= 50.0f || yDiff >= 50.0f) && !player->CanTeleport() && m_Players[key].GetTotalReports() > sConfigMgr->GetOption("Anticheat.ReportsForIngameWarnings", 70)) + if ((xDiff >= 50.0f || yDiff >= 50.0f) && !player->CanTeleport()) { - // display warning at the center of the screen, hacky way? - std::string str = ""; - str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible Teleport Hack Detected!"; - WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1)); - data << str; - sWorld->SendGlobalGMMessage(&data); + if (m_Players[key].GetTotalReports() > sConfigMgr->GetOption("Anticheat.ReportsForIngameWarnings", 70)) + { + // display warning at the center of the screen, hacky way? + std::string str = ""; + str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible Teleport Hack Detected!"; + WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1)); + data << str; + sWorld->SendGlobalGMMessage(&data); + } LOG_INFO("module", "AnticheatMgr:: Teleport-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString()); BuildReport(player, TELEPORT_HACK_REPORT); }