Core/Auras: Fixed SPELL_ATTR13_PERIODIC_REFRESH_EXTENDS_DURATION

Port From (https://github.com/TrinityCore/TrinityCore/commit/92773e207c94e355fd37b266a219aad977cce9e2)
This commit is contained in:
Hondacrx
2025-08-09 21:45:16 -04:00
parent e48d7c9778
commit 37e7d86a2c
2 changed files with 6 additions and 4 deletions
+6
View File
@@ -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