diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index d95854faef..927456b30a 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1519,6 +1519,10 @@ void Spell::EffectPersistentAA(SpellEffIndex effIndex) if (!unitCaster) return; + // Caster not in world, might be spell triggered from aura removal + if (!unitCaster->IsInWorld()) + return; + // only handle at last effect for (uint8 i = effIndex + 1; i < MAX_SPELL_EFFECTS; ++i) if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_PERSISTENT_AREA_AURA) @@ -1526,10 +1530,12 @@ void Spell::EffectPersistentAA(SpellEffIndex effIndex) ASSERT(!_dynObjAura); - float radius = m_spellInfo->Effects[effIndex].CalcRadius(unitCaster); - // Caster not in world, might be spell triggered from aura removal - if (!unitCaster->IsInWorld()) - return; + float radius = 0.0f; + for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i) + { + if (m_spellInfo->Effects[i].Effect == SPELL_EFFECT_PERSISTENT_AREA_AURA) + radius = std::max(radius, m_spellInfo->Effects[i].CalcRadius(unitCaster)); + } DynamicObject* dynObj = new DynamicObject(false); if (!dynObj->CreateDynamicObject(unitCaster->GetMap()->GenerateLowGuid(), unitCaster, m_spellInfo, *destTarget, radius, DYNAMIC_OBJECT_AREA_SPELL))