mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 09:17:18 +00:00
feat(Core/Scripting): Implement OnAllowedToLootContainerCheck() hook (#17209)
* chore(Core/Loot): Move OnAllowedForPlayerLootCheck() hook call up * Revert "chore(Core/Loot): Move OnAllowedForPlayerLootCheck() hook call up" This reverts commit f841ef9da313976179fb788d9573ff8ced05ecb9. * feat(Core/Scripting): Implement OnAllowedToLootContainerCheck() hook * Update GlobalScript.cpp
This commit is contained in:
@@ -8041,6 +8041,12 @@ void Player::SendLoot(ObjectGuid guid, LootType loot_type)
|
||||
// need know merged fishing/corpse loot type for achievements
|
||||
loot->loot_type = loot_type;
|
||||
|
||||
if (!sScriptMgr->OnAllowedToLootContainerCheck(this, guid))
|
||||
{
|
||||
SendLootError(guid, LOOT_ERROR_DIDNT_KILL);
|
||||
return;
|
||||
}
|
||||
|
||||
if (permission != NONE_PERMISSION)
|
||||
{
|
||||
SetLootGUID(guid);
|
||||
|
||||
Reference in New Issue
Block a user