mirror of
https://github.com/azerothcore/mod-anticheat.git
synced 2026-01-13 00:58:35 +00:00
fix (module) Reduce false positives Anti-Swim
This commit is contained in:
@@ -424,7 +424,7 @@ void AnticheatMgr::StartHackDetection(Player* player, MovementInfo movementInfo,
|
||||
}
|
||||
if (player->GetLiquidData().Status == LIQUID_MAP_UNDER_WATER)
|
||||
{
|
||||
AntiSwimHackDetection(player, movementInfo);
|
||||
AntiSwimHackDetection(player, movementInfo, opcode);
|
||||
}
|
||||
m_Players[key].SetLastMovementInfo(movementInfo);
|
||||
m_Players[key].SetLastOpcode(opcode);
|
||||
@@ -473,7 +473,7 @@ void AnticheatMgr::ClimbHackDetection(Player* player, MovementInfo movementInfo,
|
||||
}
|
||||
|
||||
// basic detection
|
||||
void AnticheatMgr::AntiSwimHackDetection(Player* player, MovementInfo movementInfo)
|
||||
void AnticheatMgr::AntiSwimHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode)
|
||||
{
|
||||
if (!sConfigMgr->GetOption<bool>("Anticheat.AntiSwimHack", true))
|
||||
return;
|
||||
@@ -487,6 +487,17 @@ void AnticheatMgr::AntiSwimHackDetection(Player* player, MovementInfo movementIn
|
||||
}
|
||||
}
|
||||
|
||||
if (player->GetLiquidData().Status == (LIQUID_MAP_ABOVE_WATER | LIQUID_MAP_WATER_WALK | LIQUID_MAP_IN_WATER))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (opcode == MSG_MOVE_JUMP)
|
||||
return;
|
||||
|
||||
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_FALLING || MOVEMENTFLAG_SWIMMING))
|
||||
return;
|
||||
|
||||
if (player->GetLiquidData().Status == LIQUID_MAP_UNDER_WATER && !movementInfo.HasMovementFlag(MOVEMENTFLAG_SWIMMING))
|
||||
{
|
||||
if (sConfigMgr->GetOption<bool>("Anticheat.WriteLog", true))
|
||||
|
||||
@@ -78,7 +78,7 @@ class AnticheatMgr
|
||||
void JumpHackDetection(Player* player, MovementInfo movementInfo,uint32 opcode);
|
||||
void TeleportPlaneHackDetection(Player* player, MovementInfo);
|
||||
void ClimbHackDetection(Player* player,MovementInfo movementInfo, uint32 opcode);
|
||||
void AntiSwimHackDetection(Player* player, MovementInfo movementInfo);
|
||||
void AntiSwimHackDetection(Player* player, MovementInfo movementInfo, uint32 opcode);
|
||||
void TeleportHackDetection(Player* player, MovementInfo movementInfo);
|
||||
void IgnoreControlHackDetection(Player* player, MovementInfo movementInfo);
|
||||
void ZAxisHackDetection(Player* player, MovementInfo movementInfo);
|
||||
|
||||
Reference in New Issue
Block a user