feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook (#12316)
* feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook * reverse logic
This commit is contained in:
parent
5dec721a71
commit
32ba21d029
9 changed files with 47 additions and 18 deletions
|
|
@ -161,3 +161,18 @@ void ScriptMgr::OnLoadSpellCustomAttr(SpellInfo* spell)
|
|||
script->OnLoadSpellCustomAttr(spell);
|
||||
});
|
||||
}
|
||||
|
||||
bool ScriptMgr::OnAllowedForPlayerLootCheck(Player const* player, ObjectGuid source)
|
||||
{
|
||||
auto ret = IsValidBoolScript<GlobalScript>([&](GlobalScript* script)
|
||||
{
|
||||
return script->OnAllowedForPlayerLootCheck(player, source);
|
||||
});
|
||||
|
||||
if (ret && *ret)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue