feat(Core/Scripting): Implement OnAuraApply() hook for unitscripts (#13658)

* feat(Core/Scripting): Implement OnAuraApply() hook for unitscripts

* fix build

* Update ScriptMgr.h
This commit is contained in:
Skjalf
2022-11-02 22:34:52 -03:00
committed by GitHub
parent ab3548e2e4
commit ef8d7f4ed9
3 changed files with 14 additions and 0 deletions

View File

@@ -4327,6 +4327,7 @@ Aura* Unit::_TryStackingOrRefreshingExistingAura(SpellInfo const* newAura, uint8
// try to increase stack amount
foundAura->ModStackAmount(1, AURA_REMOVE_BY_DEFAULT, periodicReset);
sScriptMgr->OnAuraApply(this, foundAura);
return foundAura;
}
}
@@ -4473,6 +4474,8 @@ void Unit::_ApplyAura(AuraApplication* aurApp, uint8 effMask)
if (effMask & 1 << i && (!aurApp->GetRemoveMode()))
aurApp->_HandleEffect(i, true);
}
sScriptMgr->OnAuraApply(this, aura);
}
// removes aura application from lists and unapplies effects