fix(build)

This commit is contained in:
Kitzunu
2022-01-28 16:41:46 +01:00
parent 3f4c562c55
commit 3f420234e1
2 changed files with 14 additions and 13 deletions

View File

@@ -39,7 +39,7 @@ void AnticheatMgr::JumpHackDetection(Player* player, MovementInfo /* movementInf
if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP && opcode == MSG_MOVE_JUMP)
{
BuildReport(player, JUMP_HACK_REPORT);
sLog->outString("AnticheatMgr:: Jump-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Jump-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString());
}
}
@@ -64,7 +64,7 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo moveme
if (sConfigMgr->GetOption<bool>("Anticheat.KickPlayerWaterWalkHack", false))
{
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false))
sLog->outString("AnticheatMgr:: Walk on Water - Hack detected and counteracted by kicking player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Walk on Water - Hack detected and counteracted by kicking player {} ({})", player->GetName(), player->GetGUID().ToString());
player->GetSession()->KickPlayer(true);
if(sConfigMgr->GetOption<bool>("Anticheat.AnnounceKick", true))
@@ -80,7 +80,7 @@ void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo moveme
}
}
else if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false)) {
sLog->outString("AnticheatMgr:: Walk on Water - Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Walk on Water - Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString());
}
BuildReport(player, WALK_WATER_HACK_REPORT);
@@ -114,7 +114,7 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
{
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false))
{
sLog->outString("AnticheatMgr:: Fly-Hack detected and counteracted by kicking player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Fly-Hack detected and counteracted by kicking player {} ({})", player->GetName(), player->GetGUID().ToString());
}
player->GetSession()->KickPlayer(true);
@@ -129,9 +129,10 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
" has been kicked.|r";
sWorld->SendServerMessage(SERVER_MSG_STRING, stream.str().c_str());
}
} else if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false))
}
else if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false))
{
sLog->outString( "AnticheatMgr:: Fly-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Fly-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString());
}
BuildReport(player,FLY_HACK_REPORT);
@@ -163,7 +164,7 @@ void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movem
if (z_diff > 1.0f)
{
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false))
sLog->outString("AnticheatMgr:: Teleport To Plane - Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Teleport To Plane - Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString());
BuildReport(player, TELEPORT_PLANE_HACK_REPORT);
}
@@ -226,7 +227,7 @@ void AnticheatMgr::ClimbHackDetection(Player *player, MovementInfo movementInfo,
if (angle > CLIMB_ANGLE)
{
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false))
sLog->outString("AnticheatMgr:: Climb-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Climb-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString());
BuildReport(player, CLIMB_HACK_REPORT);
}
@@ -275,7 +276,7 @@ void AnticheatMgr::SpeedHackDetection(Player* player, MovementInfo movementInfo)
if (clientSpeedRate > speedRate)
{
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", false))
sLog->outString("AnticheatMgr:: Speed-Hack detected player %s (%s)", player->GetName().c_str(), player->GetGUID().ToString().c_str());
LOG_INFO("module", "AnticheatMgr:: Speed-Hack detected player {} ({})", player->GetName(), player->GetGUID().ToString());
BuildReport(player, SPEED_HACK_REPORT);
}

View File

@@ -58,14 +58,14 @@ public:
LOG_INFO("module", "Anticheat: Resetting daily report states.");
sAnticheatMgr->ResetDailyReportStates();
UpdateReportResetTime();
FMT_LOG_INFO("module", "Anticheat: Next daily report reset: {}", Acore::Time::TimeToHumanReadable(resetTime));
LOG_INFO("module", "Anticheat: Next daily report reset: {}", Acore::Time::TimeToHumanReadable(resetTime));
}
if (GameTime::GetUptime() > lastIterationPlayer)
{
lastIterationPlayer = GameTime::GetUptime() + Seconds(sConfigMgr->GetOption<uint32>("Anticheat.SaveReportsTime", 60));
FMT_LOG_INFO("module", "Saving reports for {} players.", sWorld->GetPlayerCount());
LOG_INFO("module", "Saving reports for {} players.", sWorld->GetPlayerCount());
for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr)
if (Player* plr = itr->second->GetPlayer())