diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index e82254754..32753eaff 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -275,17 +275,6 @@ namespace Game.Spells return; } } - if (m_spellInfo.HasAttribute(SpellAttr2.FailOnAllTargetsImmune)) - { - bool anyNonImmuneTargetFound = m_UniqueTargetInfo.Any(target => (target.EffectMask & 1 << (int)spellEffectInfo.EffectIndex) != 0 && target.MissCondition != SpellMissInfo.Immune && target.MissCondition != SpellMissInfo.Immune2); - - if (!anyNonImmuneTargetFound) - { - SendCastResult(SpellCastResult.Immune); - Finish(SpellCastResult.Immune); - return; - } - } } if (m_spellInfo.IsChanneled()) @@ -310,6 +299,18 @@ namespace Game.Spells } } + if (m_spellInfo.HasAttribute(SpellAttr2.FailOnAllTargetsImmune)) + { + bool anyNonImmuneTargetFound = m_UniqueTargetInfo.Any(target => target.MissCondition != SpellMissInfo.Immune && target.MissCondition != SpellMissInfo.Immune2); + + if (!anyNonImmuneTargetFound) + { + SendCastResult(SpellCastResult.Immune); + Finish(SpellCastResult.Immune); + return; + } + } + if (m_targets.HasDst()) { if (m_spellInfo.HasAttribute(SpellAttr8.RequiresLocationToBeOnLiquidSurface))