Core/Auras: Remove incorrect implementation of SPELL_ATTR8_DONT_RESET_PERIODIC_TIMER (this attribute does something else)
Port From (https://github.com/TrinityCore/TrinityCore/commit/799d63ce2cdf9b8cb7a74f9806178f9fefaba471)
This commit is contained in:
@@ -816,27 +816,6 @@ namespace Game.Spells
|
|||||||
void RefreshTimers(bool resetPeriodicTimer)
|
void RefreshTimers(bool resetPeriodicTimer)
|
||||||
{
|
{
|
||||||
m_maxDuration = CalcMaxDuration();
|
m_maxDuration = CalcMaxDuration();
|
||||||
if (m_spellInfo.HasAttribute(SpellAttr8.DontResetPeriodicTimer))
|
|
||||||
{
|
|
||||||
int minPeriod = m_maxDuration;
|
|
||||||
for (byte i = 0; i < SpellConst.MaxEffects; ++i)
|
|
||||||
{
|
|
||||||
AuraEffect eff = GetEffect(i);
|
|
||||||
if (eff != null)
|
|
||||||
{
|
|
||||||
int period = eff.GetPeriod();
|
|
||||||
if (period != 0)
|
|
||||||
minPeriod = Math.Min(period, minPeriod);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// If only one tick remaining, roll it over into new duration
|
|
||||||
if (GetDuration() <= minPeriod)
|
|
||||||
{
|
|
||||||
m_maxDuration += GetDuration();
|
|
||||||
resetPeriodicTimer = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RefreshDuration();
|
RefreshDuration();
|
||||||
Unit caster = GetCaster();
|
Unit caster = GetCaster();
|
||||||
|
|||||||
Reference in New Issue
Block a user