feat: Add CanPlaceAuctionBid hook (#15154)

* feat: Add CanPlaceAuctionBid hook

* Codestyle fix
This commit is contained in:
ZhengPeiRu21
2023-04-17 18:06:04 -06:00
committed by GitHub
parent 9af9208d16
commit 5af67b384b
3 changed files with 25 additions and 0 deletions

View File

@@ -1190,6 +1190,9 @@ public:
// After receiving item as a quest reward
virtual void OnQuestRewardItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/) { }
// When placing a bid or buying out an auction
[[nodiscard]] virtual bool CanPlaceAuctionBid(Player* /*player*/, AuctionEntry* /*auction*/) { return true; }
// After receiving item as a group roll reward
virtual void OnGroupRollRewardItem(Player* /*player*/, Item* /*item*/, uint32 /*count*/, RollVote /*voteType*/, Roll* /*roll*/) { }
@@ -2290,6 +2293,7 @@ public: /* PlayerScript */
void OnStoreNewItem(Player* player, Item* item, uint32 count);
void OnCreateItem(Player* player, Item* item, uint32 count);
void OnQuestRewardItem(Player* player, Item* item, uint32 count);
bool CanPlaceAuctionBid(Player* player, AuctionEntry* auction);
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);