aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/SpellAuras.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 6c442963c3f..d5ceab4ef06 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -421,7 +421,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;
@@ -1635,11 +1640,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;
}
@@ -3880,6 +3882,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)