Skip to content

Commit 760ef3b

Browse files
author
Github Actions
committed
Merge 3.3.5 to 3.3.5-base_patch
2 parents f17cf35 + 4bec944 commit 760ef3b

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

src/server/game/Spells/SpellEffects.cpp

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,18 +1566,24 @@ void Spell::EffectPersistentAA()
15661566
if (!unitCaster)
15671567
return;
15681568

1569+
// Caster not in world, might be spell triggered from aura removal
1570+
if (!unitCaster->IsInWorld())
1571+
return;
1572+
15691573
// only handle at last effect
15701574
for (size_t i = effectInfo->EffectIndex + 1; i < m_spellInfo->GetEffects().size(); ++i)
15711575
if (m_spellInfo->GetEffect(SpellEffIndex(i)).IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
15721576
return;
15731577

15741578
ASSERT(!_dynObjAura);
15751579

1576-
float radius = effectInfo->CalcRadius(unitCaster);
1577-
1578-
// Caster not in world, might be spell triggered from aura removal
1579-
if (!unitCaster->IsInWorld())
1580-
return;
1580+
float radius = 0.0f;
1581+
for (size_t i = 0; i <= effectInfo->EffectIndex; ++i)
1582+
{
1583+
SpellEffectInfo const& spellEffectInfo = m_spellInfo->GetEffect(SpellEffIndex(i));
1584+
if (spellEffectInfo.IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
1585+
radius = std::max(radius, spellEffectInfo.CalcRadius(unitCaster));
1586+
}
15811587

15821588
DynamicObject* dynObj = new DynamicObject(false);
15831589
if (!dynObj->CreateDynamicObject(unitCaster->GetMap()->GenerateLowGuid<HighGuid::DynamicObject>(), unitCaster, m_spellInfo->Id, *destTarget, radius, DYNAMIC_OBJECT_AREA_SPELL))

0 commit comments

Comments
 (0)