Skip to content

Commit

Permalink
Core/Spells: Allow persistent area auras to apply all of their effect…
Browse files Browse the repository at this point in the history
…s upon creation. (TrinityCore#30422)

This fixes the issue where the area auras do not instantly apply their effects.
Actually, they were only applying the last SPELL_EFFECT_PERSISTENT_AREA_AURA;
Flare and Frost Trap have 2 and 3 SPELL_EFFECT_PERSISTENT_AREA_AURA effects respectively, so only the last one would be applied.

Co-Authored-By: zana244 <50482785+zana244@users.noreply.github.com>
  • Loading branch information
CraftedRO and zana244 authored Nov 15, 2024
1 parent 3c9bf7b commit b6bb35b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,9 @@ void Spell::EffectPersistentAA()
return;

ASSERT(_dynObjAura->GetDynobjOwner());
_dynObjAura->_ApplyEffectForTargets(effectInfo->EffectIndex);
for (size_t i = 0; i < m_spellInfo->GetEffects().size(); ++i)
if (m_spellInfo->GetEffect(SpellEffIndex(i)).IsEffect(SPELL_EFFECT_PERSISTENT_AREA_AURA))
_dynObjAura->_ApplyEffectForTargets(i);
}

void Spell::EffectEnergize()
Expand Down

0 comments on commit b6bb35b

Please sign in to comment.