mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
add (conf\cm): Counter Measure Fly Hack
New Counter Measure FlyHACK New conf: Anticheat.CM.FLYHACK
This commit is contained in:
@@ -326,6 +326,29 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
|
||||
LOG_INFO("anticheat.module", "AnticheatMgr:: Fly-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
||||
}
|
||||
|
||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.FLYHACK", true))
|
||||
{ // display warning at the center of the screen, hacky way?
|
||||
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] FLY HACK COUNTER MEASURE ALERT";
|
||||
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
||||
data << str;
|
||||
sWorld->SendGlobalGMMessage(&data);
|
||||
|
||||
Player* cheatertarget = player->GetSession()->GetPlayer();
|
||||
|
||||
WorldPacket cheater(12);
|
||||
cheater.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY);
|
||||
|
||||
cheater << cheatertarget->GetPackGUID();
|
||||
cheater << uint32(0);
|
||||
cheatertarget->SendMessageToSet(&cheater, true);
|
||||
}
|
||||
|
||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||
{
|
||||
std::string str = "|cFFFFFC00 FLY HACK COUNTER MEASURE ALERT";
|
||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str.c_str(), player->GetName().c_str(), player->GetName().c_str());
|
||||
}
|
||||
|
||||
BuildReport(player, FLY_HACK_REPORT);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user