aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-15 17:16:11 -0600
committermegamage <none@none>2009-03-15 17:16:11 -0600
commit1a8528b3dbd448a89d6f518ea22d823d67d4a187 (patch)
tree619829ae5a3aa0df5b703972665894b2cbd426bf /src/game/BattleGround.cpp
parent681d1d171e2ec2e2e61e4447eeb580845288d82a (diff)
[7460] Fixed possible cheating in rated arena by ressurection after relog. Author: Triply
Fix: Do not allow to remove insignia from players in arena! Fixed ending arena match when last player of team logs out. --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r--src/game/BattleGround.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index 1cc510a35f2..f542ff1f145 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -1208,7 +1208,11 @@ void BattleGround::EventPlayerLoggedOut(Player* player)
if( isBattleGround() )
EventPlayerDroppedFlag(player);
else
- CheckArenaWinConditions();
+ {
+ //1 player is logging out, if it is the last, then end arena!
+ if( GetAlivePlayersCountByTeam(player->GetTeam()) <= 1 && GetPlayersCountByTeam(GetOtherTeam(player->GetTeam())) )
+ EndBattleGround(GetOtherTeam(player->GetTeam()));
+ }
}
}
@@ -1702,8 +1706,9 @@ void BattleGround::HandleKillPlayer( Player *player, Player *killer )
}
}
- // to be able to remove insignia
- player->SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE );
+ // to be able to remove insignia -- ONLY IN BattleGrounds
+ if( !isArena() )
+ player->SetFlag( UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE );
}
// return the player's team based on battlegroundplayer info