From 3a601f80bf332647041136e9c0bc73de1851d286 Mon Sep 17 00:00:00 2001 From: MDIC Date: Mon, 6 Jun 2022 07:31:01 -0400 Subject: [PATCH] fix (logging) Missing WriteLog conf for jump hack added in Missing WriteLog conf for jump hack to be consistent with other detection logging in the anticheat module --- src/AnticheatMgr.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 41e704a..ccd419a 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -61,10 +61,13 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo /* movementInf if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP && opcode == MSG_MOVE_JUMP) { - uint32 latency = 0; - latency = player->GetSession()->GetLatency(); + if (sConfigMgr->GetOption("Anticheat.WriteLog", true)) + { + uint32 latency = 0; + latency = player->GetSession()->GetLatency(); + LOG_INFO("anticheat.module", "AnticheatMgr:: Jump-Hack detected player {} ({}) - Latency: {} ms", player->GetName(), player->GetGUID().ToString(), latency); + } BuildReport(player, JUMP_HACK_REPORT); - LOG_INFO("anticheat.module", "AnticheatMgr:: Jump-Hack detected player {} ({}) - Latency: {} ms", player->GetName(), player->GetGUID().ToString(), latency); } }