diff options
Diffstat (limited to 'src/game/SpellAuras.cpp')
-rw-r--r-- | src/game/SpellAuras.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 8976aea2cb5..10028c9095a 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -376,6 +376,8 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false) m_positive = IsPositiveEffect(GetId(), m_effIndex); m_auraStateMask = 0; + m_isSingleTargetAura = IsSingleTargetSpell(m_spellProto); + m_applyTime = time(NULL); if(!caster) @@ -6726,3 +6728,21 @@ void Aura::HandlePhase(bool apply, bool Real) m_target->SetVisibility(m_target->GetVisibility()); } +void Aura::UnregisterSingleCastAura() +{ + if (IsSingleTarget()) + { + Unit* caster = NULL; + caster = GetCaster(); + if(caster) + { + caster->GetSingleCastAuras().remove(this); + } + else + { + sLog.outError("Couldn't find the caster of the single target aura, may crash later!"); + assert(false); + } + m_isSingleTargetAura = false; + } +} |