aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent1e7f50b3f60006c121b4523a06fd8f1bf4445cdf (diff)
Fix crash during BattleGround::EndBattleGround().
Fixes issue #885. + init FirstFlagCaptureTeam at bg reset. --HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/BattleGround.cpp6
-rw-r--r--src/game/BattleGroundWS.cpp1
2 files changed, 6 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();
diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp
index d6b25bd2475..6ac73567b07 100644
--- a/src/game/BattleGroundWS.cpp
+++ b/src/game/BattleGroundWS.cpp
@@ -720,6 +720,7 @@ void BattleGroundWS::Reset()
m_HonorEndKills = (isBGWeekend) ? 4 : 2;
// For WorldState
m_minutesElapsed = 0;
+ m_FirstFlagCaptureTeam = 0;
/* Spirit nodes is static at this BG and then not required deleting at BG reset.
if (m_BgCreatures[WS_SPIRIT_MAIN_ALLIANCE])