Force a full inventory update...
Greetings fellow Moon coders!
I have recently found a need to perform a full refresh of the active inventory when performing a certain action. This is because I am adding icons to tracked recipes in the inventory and want to be able to dynamically update the appearance as you enable and disable tracking. The in-game function to "Rescan Bag" does NOT work. It would need to work like switching tabs, which does cause the list to update properly. I have tried several functions, PlayerInventory:RefreshAllInventorySlots(INVENTORY_BACKPACK) being the latest, but they seem to be private or otherwise do not work and throw errors. Also, I would need this to be able to update the inventory list regardless of whether it is your backpack, the bank, guild bank, buyback, and preferable the guild stores, though that may be trickier. Any help would be much appreciated! |
Figured it out...
Code:
PLAYER_INVENTORY:UpdateList(INVENTORY_BACKPACK) |
Still looking for a simply way to refresh the guild store result listings...
|
Take a look at this...
Lua Code:
This is ZOs own code for the inventory refreshing functions for the destroy function and the like... And maybe this for a few more ideas?? I find other peoples coding neat... Lua Code:
EDIT: You could maybe make your own refresh functions in the same manner?? Or just hook theirs... ;) |
If you just want to update the srcoll lists so the icons are shown, and no other stuff needs to be updated to the itemData, you could try:
Lua Code:
"inventoryType" can be the control name of an ZO scrollist like Player inventory: ZO_PlayerInventoryBackpack Bank: ZO_PlayerBankBackpack Guild Bank: ZO_GuildBankBackpack Perhaps there is also a ZO_TradingHouseBackpack or even one for the results list int he trading house. Check the trading house with ZGOO addon or try to check ZO_TradingHouse with ZGOO and look at the children, parent controls if you find a list to update. Could be: ZO_TradingHouseItemPaneSearchResults |
Quote:
|
Quote:
Code:
ZO_ScrollList_RefreshVisible(ZO_TradingHouseItemPaneSearchResults) |
All times are GMT -6. The time now is 04:28 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI