Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
update (anticheat): Twin Peaks BG
Browse files Browse the repository at this point in the history
  • Loading branch information
acidmanifesto committed Dec 8, 2023
1 parent ab142fa commit 7e7174a
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion src/server/game/Anticheat/AnticheatMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,10 @@ void AnticheatMgr::StartHackDetection(Player* player, MovementInfo& movementInfo

SpeedHackDetection(player, movementInfo, *data);
FlyHackDetection(player, movementInfo, *data);
TeleportHackDetection(player, movementInfo, *data);
if (!player->HasAtLoginFlag(AT_LOGIN_FIRST))
{
TeleportHackDetection(player, movementInfo, *data);
}
if (movementInfo.HasMovementFlag(MOVEMENTFLAG_WATERWALKING))
{
WalkOnWaterHackDetection(player, movementInfo, *data);
Expand Down Expand Up @@ -787,6 +790,29 @@ void AnticheatMgr::BGStartExploit(Player* player, MovementInfo movementInfo, Ant
}
break;
}
case 726: // Twin Peaks
{
if (Battleground* bg = player->GetBattleground())
{
if (bg->GetStatus() == STATUS_WAIT_JOIN)
{
// Outside of starting area before BG has started.
if ((player->GetTeamId() == TEAM_ALLIANCE && movementInfo.pos.GetPositionX() < 2075.00f) ||
(player->GetTeamId() == TEAM_ALLIANCE && movementInfo.pos.GetPositionY() < 154.30f) ||
(player->GetTeamId() == TEAM_ALLIANCE && movementInfo.pos.GetPositionY() > 222.80f))
{
BGLogger(player, data);
}
if ((player->GetTeamId() == TEAM_ALLIANCE && movementInfo.pos.GetPositionX() < 314.00f) ||
(player->GetTeamId() == TEAM_HORDE && movementInfo.pos.GetPositionY() < 314.0f) ||
(player->GetTeamId() == TEAM_HORDE && movementInfo.pos.GetPositionY() > 380.0f))
{
BGLogger(player, data);
}
}
}
break;
}
return;
default:
break;
Expand Down

0 comments on commit 7e7174a

Please sign in to comment.