update (detection): Teleport Plane Hack Detection

This commit is contained in:
MDIC
2022-05-09 09:00:46 -04:00
parent 47bd4f8a9f
commit 2bcd8913f4
2 changed files with 8 additions and 6 deletions

View File

@@ -153,18 +153,20 @@ void AnticheatMgr::FlyHackDetection(Player* player, MovementInfo movementInfo)
BuildReport(player, FLY_HACK_REPORT);
}
void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movementInfo)
void AnticheatMgr::TeleportPlaneHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode)
{
if (!sConfigMgr->GetOption<bool>("Anticheat.DetectTelePlaneHack", true))
return;
ObjectGuid key = player->GetGUID();
if (m_Players[key].GetLastMovementInfo().pos.GetPositionZ() != 0 ||
movementInfo.pos.GetPositionZ() != 0)
if (m_Players[key].GetLastOpcode() == MSG_MOVE_JUMP)
return;
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING))
if (opcode == (MSG_MOVE_FALL_LAND))
return;
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING | MOVEMENTFLAG_SWIMMING))
return;
float x, y, z;
@@ -409,7 +411,7 @@ void AnticheatMgr::StartHackDetection(Player* player, MovementInfo movementInfo,
SpeedHackDetection(player, movementInfo);
FlyHackDetection(player, movementInfo);
JumpHackDetection(player, movementInfo, opcode);
TeleportPlaneHackDetection(player, movementInfo);
TeleportPlaneHackDetection(player, movementInfo, opcode);
ClimbHackDetection(player, movementInfo, opcode);
TeleportHackDetection(player, movementInfo);
IgnoreControlHackDetection(player, movementInfo);

View File

@@ -76,7 +76,7 @@ class AnticheatMgr
void FlyHackDetection(Player* player, MovementInfo movementInfo);
void WalkOnWaterHackDetection(Player* player, MovementInfo movementInfo);
void JumpHackDetection(Player* player, MovementInfo movementInfo,uint32 opcode);
void TeleportPlaneHackDetection(Player* player, MovementInfo);
void TeleportPlaneHackDetection(Player* player, MovementInfo, uint32 opcode);
void ClimbHackDetection(Player* player,MovementInfo movementInfo, uint32 opcode);
void AntiSwimHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode);
void TeleportHackDetection(Player* player, MovementInfo movementInfo);