Core/Scripts: Add SpellSC and new hook OnCalcMaxDuration

This commit is contained in:
Kargatum
2018-06-23 09:33:09 +07:00
committed by Barbz
parent e5d58de641
commit 7a5ed0c5bb
3 changed files with 36 additions and 0 deletions

View File

@@ -815,6 +815,8 @@ int32 Aura::CalcMaxDuration(Unit* caster) const
if (IsPassive() && !m_spellInfo->DurationEntry)
maxDuration = -1;
sScriptMgr->OnCalcMaxDuration(this, maxDuration);
// IsPermanent() checks max duration (which we are supposed to calculate here)
if (maxDuration != -1 && modOwner)
modOwner->ApplySpellMod(GetId(), SPELLMOD_DURATION, maxDuration);