[7404] Fixed cheating in rated arena matches by alt+f4.

Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
Triply 2009-03-08 01:47:04 +01:00
parent 54f2dbefa0
commit 8a9942619b
7 changed files with 39 additions and 58 deletions

View file

@ -89,10 +89,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)
@ -111,16 +108,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)