aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/server/game/Spells/Spell.cpp7
-rw-r--r--src/server/game/Spells/Spell.h1
2 files changed, 6 insertions, 2 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index c6a22ef199c..8e31536655f 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -2646,9 +2646,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)
uint32 effMask = EffectMask & aurApp->GetEffectsToApply();
@@ -2907,7 +2907,10 @@ void Spell::DoSpellEffectHit(Unit* unit, SpellEffectInfo const& spellEffectInfo,
}
}
else
+ {
+ hitInfo.HitAura = _spellAura;
_spellAura->AddStaticApplication(unit, aura_effmask);
+ }
}
}
diff --git a/src/server/game/Spells/Spell.h b/src/server/game/Spells/Spell.h
index faeaa0e8101..50b20f2f0b8 100644
--- a/src/server/game/Spells/Spell.h
+++ b/src/server/game/Spells/Spell.h
@@ -849,6 +849,7 @@ class TC_GAME_API Spell
int32 AuraDuration = 0;
int32 AuraBasePoints[MAX_SPELL_EFFECTS] = { };
bool Positive = true;
+ UnitAura* HitAura = nullptr;
private:
Unit* _spellHitTarget = nullptr; // changed for example by reflect