All pastes #1019206 Raw Edit

Unnamed

public text v1 · immutable
#1019206 ·published 2008-05-15 17:13 UTC
rendered paste body
+	// Check for Avoidance at last
+    for (int i=0;i<3;++i)
+    {
+        if(IsAreaEffectTarget(Targets(spell->EffectImplicitTargetA[i])) ||
+        IsAreaEffectTarget(Targets(spell->EffectImplicitTargetB[i])))
+        {
+            int32 avoidance = pVictim->GetTotalAuraModifier(SPELL_AURA_MOD_AOE_AVOIDANCE);
+
+            if (avoidance > 0 && roll_chance_i(avoidance))
+                return SPELL_MISS_RESIST;
+            // do not atempt to resist more than one time
+            break;
+        }
+    }
+
     // Temporary solution for melee based spells and spells vs SPELL_SCHOOL_NORMAL (hit result calculated after)
     for (int i=0;i<3;i++)
     {