mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 10:00:28 +00:00
feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook (#12316)
* feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook * reverse logic
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user