From 894edcaafe2ff99deaa687adc05d725c4eb62ebd Mon Sep 17 00:00:00 2001 From: Kapoeira Date: Thu, 12 Jan 2012 02:05:11 -0500 Subject: Scripts/Arenas: Fix some typos in the last commit. I should stop hitting the Commit button as soon as possible. --- src/server/game/Battlegrounds/Battleground.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 36c9fe17ea5..59cfed42ab2 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -771,6 +771,7 @@ void Battleground::EndBattleground(uint32 winner) } } + uint8 aliveWinners = GetAlivePlayersCountByTeam(winner); for (BattlegroundPlayerMap::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr) { uint32 team = itr->second.Team; @@ -793,7 +794,7 @@ void Battleground::EndBattleground(uint32 winner) continue; // Last standing - Rated 5v5 arena & be solely alive player - if (team == winner && isArena() && isRated() && GetArenaType() == ARENA_TYPE_5v5 && GetAlivePlayersCountByTeam(winner) == 1 && player->isAlive()) + if (team == winner && isArena() && isRated() && GetArenaType() == ARENA_TYPE_5v5 && aliveWinners == 1 && player->isAlive()) player->CastSpell(player, SPELL_THE_LAST_STANDING, true); // should remove spirit of redemption -- cgit v1.2.3