aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundRL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/BattleGroundRL.cpp')
-rw-r--r--src/game/BattleGroundRL.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/game/BattleGroundRL.cpp b/src/game/BattleGroundRL.cpp
index 2890f3698d6..8ed8fd1b5b7 100644
--- a/src/game/BattleGroundRL.cpp
+++ b/src/game/BattleGroundRL.cpp
@@ -79,8 +79,7 @@ void BattleGroundRL::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
- UpdateWorldState(0xbb8, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(0xbb9, GetAlivePlayersCountByTeam(HORDE));
+ UpdateArenaUnitWorldState();
}
void BattleGroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
@@ -88,9 +87,7 @@ void BattleGroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
- UpdateWorldState(0xbb8, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(0xbb9, GetAlivePlayersCountByTeam(HORDE));
-
+ UpdateArenaUnitWorldState();
CheckArenaWinConditions();
}
@@ -107,9 +104,7 @@ void BattleGroundRL::HandleKillPlayer(Player *player, Player *killer)
BattleGround::HandleKillPlayer(player,killer);
- UpdateWorldState(0xbb8, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(0xbb9, GetAlivePlayersCountByTeam(HORDE));
-
+ UpdateArenaUnitWorldState();
CheckArenaWinConditions();
}
@@ -144,9 +139,9 @@ void BattleGroundRL::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattleGroundRL::FillInitialWorldStates(WorldPacket &data)
{
- data << uint32(0xbb8) << uint32(GetAlivePlayersCountByTeam(ALLIANCE)); // 7
- data << uint32(0xbb9) << uint32(GetAlivePlayersCountByTeam(HORDE)); // 8
- data << uint32(0xbba) << uint32(1); // 9
+ data << uint32(0xbba) << uint32(1);
+
+ UpdateArenaUnitWorldState();
}
void BattleGroundRL::Reset()