Skip to content

Commit 937df1c

Browse files
author
Github Actions
committed
Merge 3.3.5-base_patch to 3.3.5-passive_anticheat
2 parents e9f05a4 + 760ef3b commit 937df1c

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
@@ -1576,18 +1576,24 @@ void Spell::EffectPersistentAA()
15761576
if (!unitCaster)
15771577
return;
15781578

1579+
// Caster not in world, might be spell triggered from aura removal
1580+
if (!unitCaster->IsInWorld())
1581+
return;
1582+
15791583
// only handle at last effect
15801584
for (size_t i = effectInfo->EffectIndex + 1; i < m_spellInfo->GetEffects().size(); ++i)
15811585
if (m_spellInfo->GetEffect(SpellEffIndex(i)).IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
15821586
return;
15831587

15841588
ASSERT(!_dynObjAura);
15851589

1586-
float radius = effectInfo->CalcRadius(unitCaster);
1587-
1588-
// Caster not in world, might be spell triggered from aura removal
1589-
if (!unitCaster->IsInWorld())
1590-
return;
1590+
float radius = 0.0f;
1591+
for (size_t i = 0; i <= effectInfo->EffectIndex; ++i)
1592+
{
1593+
SpellEffectInfo const& spellEffectInfo = m_spellInfo->GetEffect(SpellEffIndex(i));
1594+
if (spellEffectInfo.IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
1595+
radius = std::max(radius, spellEffectInfo.CalcRadius(unitCaster));
1596+
}
15911597

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

0 commit comments

Comments
 (0)