mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
* https://github.com/azerothcore/azerothcore-wotlk/pull/19490 * Update AnticheatMgr.cpp
This commit is contained in:
@@ -320,15 +320,15 @@ void AnticheatMgr::BuildAndSendReportToIngameGameMasters(Player* player, ReportT
|
|||||||
float xDiff = lastPosition.GetPositionX() - position.GetPositionX();
|
float xDiff = lastPosition.GetPositionX() - position.GetPositionX();
|
||||||
float yDiff = lastPosition.GetPositionY() - position.GetPositionY();
|
float yDiff = lastPosition.GetPositionY() - position.GetPositionY();
|
||||||
float zDiff = lastPosition.GetPositionZ() - position.GetPositionZ();
|
float zDiff = lastPosition.GetPositionZ() - position.GetPositionZ();
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_TELEPORT, playerName, playerName, latency, xDiff, yDiff, zDiff);
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_TELEPORT, playerName, playerName, latency, xDiff, yDiff, zDiff);
|
||||||
}
|
}
|
||||||
else if (reportType == IGNORE_CONTROL_REPORT)
|
else if (reportType == IGNORE_CONTROL_REPORT)
|
||||||
{
|
{
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_IGNORECONTROL, playerName, latency);
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_IGNORECONTROL, playerName, latency);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_ALERT, playerName, playerName, latency, reportName);
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_ALERT, playerName, playerName, latency, reportName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -469,7 +469,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 TIME MANIPULATION COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 TIME MANIPULATION COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
timeDiff = 1;
|
timeDiff = 1;
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
@@ -489,7 +489,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 TIME MANIPULATION COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 TIME MANIPULATION COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
timeDiff = 1;
|
timeDiff = 1;
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
@@ -554,7 +554,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 SPEED HACK COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 SPEED HACK COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
}
|
}
|
||||||
@@ -614,7 +614,7 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 FLY HACK COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 FLY HACK COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
}
|
}
|
||||||
@@ -663,7 +663,7 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo,
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 JUMP HACK COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 JUMP HACK COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
}
|
}
|
||||||
@@ -724,7 +724,7 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo,
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 ADVANCE JUMP HACK COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 ADVANCE JUMP HACK COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
}
|
}
|
||||||
@@ -916,7 +916,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
|
|||||||
std::string goXYZ = ".go xyz " + std::to_string(player->GetPositionX()) + " " + std::to_string(player->GetPositionY()) + " " + std::to_string(player->GetPositionZ() + 1.0f) + " " + std::to_string(player->GetMap()->GetId()) + " " + std::to_string(player->GetOrientation());
|
std::string goXYZ = ".go xyz " + std::to_string(player->GetPositionX()) + " " + std::to_string(player->GetPositionY()) + " " + std::to_string(player->GetPositionZ() + 1.0f) + " " + std::to_string(player->GetMap()->GetId()) + " " + std::to_string(player->GetOrientation());
|
||||||
std::string goXYZ2 = ".go xyz " + std::to_string(opponent->GetPositionX()) + " " + std::to_string(opponent->GetPositionY()) + " " + std::to_string(opponent->GetPositionZ() + 1.0f) + " " + std::to_string(opponent->GetMap()->GetId()) + " " + std::to_string(opponent->GetOrientation());
|
std::string goXYZ2 = ".go xyz " + std::to_string(opponent->GetPositionX()) + " " + std::to_string(opponent->GetPositionY()) + " " + std::to_string(opponent->GetPositionZ() + 1.0f) + " " + std::to_string(opponent->GetMap()->GetId()) + " " + std::to_string(opponent->GetOrientation());
|
||||||
uint32 latency2 = opponent->GetSession()->GetLatency();
|
uint32 latency2 = opponent->GetSession()->GetLatency();
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_DUEL, player->GetName().c_str(), latency, opponent->GetName().c_str(), latency2);
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_DUEL, player->GetName().c_str(), latency, opponent->GetName().c_str(), latency2);
|
||||||
|
|
||||||
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
||||||
{
|
{
|
||||||
@@ -952,7 +952,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 TELEPORT COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 TELEPORT COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
player->TeleportTo(player->GetMapId(), lastX, lastY, lastZ, player->GetOrientation());
|
player->TeleportTo(player->GetMapId(), lastX, lastY, lastZ, player->GetOrientation());
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
@@ -1156,7 +1156,7 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo)
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 IGNORE-Z HACK COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 IGNORE-Z HACK COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
}
|
}
|
||||||
@@ -1288,7 +1288,7 @@ void AnticheatMgr::BGreport(Player* player, MovementInfo movementInfo)
|
|||||||
if (counter >= GetMinimumReportInChatThresholdConfigFromReportType(TELEPORT_HACK_REPORT) && counter <= GetMaximumReportInChatThresholdConfigFromReportType(TELEPORT_HACK_REPORT))
|
if (counter >= GetMinimumReportInChatThresholdConfigFromReportType(TELEPORT_HACK_REPORT) && counter <= GetMaximumReportInChatThresholdConfigFromReportType(TELEPORT_HACK_REPORT))
|
||||||
{
|
{
|
||||||
uint32 latency = player->GetSession()->GetLatency();
|
uint32 latency = player->GetSession()->GetLatency();
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_BG_EXPLOIT, player->GetName().c_str(), player->GetName().c_str(), latency);
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_BG_EXPLOIT, player->GetName().c_str(), player->GetName().c_str(), latency);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1328,7 +1328,7 @@ void AnticheatMgr::CheckStartPositions(Player* player, MovementInfo movementInfo
|
|||||||
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTCHAT", true))
|
||||||
{
|
{
|
||||||
const char* str = "|cFFFFFC00 BG START SPOT COUNTER MEASURE ALERT";
|
const char* str = "|cFFFFFC00 BG START SPOT COUNTER MEASURE ALERT";
|
||||||
sWorld->SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
ChatHandler(nullptr).SendGMText(LANG_ANTICHEAT_COUNTERMEASURE, str, player->GetName().c_str(), player->GetName().c_str());
|
||||||
}
|
}
|
||||||
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
BuildReport(player, COUNTER_MEASURES_REPORT, movementInfo);
|
||||||
player->TeleportTo(player->GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), startPos->GetPositionZ(), startPos->GetOrientation());
|
player->TeleportTo(player->GetMapId(), startPos->GetPositionX(), startPos->GetPositionY(), startPos->GetPositionZ(), startPos->GetOrientation());
|
||||||
|
|||||||
Reference in New Issue
Block a user