feat(Core/Scripting): Implement OnIsAffectedBySpellModCheck hook (#9903)
This commit is contained in:
parent
53a6fb7513
commit
24ab99919a
3 changed files with 33 additions and 1 deletions
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
#include "ScriptMgr.h"
|
||||
#include "ScriptMgrMacros.h"
|
||||
#include "Player.h"
|
||||
|
||||
void ScriptMgr::OnGlobalItemDelFromDB(CharacterDatabaseTransaction trans, ObjectGuid::LowType itemGuid)
|
||||
{
|
||||
|
|
@ -122,3 +123,18 @@ void ScriptMgr::OnBeforeWorldObjectSetPhaseMask(WorldObject const* worldObject,
|
|||
script->OnBeforeWorldObjectSetPhaseMask(worldObject, oldPhaseMask, newPhaseMask, useCombinedPhases, update);
|
||||
});
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnIsAffectedBySpellModCheck(SpellInfo const* affectSpell, SpellInfo const* checkSpell, SpellModifier const* mod)
|
||||
{
|
||||
auto ret = IsValidBoolScript<GlobalScript>([&](GlobalScript* script)
|
||||
{
|
||||
return !script->OnIsAffectedBySpellModCheck(affectSpell, checkSpell, mod);
|
||||
});
|
||||
|
||||
if (ret && *ret)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue