|
|
|
@@ -39,7 +39,7 @@ constexpr auto LANG_ANTICHEAT_COUNTERMEASURE = 30092;
|
|
|
|
// Time between server sends acknowledgement, and client is actually acknowledged
|
|
|
|
// Time between server sends acknowledgement, and client is actually acknowledged
|
|
|
|
constexpr auto ALLOWED_ACK_LAG = 2000;
|
|
|
|
constexpr auto ALLOWED_ACK_LAG = 2000;
|
|
|
|
|
|
|
|
|
|
|
|
enum Spells
|
|
|
|
enum Spells : uint32
|
|
|
|
{
|
|
|
|
{
|
|
|
|
SHACKLES = 38505,
|
|
|
|
SHACKLES = 38505,
|
|
|
|
LFG_SPELL_DUNGEON_DESERTER = 71041,
|
|
|
|
LFG_SPELL_DUNGEON_DESERTER = 71041,
|
|
|
|
@@ -180,7 +180,6 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos);
|
|
|
|
uint32 distance2D = (uint32)movementInfo.pos.GetExactDist2d(&m_Players[key].GetLastMovementInfo().pos);
|
|
|
|
uint8 moveType = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// We don't need to check for a speedhack if the player hasn't moved
|
|
|
|
// We don't need to check for a speedhack if the player hasn't moved
|
|
|
|
// This is necessary since MovementHandler fires if you rotate the camera in place
|
|
|
|
// This is necessary since MovementHandler fires if you rotate the camera in place
|
|
|
|
@@ -189,6 +188,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
|
|
|
|
|
|
|
|
// we need to know HOW is the player moving
|
|
|
|
// we need to know HOW is the player moving
|
|
|
|
// TO-DO: Should we check the incoming movement flags?
|
|
|
|
// TO-DO: Should we check the incoming movement flags?
|
|
|
|
|
|
|
|
UnitMoveType moveType;
|
|
|
|
if (player->HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING))
|
|
|
|
if (player->HasUnitMovementFlag(MOVEMENTFLAG_SWIMMING))
|
|
|
|
moveType = MOVE_SWIM;
|
|
|
|
moveType = MOVE_SWIM;
|
|
|
|
else if (player->IsFlying())
|
|
|
|
else if (player->IsFlying())
|
|
|
|
@@ -200,7 +200,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
|
|
|
|
|
|
|
|
// how many yards the player can do in one sec.
|
|
|
|
// how many yards the player can do in one sec.
|
|
|
|
// We remove the added speed for jumping because otherwise permanently jumping doubles your allowed speed
|
|
|
|
// We remove the added speed for jumping because otherwise permanently jumping doubles your allowed speed
|
|
|
|
uint32 speedRate = (uint32)(player->GetSpeed(UnitMoveType(moveType)));
|
|
|
|
uint32 speedRate = (uint32)(player->GetSpeed(moveType));
|
|
|
|
|
|
|
|
|
|
|
|
// how long the player took to move to here.
|
|
|
|
// how long the player took to move to here.
|
|
|
|
uint32 timeDiff = getMSTimeDiff(m_Players[key].GetLastMovementInfo().time, movementInfo.time);
|
|
|
|
uint32 timeDiff = getMSTimeDiff(m_Players[key].GetLastMovementInfo().time, movementInfo.time);
|
|
|
|
@@ -209,8 +209,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Time Manipulation - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Time Manipulation - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -221,8 +220,8 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] TIME MANIPULATION COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] TIME MANIPULATION COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -244,8 +243,8 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] TIME MANIPULATION COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] TIME MANIPULATION COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -278,14 +277,13 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Speed-Hack (Speed Movement at {}% above allowed Server Set rate {}%.) detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", clientSpeedRate, speedRate, player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Speed-Hack (Speed Movement at {}% above allowed Server Set rate {}%.) detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", clientSpeedRate, speedRate, player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.SPEEDHACK", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.SPEEDHACK", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (Aura* slowcheater = player->AddAura(SLOWDOWN, player))// SLOWDOWN
|
|
|
|
if (Aura* slowcheater = player->AddAura(SLOWDOWN, player))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
slowcheater->SetDuration(1000);
|
|
|
|
slowcheater->SetDuration(1000);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -296,8 +294,8 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] SPEED COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] SPEED COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -310,7 +308,6 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
BuildReport(player, SPEED_HACK_REPORT);
|
|
|
|
BuildReport(player, SPEED_HACK_REPORT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -341,27 +338,23 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
|
|
|
|
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
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);
|
|
|
|
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))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.FLYHACK", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // 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";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] FLY HACK COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
|
|
|
|
|
|
|
|
Player* cheatertarget = player->GetSession()->GetPlayer();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
WorldPacket cheater(12);
|
|
|
|
WorldPacket cheater(12);
|
|
|
|
cheater.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY);
|
|
|
|
cheater.SetOpcode(SMSG_MOVE_UNSET_CAN_FLY);
|
|
|
|
|
|
|
|
cheater << player->GetPackGUID();
|
|
|
|
cheater << cheatertarget->GetPackGUID();
|
|
|
|
|
|
|
|
cheater << uint32(0);
|
|
|
|
cheater << uint32(0);
|
|
|
|
cheatertarget->SendMessageToSet(&cheater, true);
|
|
|
|
player->SendMessageToSet(&cheater, true);
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
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());
|
|
|
|
@@ -369,8 +362,8 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // 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";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] FLY HACK COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -406,21 +399,18 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Jump-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Jump-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.JUMPHACK", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.JUMPHACK", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] JUMP HACK COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] JUMP HACK COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
|
|
|
|
|
|
|
|
Player* cheatertarget = player->GetSession()->GetPlayer();
|
|
|
|
player->GetMotionMaster()->MoveFall();
|
|
|
|
|
|
|
|
|
|
|
|
cheatertarget->GetMotionMaster()->MoveFall();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -429,8 +419,8 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] JUMP COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] JUMP COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -480,21 +470,18 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Stricter Check Jump-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Stricter Check Jump-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.ADVJUMPHACK", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ADVJUMPHACK", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] ADVANCE JUMP HACK COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] ADVANCE JUMP HACK COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
|
|
|
|
|
|
|
|
Player* cheatertarget = player->GetSession()->GetPlayer();
|
|
|
|
player->GetMotionMaster()->MoveFall();
|
|
|
|
|
|
|
|
|
|
|
|
cheatertarget->GetMotionMaster()->MoveFall();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -503,8 +490,8 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo movementInfo,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] ADVANCE JUMP COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] ADVANCE JUMP COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -579,8 +566,7 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Teleport To Plane - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Teleport To Plane - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -620,8 +606,7 @@ void AnticheatMgr::ClimbHackDetection(Player* player, MovementInfo movementInfo,
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Climb-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Climb-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -704,16 +689,14 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Player* opponent = player->duel->Opponent;
|
|
|
|
Player* opponent = player->duel->Opponent;
|
|
|
|
|
|
|
|
|
|
|
|
std::string str = "|cFFFFFC00[DUEL ALERT Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible Teleport Hack Detected! While Dueling [|cFF60FF00" + std::string(opponent->GetName().c_str()) + "|cFF00FFFF]";
|
|
|
|
std::string str = "|cFFFFFC00[DUEL ALERT Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Possible Teleport Hack Detected! While Dueling [|cFF60FF00" + opponent->GetName() + "|cFF00FFFF]";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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 = 0;
|
|
|
|
uint32 latency2 = opponent->GetSession()->GetLatency();
|
|
|
|
latency2 = opponent->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
sWorld->SendGMText(LANG_ANTICHEAT_DUEL, player->GetName().c_str(), latency, opponent->GetName().c_str(), latency2);
|
|
|
|
sWorld->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))
|
|
|
|
@@ -739,12 +722,11 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible Teleport Hack Detected!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Possible Teleport Hack Detected!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
// need better way to limit chat spam
|
|
|
|
// need better way to limit chat spam
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -755,8 +737,7 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
std::string goXYZ = ".go xyz " + std::to_string(newX) + " " + std::to_string(newY) + " " + std::to_string(newZ + 1.0f) + " " + std::to_string(player->GetMap()->GetId()) + " " + std::to_string(player->GetOrientation());
|
|
|
|
std::string goXYZ = ".go xyz " + std::to_string(newX) + " " + std::to_string(newY) + " " + std::to_string(newZ + 1.0f) + " " + std::to_string(player->GetMap()->GetId()) + " " + std::to_string(player->GetOrientation());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Teleport-Hack detected player {} ({}) - Latency: {} ms - IP: {} - GPS Diff X: {} Y: {} Z: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), xDiff, yDiff, zDiff, goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Teleport-Hack detected player {} ({}) - Latency: {} ms - IP: {} - GPS Diff X: {} Y: {} Z: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), xDiff, yDiff, zDiff, goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -769,8 +750,8 @@ void AnticheatMgr::TeleportHackDetection(Player* player, MovementInfo movementIn
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] TELEPORT HACK COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] TELEPORT HACK COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -810,10 +791,9 @@ void AnticheatMgr::IgnoreControlHackDetection(Player* player, MovementInfo movem
|
|
|
|
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_SWIMMING))
|
|
|
|
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_SWIMMING))
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
uint32 latency = 0;
|
|
|
|
bool hasBadLatency = player->GetSession()->GetLatency() >= 400;
|
|
|
|
latency = player->GetSession()->GetLatency() >= 400;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (player->HasAuraType(SPELL_AURA_MOD_ROOT) && !player->GetVehicle() && !latency)
|
|
|
|
if (player->HasAuraType(SPELL_AURA_MOD_ROOT) && !player->GetVehicle() && !hasBadLatency)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bool unrestricted = newX != lastX || newY != lastY;
|
|
|
|
bool unrestricted = newX != lastX || newY != lastY;
|
|
|
|
if (unrestricted)
|
|
|
|
if (unrestricted)
|
|
|
|
@@ -827,15 +807,14 @@ void AnticheatMgr::IgnoreControlHackDetection(Player* player, MovementInfo movem
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible Ignore Control Hack Detected!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Possible Ignore Control Hack Detected!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
uint32 latency = 0;
|
|
|
|
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
// need better way to limit chat spam
|
|
|
|
// need better way to limit chat spam
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
sWorld->SendGMText(LANG_ANTICHEAT_IGNORECONTROL, player->GetName().c_str(), latency);
|
|
|
|
sWorld->SendGMText(LANG_ANTICHEAT_IGNORECONTROL, player->GetName().c_str(), latency);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_counter = 0;
|
|
|
|
_counter = 0;
|
|
|
|
@@ -843,8 +822,7 @@ void AnticheatMgr::IgnoreControlHackDetection(Player* player, MovementInfo movem
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Ignore Control - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Ignore Control - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -869,8 +847,7 @@ void AnticheatMgr::GravityHackDetection(Player* player, MovementInfo movementInf
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Gravity-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Gravity-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -899,8 +876,7 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo movemen
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Walk on Water - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Walk on Water - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -931,8 +907,7 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo movemen
|
|
|
|
|
|
|
|
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Walk on Water - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Walk on Water - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -999,15 +974,14 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible Ignore Zaxis Hack Detected!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Possible Ignore Zaxis Hack Detected!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
// need better way to limit chat spam
|
|
|
|
// need better way to limit chat spam
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
sWorld->SendGMText(LANG_ANTICHEAT_ALERT, player->GetName().c_str(), player->GetName().c_str(), latency);
|
|
|
|
sWorld->SendGMText(LANG_ANTICHEAT_ALERT, player->GetName().c_str(), player->GetName().c_str(), latency);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
_counter = 0;
|
|
|
|
_counter = 0;
|
|
|
|
@@ -1015,21 +989,18 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Ignore Zaxis Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Ignore Zaxis 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.IGNOREZ", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.IGNOREZ", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] IGNORE-Z HACK COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] IGNORE-Z HACK COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
|
|
|
|
|
|
|
|
Player* cheatertarget = player->GetSession()->GetPlayer();
|
|
|
|
player->GetMotionMaster()->MoveFall();
|
|
|
|
|
|
|
|
|
|
|
|
cheatertarget->GetMotionMaster()->MoveFall();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -1038,8 +1009,8 @@ void AnticheatMgr::ZAxisHackDetection(Player* player, MovementInfo movementInfo)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] IGNORE-Z COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] IGNORE-Z COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1084,8 +1055,7 @@ void AnticheatMgr::AntiSwimHackDetection(Player* player, MovementInfo movementIn
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Anti-Swim-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Anti-Swim-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1111,8 +1081,7 @@ void AnticheatMgr::AntiKnockBackHackDetection(Player* player, MovementInfo movem
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Anti-Knock Back - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Anti-Knock Back - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1158,8 +1127,7 @@ void AnticheatMgr::NoFallDamageDetection(Player* player, MovementInfo movementIn
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: No Fall Damage - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: No Fall Damage - Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1171,21 +1139,20 @@ void AnticheatMgr::NoFallDamageDetection(Player* player, MovementInfo movementIn
|
|
|
|
|
|
|
|
|
|
|
|
void AnticheatMgr::BGreport(Player* player)
|
|
|
|
void AnticheatMgr::BGreport(Player* player)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
ObjectGuid key = player->GetGUID();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_alertFrequency = sConfigMgr->GetOption<uint32>("Anticheat.AlertFrequency", 5);
|
|
|
|
_alertFrequency = sConfigMgr->GetOption<uint32>("Anticheat.AlertFrequency", 5);
|
|
|
|
// So we dont divide by 0 by accident
|
|
|
|
// So we dont divide by 0 by accident
|
|
|
|
if (_alertFrequency < 1)
|
|
|
|
if (_alertFrequency < 1)
|
|
|
|
_alertFrequency = 1;
|
|
|
|
_alertFrequency = 1;
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
ObjectGuid key = player->GetGUID();
|
|
|
|
|
|
|
|
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// 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 has started!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Player Outside of Starting SPOT before BG has started!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
// need better way to limit chat spam
|
|
|
|
// need better way to limit chat spam
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -1196,8 +1163,7 @@ void AnticheatMgr::BGreport(Player* player)
|
|
|
|
|
|
|
|
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: BG Start Spot Exploit-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: BG Start Spot Exploit-Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1226,8 +1192,8 @@ void AnticheatMgr::CheckStartPositions(Player* player)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.CM.ALERTSCREEN", true))
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
{ // display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] BG START SPOT COUNTER MEASURE ALERT";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] BG START SPOT COUNTER MEASURE ALERT";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1388,11 +1354,11 @@ void AnticheatMgr::BGStartExploit(Player* player, MovementInfo movementInfo)
|
|
|
|
void AnticheatMgr::HandlePlayerLogin(Player* player)
|
|
|
|
void AnticheatMgr::HandlePlayerLogin(Player* player)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// we must delete this to prevent errors in case of crash
|
|
|
|
// we must delete this to prevent errors in case of crash
|
|
|
|
CharacterDatabase.Execute("DELETE FROM players_reports_status WHERE guid={}", player->GetGUID().GetCounter());
|
|
|
|
CharacterDatabase.Execute("DELETE FROM `players_reports_status` WHERE `guid` = {}", player->GetGUID().GetCounter());
|
|
|
|
// we initialize the pos of lastMovementPosition var.
|
|
|
|
// we initialize the pos of lastMovementPosition var.
|
|
|
|
m_Players[player->GetGUID()].SetPosition(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
|
|
|
|
m_Players[player->GetGUID()].SetPosition(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation());
|
|
|
|
|
|
|
|
|
|
|
|
if (CharacterDatabase.Query("SELECT 0 FROM daily_players_reports WHERE guid={};", player->GetGUID().GetCounter()))
|
|
|
|
if (CharacterDatabase.Query("SELECT 0 FROM `daily_players_reports` WHERE `guid` = {};", player->GetGUID().GetCounter()))
|
|
|
|
m_Players[player->GetGUID()].SetDailyReportState(true);
|
|
|
|
m_Players[player->GetGUID()].SetDailyReportState(true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1401,7 +1367,7 @@ void AnticheatMgr::HandlePlayerLogout(Player* player)
|
|
|
|
// TO-DO Make a table that stores the cheaters of the day, with more detailed information.
|
|
|
|
// TO-DO Make a table that stores the cheaters of the day, with more detailed information.
|
|
|
|
|
|
|
|
|
|
|
|
// We must also delete it at logout to prevent have data of offline players in the db when we query the database (IE: The GM Command)
|
|
|
|
// We must also delete it at logout to prevent have data of offline players in the db when we query the database (IE: The GM Command)
|
|
|
|
CharacterDatabase.Execute("DELETE FROM players_reports_status WHERE guid={}", player->GetGUID().GetCounter());
|
|
|
|
CharacterDatabase.Execute("DELETE FROM `players_reports_status` WHERE `guid` = {}", player->GetGUID().GetCounter());
|
|
|
|
// Delete not needed data from the memory.
|
|
|
|
// Delete not needed data from the memory.
|
|
|
|
m_Players.erase(player->GetGUID());
|
|
|
|
m_Players.erase(player->GetGUID());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1429,8 +1395,7 @@ void AnticheatMgr::DoActions(Player* player)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
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());
|
|
|
|
LOG_INFO("anticheat.module", "Opcode Manipulation Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
LOG_INFO("anticheat.module", "Opcode Manipulation Hack detected player {} ({}) - Latency: {} ms - IP: {} - Cheat Flagged At: {}", player->GetName(), player->GetGUID().ToString(), latency, player->GetSession()->GetRemoteAddress().c_str(), goXYZ);
|
|
|
|
order.counter = 0;
|
|
|
|
order.counter = 0;
|
|
|
|
@@ -1488,41 +1453,25 @@ float AnticheatMgr::GetAverage(ObjectGuid guid)
|
|
|
|
return m_Players[guid].GetAverage();
|
|
|
|
return m_Players[guid].GetAverage();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
uint32 AnticheatMgr::GetTypeReports(ObjectGuid guid, uint8 type)
|
|
|
|
uint32 AnticheatMgr::GetTypeReports(ObjectGuid guid, ReportTypes type)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return m_Players[guid].GetTypeReports(type);
|
|
|
|
return m_Players[guid].GetTypeReports(type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool AnticheatMgr::MustCheckTempReports(uint8 type)
|
|
|
|
bool AnticheatMgr::MustCheckTempReports(ReportTypes type)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (type == JUMP_HACK_REPORT)
|
|
|
|
//Return false if type is any of them.
|
|
|
|
return false;
|
|
|
|
return type != JUMP_HACK_REPORT
|
|
|
|
|
|
|
|
&& type != TELEPORT_HACK_REPORT
|
|
|
|
if (type == TELEPORT_HACK_REPORT)
|
|
|
|
&& type != IGNORE_CONTROL_REPORT
|
|
|
|
return false;
|
|
|
|
&& type != GRAVITY_HACK_REPORT
|
|
|
|
|
|
|
|
&& type != ANTIKNOCK_BACK_HACK_REPORT
|
|
|
|
if (type == IGNORE_CONTROL_REPORT)
|
|
|
|
&& type != NO_FALL_DAMAGE_HACK_REPORT
|
|
|
|
return false;
|
|
|
|
&& type != OP_ACK_HACK_REPORT
|
|
|
|
|
|
|
|
&& type != COUNTER_MEASURES_REPORT;
|
|
|
|
if (type == GRAVITY_HACK_REPORT)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type == ANTIKNOCK_BACK_HACK_REPORT)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type == NO_FALL_DAMAGE_HACK_REPORT)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type == OP_ACK_HACK_REPORT)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (type == COUNTER_MEASURES_REPORT)
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
|
|
|
void AnticheatMgr::BuildReport(Player* player, ReportTypes reportType)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
OnReport(player, reportType);
|
|
|
|
OnReport(player, reportType);
|
|
|
|
ObjectGuid key = player->GetGUID();
|
|
|
|
ObjectGuid key = player->GetGUID();
|
|
|
|
@@ -1588,12 +1537,11 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
if (++_counter % _alertFrequency == 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Possible cheater!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Possible cheater!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
uint32 latency = 0;
|
|
|
|
uint32 latency = player->GetSession()->GetLatency();
|
|
|
|
latency = player->GetSession()->GetLatency();
|
|
|
|
|
|
|
|
// need better way to limit chat spam
|
|
|
|
// need better way to limit chat spam
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
if (m_Players[key].GetTotalReports() >= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Min", 70) && m_Players[key].GetTotalReports() <= sConfigMgr->GetOption<uint32>("Anticheat.ReportinChat.Max", 80))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -1610,8 +1558,8 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Reports reached assigned threshhold and counteracted by kicking player {} ({})", player->GetName(), player->GetGUID().ToString());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Reports reached assigned threshhold and counteracted by kicking player {} ({})", player->GetName(), player->GetGUID().ToString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Auto Kicked for Reaching Cheat Threshhold!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Auto Kicked for Reaching Cheat Threshhold!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1636,8 +1584,8 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Reports reached assigned threshhold and counteracted by banning player {} ({})", player->GetName(), player->GetGUID().ToString());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Reports reached assigned threshhold and counteracted by banning player {} ({})", player->GetName(), player->GetGUID().ToString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Auto Banned Account for Reaching Cheat Threshhold!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Auto Banned Account for Reaching Cheat Threshhold!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1665,8 +1613,8 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Reports reached assigned threshhold and counteracted by jailing player {} ({})", player->GetName(), player->GetGUID().ToString());
|
|
|
|
LOG_INFO("anticheat.module", "AnticheatMgr:: Reports reached assigned threshhold and counteracted by jailing player {} ({})", player->GetName(), player->GetGUID().ToString());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
// display warning at the center of the screen, hacky way?
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + std::string(player->GetName().c_str()) + "|cFF00FFFF] Auto Jailed Account for Reaching Cheat Threshhold!";
|
|
|
|
std::string str = "|cFFFFFC00[Playername:|cFF00FFFF[|cFF60FF00" + player->GetName() + "|cFF00FFFF] Auto Jailed Account for Reaching Cheat Threshhold!";
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, (str.size() + 1));
|
|
|
|
WorldPacket data(SMSG_NOTIFICATION, str.size() + 1);
|
|
|
|
data << str;
|
|
|
|
data << str;
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
sWorld->SendGlobalGMMessage(&data);
|
|
|
|
|
|
|
|
|
|
|
|
@@ -1680,15 +1628,15 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
|
|
|
player->SetHomebind(loc, 876); // GM Jail Homebind location
|
|
|
|
player->SetHomebind(loc, 876); // GM Jail Homebind location
|
|
|
|
player->CastSpell(player, SHACKLES); // Shackle him in place to ensure no exploit happens for jail break attempt
|
|
|
|
player->CastSpell(player, SHACKLES); // Shackle him in place to ensure no exploit happens for jail break attempt
|
|
|
|
|
|
|
|
|
|
|
|
if (Aura* dungdesert = player->AddAura(LFG_SPELL_DUNGEON_DESERTER, player))// LFG_SPELL_DUNGEON_DESERTER
|
|
|
|
if (Aura* dungdesert = player->AddAura(LFG_SPELL_DUNGEON_DESERTER, player))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
dungdesert->SetDuration(-1);
|
|
|
|
dungdesert->SetDuration(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Aura* bgdesert = player->AddAura(BG_SPELL_DESERTER, player))// BG_SPELL_DESERTER
|
|
|
|
if (Aura* bgdesert = player->AddAura(BG_SPELL_DESERTER, player))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
bgdesert->SetDuration(-1);
|
|
|
|
bgdesert->SetDuration(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Aura* silent = player->AddAura(SILENCED, player))// SILENCED
|
|
|
|
if (Aura* silent = player->AddAura(SILENCED, player))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
silent->SetDuration(-1);
|
|
|
|
silent->SetDuration(-1);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -1752,7 +1700,7 @@ void AnticheatMgr::AnticheatGlobalCommand(ChatHandler* handler)
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
handler->PSendSysMessage("=============================");
|
|
|
|
handler->PSendSysMessage("=============================");
|
|
|
|
handler->PSendSysMessage("Players with the more reports:");
|
|
|
|
handler->PSendSysMessage("Players with the most reports:");
|
|
|
|
do
|
|
|
|
do
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Field* fieldsDB = resultDB->Fetch();
|
|
|
|
Field* fieldsDB = resultDB->Fetch();
|
|
|
|
@@ -1784,7 +1732,7 @@ void AnticheatMgr::AnticheatDeleteCommand(ObjectGuid guid)
|
|
|
|
(*it).second.SetTypeReports(i, 0);
|
|
|
|
(*it).second.SetTypeReports(i, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CharacterDatabase.Execute("DELETE FROM players_reports_status;");
|
|
|
|
CharacterDatabase.Execute("DELETE FROM `players_reports_status`;");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@@ -1797,13 +1745,13 @@ void AnticheatMgr::AnticheatDeleteCommand(ObjectGuid guid)
|
|
|
|
m_Players[guid].SetTempReportsTimer(0, i);
|
|
|
|
m_Players[guid].SetTempReportsTimer(0, i);
|
|
|
|
m_Players[guid].SetTypeReports(i, 0);
|
|
|
|
m_Players[guid].SetTypeReports(i, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
CharacterDatabase.Execute("DELETE FROM players_reports_status WHERE guid={};", guid.GetCounter());
|
|
|
|
CharacterDatabase.Execute("DELETE FROM `players_reports_status` WHERE `guid` = {};", guid.GetCounter());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnticheatMgr::AnticheatPurgeCommand(ChatHandler* /*handler*/)
|
|
|
|
void AnticheatMgr::AnticheatPurgeCommand(ChatHandler* /*handler*/)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
CharacterDatabase.Execute("TRUNCATE TABLE daily_players_reports;");
|
|
|
|
CharacterDatabase.Execute("TRUNCATE TABLE `daily_players_reports`;");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void AnticheatMgr::ResetDailyReportStates()
|
|
|
|
void AnticheatMgr::ResetDailyReportStates()
|
|
|
|
|