aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/Spell.cpp
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2018-03-18 15:36:37 -0300
committerariel- <ariel-@users.noreply.github.com>2018-03-18 15:36:37 -0300
commit437c5c7b9d2122f7b1f46fd4e0f502c8be1e3091 (patch)
treeb916e9cb878a7b7798f062b9c3b5dbf2d68e889a /src/server/game/Spells/Spell.cpp
parent4fe960b9e87174233d1fec9734bf34f38ad2cc5f (diff)
Core/Spells: fix delayed hit aura crash
Closes #21664
Diffstat (limited to 'src/server/game/Spells/Spell.cpp')
-rw-r--r--src/server/game/Spells/Spell.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index d4c42db9563..99d05a50b63 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2556,9 +2556,9 @@ void Spell::TargetInfo::DoDamageAndTriggers(Spell* spell)
else if (spell->m_caster->GetTypeId() == TYPEID_GAMEOBJECT && spell->m_caster->ToGameObject()->AI())
spell->m_caster->ToGameObject()->AI()->SpellHitTarget(_spellHitTarget, spell->m_spellInfo);
- if (spell->_spellAura)
+ if (HitAura)
{
- if (AuraApplication* aurApp = spell->_spellAura->GetApplicationOfTarget(_spellHitTarget->GetGUID()))
+ if (AuraApplication* aurApp = HitAura->GetApplicationOfTarget(_spellHitTarget->GetGUID()))
{
// only apply unapplied effects (for reapply case)
uint8 effMask = EffectMask & aurApp->GetEffectsToApply();
@@ -2820,7 +2820,10 @@ void Spell::DoSpellEffectHit(Unit* unit, uint8 effIndex, TargetInfo& hitInfo)
}
}
else
+ {
+ hitInfo.HitAura = _spellAura;
_spellAura->AddStaticApplication(unit, aura_effmask);
+ }
}
}