Fix work for some auras if used mod set duration to 0 Author: DiSlord
--HG-- branch : trunk
This commit is contained in:
+11
-4
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user