mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
chore(Core/ScriptMgr):Add Hook OnBeforeFillQuestLootItem (#16509)
* chore(Core/ScriptMgr):Add Hook OnBeforeLootItem * Change name. Credit Anchy
This commit is contained in:
@@ -582,6 +582,14 @@ void ScriptMgr::OnLootItem(Player* player, Item* item, uint32 count, ObjectGuid
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnBeforeFillQuestLootItem(Player* player, LootItem& item)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
{
|
||||
script->OnBeforeFillQuestLootItem(player, item);
|
||||
});
|
||||
}
|
||||
|
||||
void ScriptMgr::OnStoreNewItem(Player* player, Item* item, uint32 count)
|
||||
{
|
||||
ExecuteScript<PlayerScript>([&](PlayerScript* script)
|
||||
|
||||
@@ -1181,6 +1181,9 @@ public:
|
||||
//After looting item
|
||||
virtual void OnLootItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, ObjectGuid /*lootguid*/) { }
|
||||
|
||||
//Before looting item
|
||||
virtual void OnBeforeFillQuestLootItem(Player* /*player*/, LootItem& /*item*/) { }
|
||||
|
||||
//After looting item (includes master loot).
|
||||
virtual void OnStoreNewItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { }
|
||||
|
||||
@@ -2290,6 +2293,7 @@ public: /* PlayerScript */
|
||||
void GetCustomArenaPersonalRating(Player const* player, uint8 slot, uint32& rating) const;
|
||||
void OnGetMaxPersonalArenaRatingRequirement(Player const* player, uint32 minSlot, uint32& maxArenaRating) const;
|
||||
void OnLootItem(Player* player, Item* item, uint32 count, ObjectGuid lootguid);
|
||||
void OnBeforeFillQuestLootItem(Player* player, LootItem& item);
|
||||
void OnStoreNewItem(Player* player, Item* item, uint32 count);
|
||||
void OnCreateItem(Player* player, Item* item, uint32 count);
|
||||
void OnQuestRewardItem(Player* player, Item* item, uint32 count);
|
||||
|
||||
Reference in New Issue
Block a user