mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
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:
parent
d61b7b385d
commit
ce30cedf4a
1 changed files with 2 additions and 5 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue