Thread Tools Display Modes
06/30/22, 06:35 AM   #1
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Behaviour after TransferToGuildBank

Hi there
It looks like after a TransferToGuildBank(bag,slot) the guild bank is not updated (used slots / total guild bank slot counter is reset to 0 then items added during the process are added so the number is wrong, item tootips are empty, etc)
Is there a way to request an update ? (I've tried these https://www.esoui.com/forums/showthread.php?t=4700 but the only workaround I found is closing the guild bank)

Last edited by Masteroshi430 : 06/30/22 at 07:37 AM.
  Reply With Quote
06/30/22, 07:54 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,964
Which guild panel is active as you call this function TransferToGuildBank? Guild bank deposit tab (your inventory) I assume.

Which of the mentioned methods in that thread did you try?
ZO_ScrollList_RefreshVisible will only update the visible row controls of the scroll list you specify, so that changed controls will update (e.g. a texture of a custom added CT_TEXTURE will change).

If you want to update the inventory so that the data entries of the rows, the applied filters etc. get updated you need to use the refresh function of the scroll list, so that the list updates it's total MasterList.
PLAYER_INVENTORY:UpdateList(INVENTORY_BACKPACK)
https://github.com/esoui/esoui/blob/...tory.lua#L1770

Or use :RefreshAllInventorySlots(inventoryType)
https://github.com/esoui/esoui/blob/...tory.lua#L1841
which will internally call LayoutInventoryItems which will call the UpdateList function and update the free slots label
like the vanilla UI does as you show the player bank fragment
https://github.com/esoui/esoui/blob/...tory.lua#L2568

But be carefull, not sure if guildbank does the same, does not look like! The fragment only calls the update free slots function!
https://github.com/esoui/esoui/blob/...tory.lua#L2744
You might break other addons if you call that RefreshAllInventorySlots too early, too often or at all at the guild bank then!


btw: If possible I would not do that after each item, if you transfer multiple, but only after all have been transfered.

Last edited by Baertram : 06/30/22 at 08:00 AM.
  Reply With Quote
06/30/22, 08:42 AM   #3
Masteroshi430
 
Masteroshi430's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2020
Posts: 185
Originally Posted by Baertram View Post
Which guild panel is active as you call this function TransferToGuildBank? Guild bank deposit tab (your inventory) I assume.
Yes, indeed the functions work but I just discovered that the bug resetting the Guild Bank data is apparently occurring when doing StackBag(BAG_BACKPACK) with Guild bank deposit tab open!

EDIT:
I found and read this:
https://www.esoui.com/forums/showthread.php?t=5093

I guess there is a bug to fix with StackBag() or if not I'll have to use the roomba way of stacking then...

Last edited by Masteroshi430 : 06/30/22 at 09:31 AM.
  Reply With Quote

ESOUI » Developer Discussions » Lua/XML Help » Behaviour after TransferToGuildBank


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off