Core/Auras: Implement SPELL_ATTR13_PERIODIC_REFRESH_EXTENDS_DURATION
Port From (https://github.com/TrinityCore/TrinityCore/commit/e1f345756ba34ccf4d4dd07b90c254097a240b51)
This commit is contained in:
@@ -817,7 +817,18 @@ namespace Game.Spells
|
|||||||
{
|
{
|
||||||
m_maxDuration = CalcMaxDuration();
|
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();
|
RefreshDuration();
|
||||||
|
|
||||||
Unit caster = GetCaster();
|
Unit caster = GetCaster();
|
||||||
for (byte i = 0; i < SpellConst.MaxEffects; ++i)
|
for (byte i = 0; i < SpellConst.MaxEffects; ++i)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user