diff options
author | CraftedRO <24683355+CraftedRO@users.noreply.github.com> | 2024-11-15 16:45:53 +0200 |
---|---|---|
committer | Ovahlord <dreadkiller@gmx.de> | 2025-01-13 19:31:15 +0100 |
commit | 7aac50c888109182ab6e7871610124b17a0f54d1 (patch) | |
tree | f88263491d0cd45c90451c0c9d9be454905c2e80 /src/server/game/Spells/SpellEffects.cpp | |
parent | 5bb8b11f810bf81562d978dd3a1bd1324b993d2a (diff) |
Core/Spells: Allow persistent area auras to apply all of their effects upon creation. (#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>
(cherry picked from commit b6bb35bb9af9ae75463edd52bfbe5af0f46cd900)
(cherry picked from commit d8636d4cc603262da8454231d64bd09b604b25f7)
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 9d9463f072c..218b83bff43 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1520,7 +1520,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() |