[Bug Fix] EntityList::AESpell was off by one (#1351)

We need to do the spell effect first, then check the limits
This commit is contained in:
Michael Cook (mackal)
2021-05-12 20:13:05 -04:00
committed by GitHub
parent 6ce273baf5
commit 1f978ffd72
+3 -3
View File
@@ -917,6 +917,9 @@ void EntityList::AESpell(
} }
} }
current_mob->CalcSpellPowerDistanceMod(spell_id, distance_to_target);
caster_mob->SpellOnTarget(spell_id, current_mob, false, true, resist_adjust);
/** /**
* Increment hit count if max targets * Increment hit count if max targets
*/ */
@@ -926,9 +929,6 @@ void EntityList::AESpell(
break; break;
} }
} }
current_mob->CalcSpellPowerDistanceMod(spell_id, distance_to_target);
caster_mob->SpellOnTarget(spell_id, current_mob, false, true, resist_adjust);
} }
LogAoeCast("Done iterating [{}]", caster_mob->GetCleanName()); LogAoeCast("Done iterating [{}]", caster_mob->GetCleanName());