From 53876e20720b142bc6d3eb6ee80f1670ebcd8026 Mon Sep 17 00:00:00 2001 From: nytmyr <53322305+nytmyr@users.noreply.github.com> Date: Sun, 2 Feb 2025 08:39:23 -0600 Subject: [PATCH] Cleanup DetermineSpellTargets->ST_Self for bot summon corpse --- zone/spells.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 65c73ed2f..546fb32ac 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -1919,14 +1919,12 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce // single target spells case ST_Self: { - if ( - !( - IsBot() && - IsEffectInSpell(spell_id, SE_SummonCorpse) && - RuleB(Bots, AllowCommandedSummonCorpse) - ) - ) { // summon corpse spells are self only, bots need a fallthrough to summon corpses - spell_target = this; + bool bot_can_summon_corpse = IsBot() && + IsEffectInSpell(spell_id, SE_SummonCorpse) && + RuleB(Bots, AllowCommandedSummonCorpse); + + if (!bot_can_summon_corpse) { + spell_target = this; // Summon corpse spells are self-only; bots need a fallthrough } CastAction = SingleTarget;