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

@@ -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);