From f64a11dfdc1a09e5734e76e87279091af26b04d6 Mon Sep 17 00:00:00 2001 From: win32 Date: Wed, 16 Dec 2009 23:23:42 +0200 Subject: Restore work arena unit frame Closes #289 --HG-- branch : trunk --- src/game/BattleGroundNA.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'src/game/BattleGroundNA.cpp') diff --git a/src/game/BattleGroundNA.cpp b/src/game/BattleGroundNA.cpp index cbf43117d0a..b08cdd1196e 100644 --- a/src/game/BattleGroundNA.cpp +++ b/src/game/BattleGroundNA.cpp @@ -79,8 +79,7 @@ void BattleGroundNA::AddPlayer(Player *plr) m_PlayerScores[plr->GetGUID()] = sc; - UpdateWorldState(0xa0f, GetAlivePlayersCountByTeam(ALLIANCE)); - UpdateWorldState(0xa10, GetAlivePlayersCountByTeam(HORDE)); + UpdateArenaUnitWorldState(); } void BattleGroundNA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/) @@ -88,9 +87,7 @@ void BattleGroundNA::RemovePlayer(Player* /*plr*/, uint64 /*guid*/) if (GetStatus() == STATUS_WAIT_LEAVE) return; - UpdateWorldState(0xa0f, GetAlivePlayersCountByTeam(ALLIANCE)); - UpdateWorldState(0xa10, GetAlivePlayersCountByTeam(HORDE)); - + UpdateArenaUnitWorldState(); CheckArenaWinConditions(); } @@ -107,9 +104,7 @@ void BattleGroundNA::HandleKillPlayer(Player *player, Player *killer) BattleGround::HandleKillPlayer(player,killer); - UpdateWorldState(0xa0f, GetAlivePlayersCountByTeam(ALLIANCE)); - UpdateWorldState(0xa10, GetAlivePlayersCountByTeam(HORDE)); - + UpdateArenaUnitWorldState(); CheckArenaWinConditions(); } @@ -143,9 +138,9 @@ void BattleGroundNA::HandleAreaTrigger(Player *Source, uint32 Trigger) void BattleGroundNA::FillInitialWorldStates(WorldPacket &data) { - data << uint32(0xa0f) << uint32(GetAlivePlayersCountByTeam(ALLIANCE)); // 7 - data << uint32(0xa10) << uint32(GetAlivePlayersCountByTeam(HORDE)); // 8 - data << uint32(0xa11) << uint32(1); // 9 + data << uint32(0xa11) << uint32(1); + + UpdateArenaUnitWorldState(); } void BattleGroundNA::Reset() -- cgit v1.2.3