Core/Spells: Rename SpellAttr5 to use official attribute names
Port From (https://github.com/TrinityCore/TrinityCore/commit/738f285432b1ef6109d1c54ab7f40d743a994631)
This commit is contained in:
@@ -246,7 +246,7 @@ namespace Game.Spells
|
||||
auraData.SpellID = (int)aura.GetId();
|
||||
auraData.Visual = aura.GetSpellVisual();
|
||||
auraData.Flags = GetFlags();
|
||||
if (aura.GetAuraType() != AuraObjectType.DynObj && aura.GetMaxDuration() > 0 && !aura.GetSpellInfo().HasAttribute(SpellAttr5.HideDuration))
|
||||
if (aura.GetAuraType() != AuraObjectType.DynObj && aura.GetMaxDuration() > 0 && !aura.GetSpellInfo().HasAttribute(SpellAttr5.DoNotDisplayDuration))
|
||||
auraData.Flags |= AuraFlags.Duration;
|
||||
|
||||
auraData.ActiveFlags = GetEffectMask();
|
||||
@@ -788,7 +788,7 @@ namespace Game.Spells
|
||||
{
|
||||
int duration = m_spellInfo.GetMaxDuration();
|
||||
// Calculate duration of periodics affected by haste.
|
||||
if (m_spellInfo.HasAttribute(SpellAttr5.HasteAffectDuration))
|
||||
if (m_spellInfo.HasAttribute(SpellAttr8.HasteAffectsDuration))
|
||||
duration = (int)(duration * caster.m_unitData.ModCastingSpeed);
|
||||
|
||||
SetMaxDuration(duration);
|
||||
|
||||
@@ -158,7 +158,7 @@ namespace Game.Spells
|
||||
if (_period != 0 && !GetBase().IsPermanent())
|
||||
{
|
||||
totalTicks = (uint)(GetBase().GetMaxDuration() / _period);
|
||||
if (m_spellInfo.HasAttribute(SpellAttr5.StartPeriodicAtApply))
|
||||
if (m_spellInfo.HasAttribute(SpellAttr5.ExtraInitialPeriod))
|
||||
++totalTicks;
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ namespace Game.Spells
|
||||
{
|
||||
_periodicTimer = 0;
|
||||
// Start periodic on next tick or at aura apply
|
||||
if (m_spellInfo.HasAttribute(SpellAttr5.StartPeriodicAtApply))
|
||||
if (m_spellInfo.HasAttribute(SpellAttr5.ExtraInitialPeriod))
|
||||
_periodicTimer = _period;
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,7 @@ namespace Game.Spells
|
||||
// Haste modifies periodic time of channeled spells
|
||||
if (m_spellInfo.IsChanneled())
|
||||
caster.ModSpellDurationTime(m_spellInfo, ref _period);
|
||||
else if (m_spellInfo.HasAttribute(SpellAttr5.HasteAffectDuration))
|
||||
else if (m_spellInfo.HasAttribute(SpellAttr5.SpellHasteAffectsPeriodic))
|
||||
_period = (int)(_period * caster.m_unitData.ModCastingSpeed);
|
||||
}
|
||||
}
|
||||
@@ -238,7 +238,7 @@ namespace Game.Spells
|
||||
_periodicTimer = (int)(elapsedTime % _period);
|
||||
}
|
||||
|
||||
if (m_spellInfo.HasAttribute(SpellAttr5.StartPeriodicAtApply))
|
||||
if (m_spellInfo.HasAttribute(SpellAttr5.ExtraInitialPeriod))
|
||||
++_ticksDone;
|
||||
}
|
||||
else // aura just created or reapplied
|
||||
|
||||
Reference in New Issue
Block a user