aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-02-17 14:52:46 -0600
committermegamage <none@none>2009-02-17 14:52:46 -0600
commit89e07d7c41698c1594e7d5ca947315f1441d064d (patch)
tree3c9ffd9cc04fea341a8857411d9e7c24ee261c32 /src
parentd73b38f0fa09b68489c8407dee59804272ce9dd8 (diff)
Fix work for some auras if used mod set duration to 0 Author: DiSlord
--HG-- branch : trunk
Diffstat (limited to 'src')
-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)