Add option to configure report save time

This commit is contained in:
José González
2018-02-24 12:43:31 -03:00
committed by Barbz
parent a80d42389a
commit a8166b0507
2 changed files with 8 additions and 1 deletions

View File

@@ -44,6 +44,12 @@ Anticheat.LoginMessage = 0
Anticheat.WriteLog = 0
# Anticheat.SaveReportsTime
# Description: Set the time between each report save in seconds
# Default: 60 - (seconds)
Anticheat.SaveReportsTime = 60
# Anticheat.Detect
# Description: It represents which detections are enabled (ClimbHack disabled by default).
# Default: 1 - (Enabled)

View File

@@ -43,8 +43,9 @@ public:
}
if (sWorld->GetUptime() > lastIterationPlayer)
{
lastIterationPlayer = sWorld->GetUptime() + 30;//TODO: change 30 secs static to a configurable option
lastIterationPlayer = sWorld->GetUptime() + sConfigMgr->GetIntDefault("Anticheat.SaveReportsTime", 60);
sLog->outString( "Saving reports for %u players.", sWorld->GetPlayerCount());
for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr)
if (Player* plr = itr->second->GetPlayer())
sAnticheatMgr->SavePlayerData(plr);