fix(Core/Guild): Prevent swapping limited duration items into guild bank (#18335)

This commit is contained in:
sudlud
2024-02-19 21:22:51 +01:00
committed by GitHub
parent f6e2bf3ec1
commit 7e419fba5a

View File

@@ -990,6 +990,10 @@ InventoryResult Guild::BankMoveItemData::CanStore(Item* pItem, bool swap)
if (pItem->IsSoulBound())
return EQUIP_ERR_CANT_DROP_SOULBOUND;
// Prevent swapping limited duration items into guild bank
if (pItem->GetTemplate()->Duration > 0)
return EQUIP_ERR_ITEMS_CANT_BE_SWAPPED;
// Make sure destination bank tab exists
if (m_container >= m_pGuild->_GetPurchasedTabsSize())
return EQUIP_ERR_ITEM_DOESNT_GO_INTO_BAG;