mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-23 05:36:23 +00:00
chore(PlayerScript/Hook) : Add CanSetTradeItem Hook in PlayerScript (#18583)
* chore(PlayerScript/Hook) : Add CanSetTradeItem Hook in PlayerScript * Allowing non traded slots * Fix typo and codestyle
This commit is contained in:
@@ -421,6 +421,16 @@ public:
|
||||
|
||||
[[nodiscard]] virtual bool CanInitTrade(Player* /*player*/, Player* /*target*/) { return true; }
|
||||
|
||||
/**
|
||||
* @brief This hook called just before finishing the handling of the action of a player setting an item in a trade slot
|
||||
*
|
||||
* @param player Contains information about the trade initiator Player
|
||||
* @param tradedItem Contains information about the item set in the trade slot
|
||||
*
|
||||
* @return True if you want to continue setting the item in the trade slot, false if you want to cancel the trade
|
||||
*/
|
||||
[[nodiscard]] virtual bool CanSetTradeItem(Player* /*player*/, Item* /*tradedItem*/, uint8 /*tradeSlot*/) { return true; }
|
||||
|
||||
virtual void OnSetServerSideVisibility(Player* /*player*/, ServerSideVisibilityType& /*type*/, AccountTypes& /*sec*/) { }
|
||||
|
||||
virtual void OnSetServerSideVisibilityDetect(Player* /*player*/, ServerSideVisibilityType& /*type*/, AccountTypes& /*sec*/) { }
|
||||
|
||||
Reference in New Issue
Block a user