ESOUI

ESOUI (https://www.esoui.com/forums/index.php)
-   Lua/XML Help (https://www.esoui.com/forums/forumdisplay.php?f=175)
-   -   Behaviour after TransferToGuildBank (https://www.esoui.com/forums/showthread.php?t=10249)

Masteroshi430 06/30/22 06:35 AM

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)

Baertram 06/30/22 07:54 AM

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.

Masteroshi430 06/30/22 08:42 AM

Quote:

Originally Posted by Baertram (Post 46247)
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...


All times are GMT -6. The time now is 06:51 AM.

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