mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user