Feat (Conf\BG): BG Star Area Cheat Countermeasure

If a player cheats by teleporting outside of the start spot before the BG starts, a counter measure will applied and log (if WriteLog is enabled) and send the player to a void spot for a few seconds and return them back in the team start spot
This commit is contained in:
M'Dic
2022-12-15 12:37:39 -05:00
parent ce3bd13388
commit 6b74a7cd8c
3 changed files with 53 additions and 0 deletions

View File

@@ -109,6 +109,8 @@ class AnticheatMgr
void AnticheatDeleteCommand(ObjectGuid guid);
void AnticheatPurgeCommand(ChatHandler* handler);
void ResetDailyReportStates();
void SetMapId(uint32 MapID) { m_MapId = MapID; }
[[nodiscard]] uint32 GetMapId() const { return m_MapId; }
private:
void SpeedHackDetection(Player* player, MovementInfo movementInfo);
@@ -125,6 +127,7 @@ class AnticheatMgr
void AntiKnockBackHackDetection(Player* player, MovementInfo movementInfo);
void NoFallDamageDetection(Player* player, MovementInfo movementInfo);
void BGreport(Player* player);
void CheckStartPositions(Player* player);
void BGStartExploit(Player* player, MovementInfo movementInfo);
void BuildReport(Player* player,uint16 reportType);
bool MustCheckTempReports(uint8 type);
@@ -132,6 +135,9 @@ class AnticheatMgr
uint32 _alertFrequency = 0;
uint32 _assignedspeeddiff = 0;
uint32 _updateCheckTimer = 4000;
uint32 m_MapId;
std::array<Position, PVP_TEAMS_COUNT> _startPosition;
Position const* GetTeamStartPosition(TeamId teamId) const;
AnticheatPlayersDataMap m_Players; ///< Player data
};