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.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/game/BattleGroundRL.cpp b/src/game/BattleGroundRL.cpp
index 7ac6d4d1cd5..0e764d3f4c7 100644
--- a/src/game/BattleGroundRL.cpp
+++ b/src/game/BattleGroundRL.cpp
@@ -91,10 +91,7 @@ void BattleGroundRL::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
UpdateWorldState(0xbb8, GetAlivePlayersCountByTeam(ALLIANCE));
UpdateWorldState(0xbb9, GetAlivePlayersCountByTeam(HORDE));
- if(!GetAlivePlayersCountByTeam(ALLIANCE) && GetPlayersCountByTeam(HORDE))
- EndBattleGround(HORDE);
- else if(GetPlayersCountByTeam(ALLIANCE) && !GetAlivePlayersCountByTeam(HORDE))
- EndBattleGround(ALLIANCE);
+ CheckArenaWinConditions();
}
void BattleGroundRL::HandleKillPlayer(Player *player, Player *killer)
@@ -113,16 +110,7 @@ void BattleGroundRL::HandleKillPlayer(Player *player, Player *killer)
UpdateWorldState(0xbb8, GetAlivePlayersCountByTeam(ALLIANCE));
UpdateWorldState(0xbb9, GetAlivePlayersCountByTeam(HORDE));
- if(!GetAlivePlayersCountByTeam(ALLIANCE))
- {
- // all opponents killed
- EndBattleGround(HORDE);
- }
- else if(!GetAlivePlayersCountByTeam(HORDE))
- {
- // all opponents killed
- EndBattleGround(ALLIANCE);
- }
+ CheckArenaWinConditions();
}
bool BattleGroundRL::HandlePlayerUnderMap(Player *player)