mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 21:56:22 +00:00
Core/Scripts: Add SpellSC and new hook OnCalcMaxDuration
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user