aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundBE.cpp
diff options
context:
space:
mode:
authorwin32 <none@none>2009-12-16 23:23:42 +0200
committerwin32 <none@none>2009-12-16 23:23:42 +0200
commitf64a11dfdc1a09e5734e76e87279091af26b04d6 (patch)
tree03b0a3756d5a0801a51e708ffd1a9677570f7ac2 /src/game/BattleGroundBE.cpp
parentc645c993106cddf210d427ff74f8e0828e322dc2 (diff)
Restore work arena unit frame
Closes #289 --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundBE.cpp')
-rw-r--r--src/game/BattleGroundBE.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/game/BattleGroundBE.cpp b/src/game/BattleGroundBE.cpp
index c81042ec2e8..c20af53e013 100644
--- a/src/game/BattleGroundBE.cpp
+++ b/src/game/BattleGroundBE.cpp
@@ -82,8 +82,7 @@ void BattleGroundBE::AddPlayer(Player *plr)
m_PlayerScores[plr->GetGUID()] = sc;
- UpdateWorldState(0x9f1, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(0x9f0, GetAlivePlayersCountByTeam(HORDE));
+ UpdateArenaUnitWorldState();
}
void BattleGroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
@@ -91,9 +90,7 @@ void BattleGroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
if (GetStatus() == STATUS_WAIT_LEAVE)
return;
- UpdateWorldState(0x9f1, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(0x9f0, GetAlivePlayersCountByTeam(HORDE));
-
+ UpdateArenaUnitWorldState();
CheckArenaWinConditions();
}
@@ -110,9 +107,7 @@ void BattleGroundBE::HandleKillPlayer(Player *player, Player *killer)
BattleGround::HandleKillPlayer(player,killer);
- UpdateWorldState(0x9f1, GetAlivePlayersCountByTeam(ALLIANCE));
- UpdateWorldState(0x9f0, GetAlivePlayersCountByTeam(HORDE));
-
+ UpdateArenaUnitWorldState();
CheckArenaWinConditions();
}
@@ -150,9 +145,9 @@ void BattleGroundBE::HandleAreaTrigger(Player *Source, uint32 Trigger)
void BattleGroundBE::FillInitialWorldStates(WorldPacket &data)
{
- data << uint32(0x9f1) << uint32(GetAlivePlayersCountByTeam(ALLIANCE)); // 7
- data << uint32(0x9f0) << uint32(GetAlivePlayersCountByTeam(HORDE)); // 8
data << uint32(0x9f3) << uint32(1); // 9
+
+ UpdateArenaUnitWorldState();
}
void BattleGroundBE::Reset()