Fix crash during BattleGround::EndBattleGround().
Fixes issue #885. + init FirstFlagCaptureTeam at bg reset. --HG-- branch : trunk
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user