ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   General Authoring Discussion (https://www.esoui.com/forums/forumdisplay.php?f=174)
-   -   Handholding request: banking (https://www.esoui.com/forums/showthread.php?t=7501)

MaralieRindu 12/08/17 03:31 PM

Handholding request: banking
 
I'm trying to add a feature to Mass Deconstructor to allow non-crafting characters to deposit all the to-be-deconstructed items in the bank in preparation for deconstructing by the crafting character(s).

At this point I'm getting a little confused by some of the stuff I'm seeing in esoui LUA files and I need some help.

In inventoryslot.lua there is a function TryBankItem which appears to effect a deposit by invoking "PickupInventoryItem(bag, index)" and then "PlaceInTransfer". How does this work? Is this dependent on having the appropriate tab open (i.e.: Withdraw or Deposit)? If so, how can I select/open the Deposit tab of the bank?

In the crafting tables we can select the appropriate tab using SMITHING:SetMode(), but because I don't know what I'm looking for I can't find the equivalent thing for banking. All the esoui LUA code I'm looking reacts to the state of the bank but doesn't set it.

Ayantir 12/08/17 03:38 PM

look at bankmanager code?

don't use PickupInventoryItem and then PlaceInTransfer, they're made for base UI, not addons which automoves.

Lua Code:
  1. if IsProtectedFunction("RequestMoveItem") then
  2.     CallSecureProtected("RequestMoveItem", bagIdFrom, slotIdFrom, bagIdTo, slotIdTo, qtyToMove)
  3. else
  4.     RequestMoveItem(bagIdFrom, slotIdFrom, bagIdTo, slotIdTo, qtyToMove)
  5. end

MaralieRindu 12/08/17 04:29 PM

The only "banking" stuff I could find was in gamepad banking_gamepad.lua etc :(

Thank you for suggesting RequestMoveItem!

Baertram 12/08/17 04:29 PM

I personally would say you shouldn't rebuild the code of the other addons for Mass deconstructor as the addon is for mass deconstructing items, and not moving them to the bank.

There are several addons moving items to the bank already so just let ppl combine both instead of implementing it into your addon.


All times are GMT -6. The time now is 04:55 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI