diff options
author | Shauren <shauren.trinity@gmail.com> | 2021-05-23 00:56:00 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-05-23 01:39:08 +0200 |
commit | ce37c24481c6ab6863c1fc3be037aa56c54520ea (patch) | |
tree | 94fa467b22613b08fa95cd070c5da0a4d022f3ca /src/server/game/Guilds/Guild.h | |
parent | 7f7ccfd6cddc8b6daec92390093f677bcd0a9aa4 (diff) |
Core/PacketIO: Properly send inventory error when attempting to withdraw guild bank item into "any slot" when bags are full
Diffstat (limited to 'src/server/game/Guilds/Guild.h')
-rw-r--r-- | src/server/game/Guilds/Guild.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/game/Guilds/Guild.h b/src/server/game/Guilds/Guild.h index bd21c92d733..7a1bdaf79e5 100644 --- a/src/server/game/Guilds/Guild.h +++ b/src/server/game/Guilds/Guild.h @@ -633,7 +633,7 @@ class TC_GAME_API Guild // Defines if player has rights to withdraw item from container virtual bool HasWithdrawRights(MoveItemData* /*pOther*/) const { return true; } // Checks if container can store specified item - bool CanStore(Item* pItem, bool swap, bool sendError); + InventoryResult CanStore(Item* pItem, bool swap, bool sendError); // Clones stored item bool CloneItem(uint32 count); // Remove item from container (if splited update items fields) @@ -646,6 +646,8 @@ class TC_GAME_API Guild virtual void LogAction(MoveItemData* pFrom) const; // Copy slots id from position vector void CopySlots(SlotIds& ids) const; + // Sends equip error to player + void SendEquipError(InventoryResult result, Item const* item); Item* GetItem(bool isCloned = false) const { return isCloned ? m_pClonedItem : m_pItem; } uint8 GetContainer() const { return m_container; } @@ -932,7 +934,7 @@ class TC_GAME_API Guild Item* _GetItem(uint8 tabId, uint8 slotId) const; void _RemoveItem(CharacterDatabaseTransaction& trans, uint8 tabId, uint8 slotId); void _MoveItems(MoveItemData* pSrc, MoveItemData* pDest, uint32 splitedAmount) const; - static bool _DoItemsMove(MoveItemData* pSrc, MoveItemData* pDest, bool sendError, uint32 splitedAmount = 0); + static InventoryResult _DoItemsMove(MoveItemData* pSrc, MoveItemData* pDest, bool sendError, uint32 splitedAmount = 0); void _SendBankContentUpdate(MoveItemData* pSrc, MoveItemData* pDest) const; void _SendBankContentUpdate(uint8 tabId, SlotIds slots) const; |