diff options
| author | Shauren <none@none> | 2010-12-08 17:24:31 +0100 |
|---|---|---|
| committer | Shauren <none@none> | 2010-12-08 17:24:31 +0100 |
| commit | e4e048ed570e7723f6e9a38c9f5ba37f53811a21 (patch) | |
| tree | d9214512c5284bba720a29db7e3cd6385196fb1a /src/server/scripts/EasternKingdoms | |
| parent | 611dc153b05a7098daa7dd255524cd996645e6f0 (diff) | |
Core/Scripts: Fixed possible crashes in instance scripts (Icecrown Citadel and Naxxramas)
Scripts/Sunwell Plateau: Fixed crash in Kil'jaeden
Scripts/Icecrown Citadel: Fixed crash in Blood-Queen Lana'thel
Closes issue #5051.
Closes issue #5050.
Closes issue #5035.
--HG--
branch : trunk
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
| -rw-r--r-- | src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp index b89824b819b..05fd6881d85 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kiljaeden.cpp @@ -724,8 +724,9 @@ public: if (Speeches[speechCount].timer < SpeechTimer) { SpeechTimer = 0; - if (Creature* pSpeechCreature = Unit::GetCreature(*me, pInstance->GetData64(Speeches[speechCount].pCreature))) - DoScriptText(Speeches[speechCount].textid, pSpeechCreature); + if (pInstance) + if (Creature* pSpeechCreature = Unit::GetCreature(*me, pInstance->GetData64(Speeches[speechCount].pCreature))) + DoScriptText(Speeches[speechCount].textid, pSpeechCreature); if (speechCount == 12) if (Creature* pAnveena = Unit::GetCreature(*me, pInstance->GetData64(DATA_ANVEENA))) pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false); @@ -826,18 +827,19 @@ public: } break; case TIMER_ORBS_EMPOWER: //Phase 3 - if (Creature* pKalec = Unit::GetCreature(*me, pInstance->GetData64(DATA_KALECGOS_KJ))) - { - switch (Phase) + if (pInstance) + if (Creature* pKalec = Unit::GetCreature(*me, pInstance->GetData64(DATA_KALECGOS_KJ))) { + switch (Phase) + { case PHASE_SACRIFICE: CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->EmpowerOrb(true); break; default: CAST_AI(boss_kalecgos_kj::boss_kalecgos_kjAI, pKalec->AI())->EmpowerOrb(false); break; + } } - } OrbActivated = true; TimerIsDeactivated[TIMER_ORBS_EMPOWER] = true; break; |
