diff options
| author | megamage <none@none.none> | 2011-09-26 09:03:33 -0400 |
|---|---|---|
| committer | megamage <none@none.none> | 2011-09-26 09:03:33 -0400 |
| commit | a35deba186bef436e68750d6c4f621cdc34c8a24 (patch) | |
| tree | 94a8c23ec5274b539116b14497032a1428598774 /src/server/scripts/Northrend | |
| parent | 738f94eed3a8e2b1c1659e0e973cfe3d4b28cfcb (diff) | |
Fix some crashes caused by spell scripts without checking unit type. Fix #3216 and #3217.
Diffstat (limited to 'src/server/scripts/Northrend')
| -rw-r--r-- | src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp index 7d355b2f71a..dcb5ae8faf7 100644 --- a/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp +++ b/src/server/scripts/Northrend/Nexus/Nexus/boss_keristrasza.cpp @@ -237,12 +237,12 @@ class spell_intense_cold : public SpellScriptLoader void HandlePeriodicTick(AuraEffect const* aurEff) { + if (aurEff->GetBase()->GetStackAmount() < 2) + return; Unit* caster = GetCaster(); - if (!caster) + if (!caster || !caster->GetAI()) return; - - if (aurEff->GetBase()->GetStackAmount() >= 2) - caster->GetAI()->SetGUID(GetTarget()->GetGUID(), DATA_INTENSE_COLD); + caster->GetAI()->SetGUID(GetTarget()->GetGUID(), DATA_INTENSE_COLD); } void Register() |
