aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundRV.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/BattleGroundRV.cpp')
-rw-r--r--src/game/BattleGroundRV.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/game/BattleGroundRV.cpp b/src/game/BattleGroundRV.cpp
index 39ff09fe521..16bdd54ade1 100644
--- a/src/game/BattleGroundRV.cpp
+++ b/src/game/BattleGroundRV.cpp
@@ -120,8 +120,7 @@ void BattleGroundRV::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
- UpdateWorldState(BG_RV_WORLD_STATE_A, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(BG_RV_WORLD_STATE_H, GetAlivePlayersCountByTeam(HORDE));
+ UpdateArenaUnitWorldState();
}
void BattleGroundRV::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
@@ -129,9 +128,7 @@ void BattleGroundRV::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
- UpdateWorldState(BG_RV_WORLD_STATE_A, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(BG_RV_WORLD_STATE_H, GetAlivePlayersCountByTeam(HORDE));
-
+ UpdateArenaUnitWorldState();
CheckArenaWinConditions();
}
@@ -148,9 +145,7 @@ void BattleGroundRV::HandleKillPlayer(Player *player, Player *killer)
BattleGround::HandleKillPlayer(player, killer);
- UpdateWorldState(BG_RV_WORLD_STATE_A, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(BG_RV_WORLD_STATE_H, GetAlivePlayersCountByTeam(HORDE));
-
+ UpdateArenaUnitWorldState();
CheckArenaWinConditions();
}
@@ -180,9 +175,9 @@ void BattleGroundRV::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattleGroundRV::FillInitialWorldStates(WorldPacket &data)
{
- data << uint32(BG_RV_WORLD_STATE_A) << uint32(GetAlivePlayersCountByTeam(ALLIANCE));
- data << uint32(BG_RV_WORLD_STATE_H) << uint32(GetAlivePlayersCountByTeam(HORDE));
data << uint32(BG_RV_WORLD_STATE) << uint32(1);
+
+ UpdateArenaUnitWorldState();
}
void BattleGroundRV::Reset()