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