mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 02:50:29 +00:00
feat(Scripting/Hooks): Add OnBeforeOpenItem Hook (#12576)
This commit is contained in:
@@ -1176,6 +1176,9 @@ public:
|
||||
// After receiving item as a group roll reward
|
||||
virtual void OnGroupRollRewardItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, RollVote /*voteType*/, Roll* /*roll*/) { }
|
||||
|
||||
//Before opening an item
|
||||
[[nodiscard]] virtual bool OnBeforeOpenItem(Player* /*player*/, Item* /*item*/) { return true; }
|
||||
|
||||
// After completed a quest
|
||||
[[nodiscard]] virtual bool OnBeforeQuestComplete(Player* /*player*/, uint32 /*quest_id*/) { return true; }
|
||||
|
||||
@@ -2252,6 +2255,7 @@ public: /* PlayerScript */
|
||||
void OnCreateItem(Player* player, Item* item, uint32 count);
|
||||
void OnQuestRewardItem(Player* player, Item* item, uint32 count);
|
||||
void OnGroupRollRewardItem(Player* player, Item* item, uint32 count, RollVote voteType, Roll* roll);
|
||||
bool OnBeforeOpenItem(Player* player, Item* item);
|
||||
bool OnBeforePlayerQuestComplete(Player* player, uint32 quest_id);
|
||||
void OnQuestComputeXP(Player* player, Quest const* quest, uint32& xpValue);
|
||||
void OnBeforePlayerDurabilityRepair(Player* player, ObjectGuid npcGUID, ObjectGuid itemGUID, float& discountMod, uint8 guildBank);
|
||||
|
||||
Reference in New Issue
Block a user