aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPolarCookie <sei009@post.uit.no>2018-11-04 12:38:14 +0100
committerShauren <shauren.trinity@gmail.com>2021-11-15 22:13:17 +0100
commit87486cecffa9752c59cf8766757f79d2e528d152 (patch)
tree0d57cd8fe84f9da2375baf1bb97f0fa1c5f90b73
parent0585032c9000386846c506a360eddc09cf069afe (diff)
Core/Spells: fix issues with delayed spells and auras (#22382)
* Core/Spells: fix issues with delayed spells and auras * Make Travis Happy (cherry picked from commit a0999744ef02bf1494233411d873552d3d564d8a)
-rw-r--r--src/server/game/Spells/Spell.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 7e095a31639..fb1a81e91eb 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2841,14 +2841,7 @@ void Spell::DoSpellEffectHit(Unit* unit, SpellEffectInfo const& spellEffectInfo,
bool refresh = false;
// delayed spells with multiple targets need to create a new aura object, otherwise we'll access a deleted aura
- if (m_spellInfo->HasHitDelay() && !m_spellInfo->IsChanneled())
- {
- _spellAura = nullptr;
- if (Aura* aura = unit->GetAura(m_spellInfo->Id, caster->GetGUID(), m_CastItem ? m_CastItem->GetGUID() : ObjectGuid::Empty, aura_effmask))
- _spellAura = aura->ToUnitAura();
- }
-
- if (!_spellAura)
+ if (!_spellAura || (m_spellInfo->HasHitDelay() && !m_spellInfo->IsChanneled()))
{
bool const resetPeriodicTimer = !(_triggeredCastFlags & TRIGGERED_DONT_RESET_PERIODIC_TIMER);
uint32 const allAuraEffectMask = Aura::BuildEffectMaskForOwner(m_spellInfo, MAX_EFFECT_MASK, unit);