diff --git a/src/AnticheatMgr.cpp b/src/AnticheatMgr.cpp index 5edfe7d..dd04f82 100644 --- a/src/AnticheatMgr.cpp +++ b/src/AnticheatMgr.cpp @@ -871,7 +871,37 @@ void AnticheatMgr::BGStartExploit(Player* player, MovementInfo movementInfo, uin { // Only way to get this high is with engineering items malfunction. if (!(movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING_FAR) || m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP) && movementInfo.pos.GetPositionZ() > 380.0f) - return; + { + _alertFrequency = sConfigMgr->GetOption("Anticheat.AlertFrequency", 5); + // So we dont divide by 0 by accident + if (_alertFrequency < 1) + _alertFrequency = 1; + if (++_counter % _alertFrequency == 0) + { + // display warning at the center of the screen, hacky way? + std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Player Outside of Starting SPOT before BG AV has started!"; + WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1)); + data << str; + sWorld->SendGlobalGMMessage(&data); + uint32 latency = 0; + latency = player->GetSession()->GetLatency(); + // need better way to limit chat spam + if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption("Anticheat.ReportinChat.Max", 80)) + { + sWorld->SendGMText(LANG_ANTICHEAT_BG_EXPLOIT, player->GetName().c_str(), player->GetName().c_str(), latency); + } + _counter = 0; + } + + if (sConfigMgr->GetOption("Anticheat.WriteLog", true)) + { + uint32 latency = 0; + latency = player->GetSession()->GetLatency(); + LOG_INFO("anticheat.module", "AnticheatMgr:: BG AV Start Bound Exploit-Hack detected player {} ({}) - Latency: {} ms", player->GetName(), player->GetGUID().ToString(), latency); + } + BuildReport(player, TELEPORT_HACK_REPORT); + } + if (Battleground* bg = player->GetBattleground()) {