Only auto-deposit non-equippable items to bank on right-click

Right-clicking equippable items (inventoryType > 0) while the bank is
open now equips them as normal instead of depositing. Only materials,
quest items, and other non-equippable items auto-deposit to bank.
This commit is contained in:
Kelsi 2026-02-25 13:57:37 -08:00
parent af7fb4242c
commit d61b7b385d

View file

@ -1428,11 +1428,12 @@ void InventoryScreen::renderItemSlot(game::Inventory& inventory, const game::Ite
" bagIndex=", bagIndex, " bagSlotIndex=", bagSlotIndex,
" vendorMode=", vendorMode_,
" bankOpen=", gameHandler_->isBankOpen());
if (gameHandler_->isBankOpen() && kind == SlotKind::BACKPACK && backpackIndex >= 0) {
// Deposit backpack item into bank: bag=0xFF, slot=23+index
// Bank deposit: only for non-equippable, non-usable items (materials, etc.)
// Equippable items should equip; usable items should be used.
bool bankDeposit = gameHandler_->isBankOpen() && item.inventoryType == 0;
if (bankDeposit && kind == SlotKind::BACKPACK && backpackIndex >= 0) {
gameHandler_->depositItem(0xFF, static_cast<uint8_t>(23 + backpackIndex));
} else if (gameHandler_->isBankOpen() && kind == SlotKind::BACKPACK && isBagSlot) {
// Deposit bag item into bank: bag=19+bagIndex, slot=slotIndex
} else if (bankDeposit && kind == SlotKind::BACKPACK && isBagSlot) {
gameHandler_->depositItem(static_cast<uint8_t>(19 + bagIndex), static_cast<uint8_t>(bagSlotIndex));
} else if (vendorMode_ && kind == SlotKind::BACKPACK && backpackIndex >= 0) {
gameHandler_->sellItemBySlot(backpackIndex);