diff options
author | megamage <none@none> | 2008-11-22 14:33:32 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-22 14:33:32 -0600 |
commit | d720a80e5c3820e317152fe9aa339b9bd2a860cb (patch) | |
tree | 5c19cdc981e6ab9a4f094df8974ec070e33c9933 /src | |
parent | e2b90f8dc0b312d3ba31c2a1f6c62d92d55e3fb8 (diff) |
*Let Mass Dispel dispel immune auras. By QAston.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/Spell.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 0c1f25964a9..70a9ca94560 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -928,6 +928,23 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target) return; SpellMissInfo missInfo = target->missCondition; + + //if target is immune to spell + if (missInfo == SPELL_MISS_IMMUNE) + { + uint32 t_mask =0; + for (uint32 i=0;i<3;i++) + //and this spell triggers another spell (not aura) + if (m_spellInfo->Effect[i]==SPELL_EFFECT_TRIGGER_SPELL) + t_mask |=1<<i; + if (t_mask) + { + //let the spell trigger it + missInfo = SPELL_MISS_NONE; + mask=t_mask; + } + } + // Need init unitTarget by default unit (can changed in code on reflect) // Or on missInfo!=SPELL_MISS_NONE unitTarget undefined (but need in trigger subsystem) unitTarget = unit; |