feat: add OnReport event

This commit is contained in:
Axel Cocat
2022-08-05 01:03:20 +02:00
parent e107f41956
commit a51075b9d9
2 changed files with 4 additions and 0 deletions

View File

@@ -769,6 +769,7 @@ bool AnticheatMgr::MustCheckTempReports(uint8 type)
void AnticheatMgr::BuildReport(Player* player, uint16 reportType)
{
OnReport(player, reportType);
ObjectGuid key = player->GetGUID();
if (MustCheckTempReports(reportType))

View File

@@ -31,6 +31,7 @@
#include "AnticheatData.h"
#include "Chat.h"
#include "ObjectGuid.h"
#include "EventEmitter.h"
class Player;
class AnticheatData;
@@ -66,6 +67,8 @@ class AnticheatMgr
return instance;
}
EventEmitter<void(Player*, uint16)> OnReport;
void StartHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode);
void SavePlayerData(Player* player);
void SavePlayerDataDaily(Player* player);