diff --git a/Source/Game/Spells/Auras/Aura.cs b/Source/Game/Spells/Auras/Aura.cs index 2eb21fd3a..c49e284a3 100644 --- a/Source/Game/Spells/Auras/Aura.cs +++ b/Source/Game/Spells/Auras/Aura.cs @@ -851,9 +851,6 @@ namespace Game.Spells { // Pandemic doesn't reset periodic timer resetPeriodicTimer = false; - - int pandemicDuration = MathFunctions.CalculatePct(m_maxDuration, 30.0f); - m_maxDuration = Math.Max(GetDuration(), Math.Min(pandemicDuration, GetDuration()) + m_maxDuration); } RefreshDuration(); @@ -3100,7 +3097,6 @@ namespace Game.Spells public void SetBaseAmount(int[] bp) { BaseAmount = bp; } public void SetCastItem(ObjectGuid guid, uint itemId, int itemLevel) { CastItemGUID = guid; CastItemId = itemId; CastItemLevel = itemLevel; } public void SetPeriodicReset(bool reset) { ResetPeriodicTimer = reset; } - public void SetIsRefresh(bool isRefresh) { IsRefresh = isRefresh; } public void SetStackAmount(int stackAmount) { StackAmount = stackAmount > 0 ? stackAmount : 1; } public void SetOwnerEffectMask(uint effMask) { _targetEffectMask = effMask; } public void SetAuraEffectMask(uint effMask) { _auraEffectMask = effMask; } diff --git a/Source/Game/Spells/Spell.cs b/Source/Game/Spells/Spell.cs index c0d4368b8..4d54e22e4 100644 --- a/Source/Game/Spells/Spell.cs +++ b/Source/Game/Spells/Spell.cs @@ -2392,6 +2392,12 @@ namespace Game.Spells if (hitInfo.AuraDuration == 0) hitInfo.AuraDuration = (int)(origDuration * m_originalCaster.m_unitData.ModCastingSpeed); } + + if (createInfo.IsRefresh && m_spellInfo.HasAttribute(SpellAttr13.PeriodicRefreshExtendsDuration)) + { + int newDuration = hitInfo.AuraDuration + hitInfo.HitAura.GetDuration(); + hitInfo.AuraDuration = Math.Min(newDuration, MathFunctions.CalculatePct(hitInfo.AuraDuration, 130)); + } } } else