View Single Post
05/26/14, 11:49 AM   #12
Xrystal
caritas omnia vincit
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2014
Posts: 369
Currently I do the following, and then use the resulting tables for the traversing, its not perfect but for the most part it is called when people first open the history or import file and when they click the refresh button. Finding out that a slight change in data layout will bypass this problem will hopefully cut down on the amount of code I am needing to use. Technically accountWide also includes the characterWide values as well but it makes it clearer that I am only looking at accountWide values.

Lua Code:
  1. local nodeInfo = {}
  2. local itemInfo = {}
  3. for default,sv in pairs(XrysGatherer_SavedVariables) do
  4.     for account,accountv in pairs(sv) do
  5.         for accountWide,acWideV in pairs(accountv) do
  6.             for i,v in pairs(acWideV) do
  7.                 if i == "ItemData" then itemInfo = v end
  8.         if i == "NodeData" then nodeInfo = v end
  9.             end
  10.         end
  11.     end
  12. end
  Reply With Quote