aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGround.cpp
diff options
context:
space:
mode:
authorTrazom62 <none@none>2010-02-25 00:26:47 +0100
committerTrazom62 <none@none>2010-02-25 00:26:47 +0100
commit3bbee4172ab475baf142779cd473416e380661c9 (patch)
tree89796958b0d606d06cb4de87e9ce15684c6fa9cd /src/game/BattleGround.cpp
parent1e7f50b3f60006c121b4523a06fd8f1bf4445cdf (diff)
Fix crash during BattleGround::EndBattleGround().
Fixes issue #885. + init FirstFlagCaptureTeam at bg reset. --HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r--src/game/BattleGround.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp
index b45a9961671..e2d6ac01778 100644
--- a/src/game/BattleGround.cpp
+++ b/src/game/BattleGround.cpp
@@ -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();