Core/Auras: Implement SPELL_ATTR13_PERIODIC_REFRESH_EXTENDS_DURATION

Port From (https://github.com/TrinityCore/TrinityCore/commit/e1f345756ba34ccf4d4dd07b90c254097a240b51)
This commit is contained in:
hondacrx
2024-01-30 09:39:40 -05:00
parent 5010d90d05
commit 902b217d88
+11
View File
@@ -817,7 +817,18 @@ namespace Game.Spells
{
m_maxDuration = CalcMaxDuration();
// Pandemic Mechanic
if (m_spellInfo.HasAttribute(SpellAttr13.PeriodicRefreshExtendsDuration))
{
// 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();
Unit caster = GetCaster();
for (byte i = 0; i < SpellConst.MaxEffects; ++i)
{