diff options
author | maximius <none@none> | 2009-10-31 16:45:56 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-31 16:45:56 -0700 |
commit | 72ed3ff12d4069436c2ff99f3b18fdd80e691c0c (patch) | |
tree | 81ed32b41db68b857250c6b5f1d869673350e8fd /src | |
parent | a22da32a511448b273ec3b4a3d620202cf3a35f9 (diff) |
*Check for NULL unitTarget's in Cleansing Totem Effect, Healing Stream Totem, Mana Spring Totem, thanks Sisif
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/SpellEffects.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 50a59e1ea12..f7750590c9c 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -1881,19 +1881,21 @@ void Spell::EffectDummy(uint32 i) { int32 bp1 = 1; // Cleansing Totem Effect - m_caster->CastCustomSpell(unitTarget, 52025, NULL, &bp1, NULL, true, NULL, NULL, m_originalCasterGUID); + if (unitTarget) + m_caster->CastCustomSpell(unitTarget, 52025, NULL, &bp1, NULL, true, NULL, NULL, m_originalCasterGUID); return; } // Healing Stream Totem if(m_spellInfo->SpellFamilyFlags[0] & 0x2000) { - m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID); + if (unitTarget) + m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID); return; } // Mana Spring Totem if (m_spellInfo->SpellFamilyFlags[0] & 0x4000) { - if (unitTarget->getPowerType()!=POWER_MANA) + if (!unitTarget || unitTarget->getPowerType() != POWER_MANA) return; m_caster->CastCustomSpell(unitTarget, 52032, &damage, 0, 0, true, 0, 0, m_originalCasterGUID); return; |