diff --git a/zone/beacon.cpp b/zone/beacon.cpp index e5ea9f38f..36075dca5 100644 --- a/zone/beacon.cpp +++ b/zone/beacon.cpp @@ -96,7 +96,9 @@ bool Beacon::Process() Mob *caster = entity_list.GetMob(caster_id); if(caster && spell_iterations-- && max_targets) { - bool affect_caster = (!caster->IsNPC() && !caster->IsAIControlled()); //NPC AE spells do not affect the NPC caster + // NPCs should never be affected by an AE they cast. PB AEs shouldn't affect caster either + // I don't think any other cases that get here matter + bool affect_caster = (!caster->IsNPC() && !caster->IsAIControlled()) && spells[spell_id].targettype != ST_AECaster; entity_list.AESpell(caster, this, spell_id, affect_caster, resist_adjust, &max_targets); } else diff --git a/zone/spells.cpp b/zone/spells.cpp index 65626d43b..58121a760 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -2241,7 +2241,9 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui if(ae_center && ae_center == this && IsBeneficialSpell(spell_id)) SpellOnTarget(spell_id, this); - bool affect_caster = !IsNPC(); //NPC AE spells do not affect the NPC caster + // NPCs should never be affected by an AE they cast. PB AEs shouldn't affect caster either + // I don't think any other cases that get here matter + bool affect_caster = !IsNPC() && spells[spell_id].targettype != ST_AECaster; if (spells[spell_id].targettype == ST_AETargetHateList) hate_list.SpellCast(this, spell_id, spells[spell_id].aoerange, ae_center);