aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundBE.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-09 16:36:58 -0600
committermegamage <none@none>2009-03-09 16:36:58 -0600
commitf477021938b086080f7f5370e854b3a63f5900fd (patch)
treea58554823533ff057a0f0ef8891a32b9d3e8e0ed /src/game/BattleGroundBE.cpp
parent2b5805065db7ee3a04fdf86e91c961bf7a0c70b5 (diff)
[7404] Fixed cheating in rated arena matches by alt+f4. Author: Triply
--HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundBE.cpp')
-rw-r--r--src/game/BattleGroundBE.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/game/BattleGroundBE.cpp b/src/game/BattleGroundBE.cpp
index 9e976ac7330..f417c353c1c 100644
--- a/src/game/BattleGroundBE.cpp
+++ b/src/game/BattleGroundBE.cpp
@@ -94,10 +94,7 @@ void BattleGroundBE::RemovePlayer(Player* /*plr*/, uint64 /*guid*/)
UpdateWorldState(0x9f1, GetAlivePlayersCountByTeam(ALLIANCE));
UpdateWorldState(0x9f0, GetAlivePlayersCountByTeam(HORDE));
- if(!GetAlivePlayersCountByTeam(ALLIANCE) && GetPlayersCountByTeam(HORDE))
- EndBattleGround(HORDE);
- else if(GetPlayersCountByTeam(ALLIANCE) && !GetAlivePlayersCountByTeam(HORDE))
- EndBattleGround(ALLIANCE);
+ CheckArenaWinConditions();
}
void BattleGroundBE::HandleKillPlayer(Player *player, Player *killer)
@@ -116,16 +113,7 @@ void BattleGroundBE::HandleKillPlayer(Player *player, Player *killer)
UpdateWorldState(0x9f1, GetAlivePlayersCountByTeam(ALLIANCE));
UpdateWorldState(0x9f0, GetAlivePlayersCountByTeam(HORDE));
- if(!GetAlivePlayersCountByTeam(ALLIANCE))
- {
- // all opponents killed
- EndBattleGround(HORDE);
- }
- else if(!GetAlivePlayersCountByTeam(HORDE))
- {
- // all opponents killed
- EndBattleGround(ALLIANCE);
- }
+ CheckArenaWinConditions();
}
bool BattleGroundBE::HandlePlayerUnderMap(Player *player)