Fix crash during BattleGround::EndBattleGround().

Fixes issue #885.

+ init FirstFlagCaptureTeam at bg reset.

--HG--
branch : trunk
This commit is contained in:
Trazom62
2010-02-25 00:26:47 +01:00
parent 1e7f50b3f6
commit 3bbee4172a
2 changed files with 6 additions and 1 deletions
+5 -1
View File
@@ -749,7 +749,10 @@ void BattleGround::EndBattleGround(uint32 winner)
}
Player *plr = objmgr.GetPlayer(itr->first);
if (!plr)
{
sLog.outError("BattleGround:EndBattleGround Player (GUID: %u) not found!", GUID_LOPART(itr->first));
continue;
}
// should remove spirit of redemption
if(plr->HasAuraType(SPELL_AURA_SPIRIT_OF_REDEMPTION))
@@ -759,7 +762,8 @@ void BattleGround::EndBattleGround(uint32 winner)
{
plr->ResurrectPlayer(1.0f);
plr->SpawnCorpseBones();
}else
}
else
{
//needed cause else in av some creatures will kill the players at the end
plr->CombatStop();