From 1f978ffd72cd3120bb3cc4cb5e73b6305d05ab79 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Wed, 12 May 2021 20:13:05 -0400 Subject: [PATCH] [Bug Fix] EntityList::AESpell was off by one (#1351) We need to do the spell effect first, then check the limits --- zone/effects.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zone/effects.cpp b/zone/effects.cpp index b62a2b383..b095c84a3 100644 --- a/zone/effects.cpp +++ b/zone/effects.cpp @@ -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 */ @@ -926,9 +929,6 @@ void EntityList::AESpell( 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());