From f0e5f32b4e7c769ff0cae76391d16f46207051b2 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Mon, 9 Feb 2026 21:28:44 -0600 Subject: [PATCH] fix(Core/Battlegrounds): remove unused ApplyPhaseMask from Arathi Basin (#24582) Co-authored-by: blinkysc --- .../Battlegrounds/Zones/BattlegroundAB.cpp | 21 +------------------ .../game/Battlegrounds/Zones/BattlegroundAB.h | 1 - 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index cff3ec3ff..ca02782cc 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -180,9 +180,8 @@ void BattlegroundAB::AddPlayer(Player* player) PlayerScores.emplace(player->GetGUID().GetCounter(), new BattlegroundABScore(player->GetGUID())); } -void BattlegroundAB::RemovePlayer(Player* player) +void BattlegroundAB::RemovePlayer(Player* /*player*/) { - player->SetPhaseMask(1, false); } void BattlegroundAB::HandleAreaTrigger(Player* player, uint32 trigger) @@ -269,7 +268,6 @@ void BattlegroundAB::SendNodeUpdate(uint8 node) void BattlegroundAB::NodeOccupied(uint8 node) { - ApplyPhaseMask(); AddSpiritGuide(node, BG_AB_SpiritGuidePos[node][0], BG_AB_SpiritGuidePos[node][1], BG_AB_SpiritGuidePos[node][2], BG_AB_SpiritGuidePos[node][3], _capturePointInfo[node]._ownerTeamId); ++_controlledPoints[_capturePointInfo[node]._ownerTeamId]; @@ -392,7 +390,6 @@ void BattlegroundAB::EventPlayerClickedOnFlag(Player* player, GameObject* gameOb _capturePointInfo[node]._state = static_cast(BG_AB_NODE_STATE_ALLY_CONTESTED) + player->GetTeamId(); - ApplyPhaseMask(); _bgEvents.RescheduleEvent(BG_AB_EVENT_CAPTURE_STABLE + node, BG_AB_FLAG_CAPTURING_TIME); sound = player->GetTeamId() == TEAM_ALLIANCE ? BG_AB_SOUND_NODE_ASSAULTED_ALLIANCE : BG_AB_SOUND_NODE_ASSAULTED_HORDE; @@ -547,19 +544,3 @@ bool BattlegroundAB::AllNodesConrolledByTeam(TeamId teamId) const { return _controlledPoints[teamId] == BG_AB_DYNAMIC_NODES_COUNT; } - -void BattlegroundAB::ApplyPhaseMask() -{ - uint32 phaseMask = 1; - for (uint32 i = BG_AB_NODE_STABLES; i < BG_AB_DYNAMIC_NODES_COUNT; ++i) - if (_capturePointInfo[i]._ownerTeamId != TEAM_NEUTRAL) - phaseMask |= 1 << (i * 2 + 1 + _capturePointInfo[i]._ownerTeamId); - - const BattlegroundPlayerMap& bgPlayerMap = GetPlayers(); - - for (auto const& itr : bgPlayerMap) - { - itr.second->SetPhaseMask(phaseMask, false); - itr.second->UpdateObjectVisibility(true, false); - } -} diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h index 72932386a..230292aa4 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h @@ -278,7 +278,6 @@ private: void SendNodeUpdate(uint8 node); void NodeOccupied(uint8 node); void NodeDeoccupied(uint8 node); - void ApplyPhaseMask(); struct CapturePointInfo {