chore(Core/ScriptMgr):Add Hook OnBeforeFillQuestLootItem (#16509)

* chore(Core/ScriptMgr):Add Hook OnBeforeLootItem

* Change name. Credit Anchy
This commit is contained in:
Walter Pagani
2023-06-13 08:10:35 -03:00
committed by GitHub
parent a432316dec
commit c676a82837
3 changed files with 14 additions and 0 deletions

View File

@@ -679,6 +679,8 @@ QuestItemList* Loot::FillQuestLoot(Player* player)
{
LootItem& item = quest_items[i];
sScriptMgr->OnBeforeFillQuestLootItem(player, item);
// Quest item is not free for all and is already assigned to another player
// or player doesn't need it
if (item.is_blocked || !item.AllowedForPlayer(player, sourceWorldObjectGUID))