[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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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
*/
@ -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());