From 2c2f200e1437715be7246db9329f3c725d9f3402 Mon Sep 17 00:00:00 2001 From: Shauren Date: Mon, 8 Jun 2026 20:30:39 +0200 Subject: [PATCH] Core/Spells: DynamicObject auras will now use the largest radius found in SPELL_EFFECT_PERSISTENT_AREA_AURA effects of the spell creating them --- src/server/game/Spells/SpellEffects.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) 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))