Core/Spells: Implemented evoker empower spell mechanic

Port From (https://github.com/TrinityCore/TrinityCore/commit/a39d0db9ec64f6bf38716abaade5b7835f2db338)
This commit is contained in:
Hondacrx
2024-08-19 18:48:32 -04:00
parent 2405543be4
commit d231c06b8e
18 changed files with 616 additions and 89 deletions
+8 -2
View File
@@ -764,9 +764,15 @@ namespace Game.Spells
maxDuration = -1;
// IsPermanent() checks max duration (which we are supposed to calculate here)
if (maxDuration != -1 && modOwner != null)
modOwner.ApplySpellMod(spellInfo, SpellModOp.Duration, ref maxDuration);
if (maxDuration != -1)
{
if (modOwner != null)
modOwner.ApplySpellMod(spellInfo, SpellModOp.Duration, ref maxDuration);
if (spellInfo.IsEmpowerSpell())
maxDuration += (int)SpellConst.EmpowerHoldTimeAtMax;
}
return maxDuration;
}