mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
update (cmd): Save Stats before Global stats display
adding in a save stats before displaying global stats with .anticheat global gm command.
This commit is contained in:
@@ -938,6 +938,11 @@ void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
|
||||
|
||||
void AnticheatMgr::AnticheatGlobalCommand(ChatHandler* handler)
|
||||
{
|
||||
// save All Anticheat Player Data before displaying global stats
|
||||
for (SessionMap::const_iterator itr = sWorld->GetAllSessions().begin(); itr != sWorld->GetAllSessions().end(); ++itr)
|
||||
if (Player* plr = itr->second->GetPlayer())
|
||||
sAnticheatMgr->SavePlayerData(plr);
|
||||
|
||||
QueryResult resultDB = CharacterDatabase.Query("SELECT guid,average,total_reports FROM players_reports_status WHERE total_reports != 0 ORDER BY average ASC LIMIT 3;");
|
||||
if (!resultDB)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user