Deposit all items to bank on right-click when bank is open

All right-clicked inventory items now deposit to bank regardless of
whether they are equippable, usable, or materials.
This commit is contained in:
Kelsi 2026-02-25 14:00:54 -08:00
parent d61b7b385d
commit ce30cedf4a

View file

@ -1428,12 +1428,9 @@ void InventoryScreen::renderItemSlot(game::Inventory& inventory, const game::Ite
" bagIndex=", bagIndex, " bagSlotIndex=", bagSlotIndex,
" vendorMode=", vendorMode_,
" bankOpen=", gameHandler_->isBankOpen());
// 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) {
if (gameHandler_->isBankOpen() && kind == SlotKind::BACKPACK && backpackIndex >= 0) {
gameHandler_->depositItem(0xFF, static_cast<uint8_t>(23 + backpackIndex));
} else if (bankDeposit && kind == SlotKind::BACKPACK && isBagSlot) {
} else if (gameHandler_->isBankOpen() && 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);