View Single Post
10/10/19, 05:02 AM   #3
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,989
Yes. You normally update the prices table from their website's database, usign the included exe file clients.
They download a file and include the data into teh SavedVariables of the addon.

After reloadui they are in then.
Normally you do this before playing and not "during".

Same with the guild data upload.
During palying your listed items will be saved to the SV.
And the client might track the change date & time of the SV, chekc the contents of a decent table like e.g. "guild_postings" and upload the data then if something changed (or always, not sure).

You are able to use e.G. ZOs table functions (https://github.com/esoui/esoui/blob/...tableutils.lua) like

function ZO_ShallowTableCopy(source, dest)
function ZO_DeepTableCopy(source, dest)

to copy your SV table to a non-connected table data.
After some time (use the EVENT_MANAGER:RegisterForUpdate to register an update check function each e.g. 5 seconds and/or use GetTimeStamp() or other GetTimeSinceLogin() or similar, dunno which exist all) check if some content of the table changed, compared to your current global SV variable.
And if so you can call Reloadui() to reload the UI.

But be sure these copy functions and checks might get CPU hungry and if you do not take care it might even crash the client if the SVs get updated at teh time you do the deeptabelcopy e.g. -> endless loops or whateever might happen.

Last edited by Baertram : 10/10/19 at 05:07 AM.
  Reply With Quote