diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 39604ab5f..5b2c1d968 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -405,7 +405,12 @@ m_updated(false), m_isRemovedOnShapeLost(true), m_in_use(false) Player* modOwner = caster ? caster->GetSpellModOwner() : NULL; if(!m_permanent && modOwner) + { modOwner->ApplySpellMod(GetId(), SPELLMOD_DURATION, m_maxduration); + // Get zero duration aura after - need set m_maxduration > 0 for apply/remove aura work + if (m_maxduration<=0) + m_maxduration = 1; + } m_duration = m_maxduration; @@ -1768,11 +1773,8 @@ void Aura::TriggerSpell() { // Invisibility case 66: - { - if(!m_duration) - m_target->CastSpell(m_target, 32612, true, NULL, this); + // Here need periodic triger reducing threat spell (or do it manually) return; - } default: break; } @@ -4036,6 +4038,11 @@ void Aura::HandleAuraModStalked(bool apply, bool Real) void Aura::HandlePeriodicTriggerSpell(bool apply, bool Real) { m_isPeriodic = apply; + if (m_spellProto->Id == 66 && !apply) + { + if (m_removeMode == AURA_REMOVE_BY_DEFAULT && m_duration<=0) + m_target->CastSpell(m_target, 32612, true, NULL, this); + } } void Aura::HandlePeriodicTriggerSpellWithValue(bool apply, bool Real)