[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

@ -92,10 +92,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)
@ -114,16 +111,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)