Fixed timers and updates

Leandro Silva [10-18-18 - 10:39]
Fixed timers and updates
Filename
LeoAltholic.lua
LeoAltholic.txt
LeoAltholicInit.lua
LeoAltholicUI.lua
ui/bio.lua
ui/champion.lua
ui/inventory.lua
ui/research.lua
ui/skills.lua
ui/skills2.lua
ui/stats.lua
ui/tracked.lua
ui/writs.lua
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 390d32e..7c491f3 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -1,6 +1,7 @@

 LeoAltholic.timerQueue = {}
 LeoAltholic.charList = {}
+LeoAltholic.lastUpdatedCharList = nil
 LeoAltholic.myself = nil
 LeoAltholic.myselfIndex = 0
 LeoAltholic.initialized = false
@@ -561,8 +562,9 @@ local function copy(obj, seen)
     return res
 end

-function LeoAltholic.GetCharacters()
-    if #LeoAltholic.charList == 0 then
+function LeoAltholic.GetCharacters(forceUpdate)
+    if #LeoAltholic.charList == 0 or (forceUpdate == true and GetTimeStamp() - LeoAltholic.lastUpdatedCharList > 10) then
+
         LeoAltholic.charList =  {}
         local i = 1
         for k, v in pairs(LeoAltholic.savedVariables.CharList) do
@@ -573,14 +575,13 @@ function LeoAltholic.GetCharacters()
         table.sort(LeoAltholic.charList, function(a, b)
             return a.bio.name < b.bio.name
         end)
+        LeoAltholic.lastUpdatedCharList = GetTimeStamp()
     end
     return LeoAltholic.charList
 end

-function LeoAltholic.ExportCharacters()
-    if #LeoAltholic.charList == 0 then
-        LeoAltholic.GetCharacters()
-    end
+function LeoAltholic.ExportCharacters(forceUpdate)
+    LeoAltholic.GetCharacters(forceUpdate)
     local chars = copy(LeoAltholic.charList)
     return chars
 end
@@ -644,6 +645,7 @@ local function onResearchCompleted(eventCode, craft, line, trait)
     if LeoAltholic.savedVariables.settings.completedResearch.chat == true then
         LeoAltholic.log(msg)
     end
+    LeoAltholicUI.researchList:RefreshData()
 end

 function LeoAltholic.AddToQueue(data)
@@ -715,38 +717,22 @@ local function onUpdate()

     processQueue()

-    if LeoAltholic:isHidden() then
-        return
-    end
+    if LeoAltholic.isHidden() then return end

-    local control
-    for x,char in pairs(LeoAltholic.GetCharacters()) do
+    LeoAltholicUI.bioList:RefreshData()
+    LeoAltholicUI.writsList:RefreshData()
+    LeoAltholicUI.invList:RefreshData()
+    LeoAltholicUI.researchList:RefreshData()
+end

-        local riding = '|t20:20:esoui/art/mounts/ridingskill_speed.dds|t ' .. char.attributes.riding.speed .. '%' ..
-                ' |t20:20:esoui/art/mounts/ridingskill_stamina.dds|t ' .. char.attributes.riding.stamina ..
-                ' |t20:20:esoui/art/mounts/ridingskill_capacity.dds|t ' .. char.attributes.riding.capacity ..
-                ' |t22:22:esoui/art/miscellaneous/timer_32.dds|t ' .. LeoAltholic.GetTime(char.attributes.riding.time - GetTimeStamp())
-        control = WINDOW_MANAGER:GetControlByName('LeoAltholicBioRow'..x.."Riding")
-        control:SetText(riding)
+local function onUpdate1M()

-        for _,craft in pairs(LeoAltholic.craftResearch) do
-            local i = 1
-            --local craftName = GetCraftingSkillName(craft)
-            for line = 1, GetNumSmithingResearchLines(craft) do
-                local lineName, lineIcon = GetSmithingResearchLineInfo(craft, line)
-                for trait = 1, LeoAltholic.maxTraits do
-                    local traitType = GetSmithingResearchLineTraitInfo(craft, line, trait)
-                    --local traitName = GetString('SI_ITEMTRAITTYPE',traitType)
-                    local traitData = char.research[craft][line][trait]
-                    if type(traitData) == 'number' then
-                        control = WINDOW_MANAGER:GetControlByName('LeoAltholicResearchRow'..x.."Craft"..craft.."Timer"..i)
-                        control:SetText(LeoAltholic.GetTime(traitData - GetTimeStamp()))
-                        i = i + 1
-                    end
-                end
-            end
-        end
-    end
+    if LeoAltholic.isHidden() then return end
+
+    LeoAltholicUI.statsList:RefreshData()
+    LeoAltholicUI.championList:RefreshData()
+    LeoAltholicUI.skillsList:RefreshData()
+    LeoAltholicUI.skills2List:RefreshData()
 end

 local function trackQuest(questId, automatically)
@@ -775,6 +761,9 @@ local function trackQuest(questId, automatically)
     quest.lastDone = nil
     table.insert(lookInto, quest)
     LeoAltholic.log(GetString(LEOALT_TRACKING) .. " " .. quest.name .. "...")
+    if quest.isCrafting then
+        LeoAltholicUI.writsList:RefreshData()
+    end
 end

 local function onQuestAdded(eventCode, journalIndex, questName, objectiveName)
@@ -786,16 +775,17 @@ local function onQuestAdded(eventCode, journalIndex, questName, objectiveName)
 end

 local function onQuestComplete(eventCode, questName, level, previousExperience, currentExperience, rank, previousPoints, currentPoints)
-    for _,trackedQuest in pairs(LeoAltholic.savedVariables.CharList[LeoAltholic.CharName].quests.writs) do
+    for i,trackedQuest in pairs(LeoAltholic.savedVariables.CharList[LeoAltholic.CharName].quests.writs) do
         if (trackedQuest.name == questName) then
-            trackedQuest.lastDone = GetTimeStamp()
+            LeoAltholic.savedVariables.CharList[LeoAltholic.CharName].quests.writs[i].lastDone = GetTimeStamp()
             LeoAltholic.log(zo_strformat(GetString(LEOALT_QUEST_DONE_TODAY), questName))
+            LeoAltholicUI.writsList:RefreshData()
             return
         end
     end
-    for _,trackedQuest in pairs(LeoAltholic.savedVariables.CharList[LeoAltholic.CharName].quests.tracked) do
+    for i,trackedQuest in pairs(LeoAltholic.savedVariables.CharList[LeoAltholic.CharName].quests.tracked) do
         if (trackedQuest.name == questName) then
-            trackedQuest.lastDone = GetTimeStamp()
+            LeoAltholic.savedVariables.CharList[LeoAltholic.CharName].quests.trackedw[i].lastDone = GetTimeStamp()
             LeoAltholic.log(zo_strformat(GetString(LEOALT_QUEST_DONE_TODAY), questName))
             return
         end
@@ -841,8 +831,6 @@ local function initialize()
     initCharsList()
     fixTrackedQuest()
     LeoAltholicUI.InitPanels()
-    --LeoAltholic.InitializeCharacterFrames()
-    --LeoAltholic.DisplayCharacterFrames()
     createMessageQueue()

     local keybindStripDescriptor = {
@@ -940,7 +928,8 @@ local function onAddOnLoaded(event, addonName)
     EVENT_MANAGER:RegisterForEvent(LeoAltholic.name, EVENT_PLAYER_DEACTIVATED, onPlayerDeactivated)
     EVENT_MANAGER:RegisterForEvent(LeoAltholic.name, EVENT_QUEST_COMPLETE, onQuestComplete)
     EVENT_MANAGER:RegisterForEvent(LeoAltholic.name, EVENT_QUEST_ADDED, onQuestAdded)
-    --EVENT_MANAGER:RegisterForUpdate(LeoAltholic.name, 5000, onUpdate)
+    EVENT_MANAGER:RegisterForUpdate(LeoAltholic.name, 2000, onUpdate)
+    EVENT_MANAGER:RegisterForUpdate(LeoAltholic.name, 60000, onUpdate1M)
     EVENT_MANAGER:RegisterForEvent(LeoAltholic.name, EVENT_NEW_MOVEMENT_IN_UI_MODE, onNewMovementInUIMode)
     CHAMPION_PERKS_SCENE:RegisterCallback('StateChange', onChampionPerksSceneStateChange)

diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index 298c99a..0a49650 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,6 +1,6 @@
 ## Title: Leo's Altholic
 ## APIVersion: 100024 100025
-## Version: 1.3.0
+## Version: 1.3.1
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoAltholicSavedVariables
 ## OptionalDependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index 89e76bf..ce2709b 100644
--- a/LeoAltholicInit.lua
+++ b/LeoAltholicInit.lua
@@ -4,5 +4,5 @@ LeoAltholicUI = LeoAltholicUI or {}

 LeoAltholic.name = "LeoAltholic"
 LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.2.5"
+LeoAltholic.version = "1.3.1"
 LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "
diff --git a/LeoAltholicUI.lua b/LeoAltholicUI.lua
index b1de69b..89e227e 100644
--- a/LeoAltholicUI.lua
+++ b/LeoAltholicUI.lua
@@ -108,199 +108,6 @@ function LeoAltholic.ShowTab(tab)
     control:SetHidden(false)
 end

-function LeoAltholic.InitializeCharacterFrames()
-    for x,char in pairs(LeoAltholic.GetCharacters()) do
-
-        for _,panel in ipairs(LeoAltholic.panelList) do
-            local bg
-            local row
-            local control
-            if panel == "Writs" then
-                local sc = WINDOW_MANAGER:GetControlByName("LeoAltholicWindowWritsPanel")
-                row = CreateControlFromVirtual("LeoAltholic"..panel.."Row" .. x, sc, "LeoAltholic"..panel.."RowTemplate")
-                row:SetAnchor(TOPLEFT,sc,TOPLEFT,0,22 + ((x - 1) * 40))
-                bg = row:GetNamedChild("BG")
-            else
-                local sc = WINDOW_MANAGER:GetControlByName("LeoAltholicWindow"..panel.."PanelScrollChild")
-                row = CreateControlFromVirtual("LeoAltholic"..panel.."Row" .. x, sc, "LeoAltholic"..panel.."RowTemplate")
-                row:SetHidden(false)
-                local anchorY = 109;
-                if panel == "Champion" then
-                    anchorY = 139
-                elseif panel == "Tracked" then
-                    anchorY = 169
-                elseif panel == "Research" then
-                    anchorY = 262
-                elseif panel == "Skills" then
-                    anchorY = 522
-                end
-                row:SetAnchor(TOPLEFT,sc,TOPLEFT,0,(x - 1) * anchorY)
-                bg = row:GetNamedChild("BG")
-            end
-            if char.bio.name == LeoAltholic.CharName then
-                bg:SetCenterColor(unpack({0.2,0.2,0.2,1 }))
-                bg:SetEdgeColor(0.22,0.77,0.22,1)
-            end
-
-            if panel == "Champion" then
-                for i = 1, GetNumChampionDisciplines() do
-                    local dispName = GetChampionDisciplineName(i)
-                    local dAttribute = GetChampionDisciplineAttribute(i)
-                    local label = row:GetNamedChild("Disc"..i.."Label")
-                    label:SetText(dispName)
-                    label:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipChampionSkill(self, true, x, dAttribute, i) end)
-                    label:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipChampionSkill(self, false) end)
-                end
-            elseif panel == "Inventory" then
-                control = row:GetNamedChild("ListButton")
-                control:SetHandler('OnClicked', function() LeoAltholic.ShowInventoryUI(x, BAG_BACKPACK) end)
-            elseif panel == "Research" then
-                for _,craft in pairs(LeoAltholic.craftResearch) do
-                    local label = row:GetNamedChild("Craft"..craft.."Label")
-                    label:SetText(GetCraftingSkillName(craft))
-                end
-            elseif panel == "Skills" then
-                local c = 1
-                for i = 1, 3 do
-                    if char.skills.class[i] then
-                        control = row:GetNamedChild("Class"..c.."Label")
-                        control:SetText(char.skills.class[i].name)
-                        control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "class", i) end)
-                        control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                        control = row:GetNamedChild("Class"..c.."Rank")
-                        control:SetText(char.skills.class[i].rank)
-                        c = c + 1
-                    end
-                end
-                c = 1
-                for i = 1, 3 do
-                    if char.skills.armor[i] then
-                        control = row:GetNamedChild("Armor"..c.."Label")
-                        control:SetText(char.skills.armor[i].name)
-                        control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "armor", i) end)
-                        control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                        control = row:GetNamedChild("Armor"..c.."Rank")
-                        control:SetText(char.skills.armor[i].rank)
-                        c = c + 1
-                    end
-                end
-                c = 1
-                for i = 1, 6 do
-                    if char.skills.weapon[i] then
-                        control = row:GetNamedChild("Weapon"..c.."Label")
-                        control:SetText(char.skills.weapon[i].name)
-                        control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "weapon", i) end)
-                        control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                        control = row:GetNamedChild("Weapon"..c.."Rank")
-                        control:SetText(char.skills.weapon[i].rank)
-                        c = c + 1
-                    end
-                end
-                c = 1
-                for i = 1, 7 do
-                    if char.skills.craft[i] then
-                        control = row:GetNamedChild("Craft"..c.."Label")
-                        control:SetText(char.skills.craft[i].name)
-                        control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "craft", i) end)
-                        control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                        control = row:GetNamedChild("Craft"..c.."Rank")
-                        control:SetText(char.skills.craft[i].rank)
-                        c = c + 1
-                    end
-                end
-                c = 1
-                for i = 1, 6 do
-                    if char.skills.guild[i] then
-                        control = row:GetNamedChild("Guild"..c.."Label")
-                        control:SetText(char.skills.guild[i].name)
-                        control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "guild", i) end)
-                        control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                        control = row:GetNamedChild("Guild"..c.."Rank")
-                        control:SetText(char.skills.guild[i].rank)
-                        c = c + 1
-                    end
-                end
-                c = 1
-                for i = 1, 4 do
-                    if char.skills.world[i] then
-                        control = row:GetNamedChild("World"..c.."Label")
-                        control:SetText(char.skills.world[i].name)
-                        control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "world", i) end)
-                        control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                        control = row:GetNamedChild("World"..c.."Rank")
-                        control:SetText(char.skills.world[i].rank)
-                        c = c + 1
-                    end
-                end
-                c = 1
-                for i = 1, 3 do
-                    if char.skills.ava[i] then
-                        control = row:GetNamedChild("Alliance"..c.."Label")
-                        control:SetText(char.skills.ava[i].name)
-                        control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "ava", i) end)
-                        control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                        control = row:GetNamedChild("Alliance"..c.."Rank")
-                        control:SetText(char.skills.ava[i].rank)
-                        c = c + 1
-                    end
-                end
-                if char.skills.racial[1] then
-                    control = row:GetNamedChild("Racial1Label")
-                    control:SetText(char.skills.racial[1].name)
-                    control:SetHandler('OnMouseEnter', function(self) LeoAltholic.TooltipSkill(self, true, x, "racial", 1) end)
-                    control:SetHandler('OnMouseExit', function(self) LeoAltholic.TooltipSkill(self, false) end)
-                    control = row:GetNamedChild("Racial1Rank")
-                    control:SetText(char.skills.racial[1].rank)
-                end
-            elseif panel == "Writs" then
-                if char.quests ~= nil and char.quests.writs ~= nil then
-                    for _, craft in pairs({CRAFTING_TYPE_ALCHEMY,CRAFTING_TYPE_BLACKSMITHING,CRAFTING_TYPE_CLOTHIER,CRAFTING_TYPE_ENCHANTING,CRAFTING_TYPE_JEWELRYCRAFTING,CRAFTING_TYPE_PROVISIONING,CRAFTING_TYPE_WOODWORKING}) do
-                        control = row:GetNamedChild("Craft"..craft.."Status")
-                        local shown = false
-                        for i = 1, 10 do
-                            if shown == false and char.quests.writs[i] ~= nil then
-                                local color = {1,0,0,1}
-                                if
-                                (craft == CRAFTING_TYPE_ALCHEMY and string.find(zo_strformat("<<z:1>>",char.quests.writs[i].name), zo_strformat("<<z:1>>",GetString(LEOALT_ALCHEMIST)))) or
-                                (craft == CRAFTING_TYPE_BLACKSMITHING and string.find(zo_strformat("<<z:1>>",char.quests.writs[i].name), zo_strformat("<<z:1>>",GetString(LEOALT_BLACKSMITH)))) or
-                                (craft == CRAFTING_TYPE_CLOTHIER and string.find(zo_strformat("<<z:1>>",char.quests.writs[i].name), zo_strformat("<<z:1>>",GetString(LEOALT_CLOTHIER)))) or
-                                (craft == CRAFTING_TYPE_ENCHANTING and string.find(zo_strformat("<<z:1>>",char.quests.writs[i].name), zo_strformat("<<z:1>>",GetString(LEOALT_ENCHANTER)))) or
-                                (craft == CRAFTING_TYPE_JEWELRYCRAFTING and string.find(zo_strformat("<<z:1>>",char.quests.writs[i].name), zo_strformat("<<z:1>>",GetString(LEOALT_JEWELRY)))) or
-                                (craft == CRAFTING_TYPE_PROVISIONING and string.find(zo_strformat("<<z:1>>",char.quests.writs[i].name), zo_strformat("<<z:1>>",GetString(LEOALT_PROVISIONER)))) or
-                                (craft == CRAFTING_TYPE_WOODWORKING and string.find(zo_strformat("<<z:1>>",char.quests.writs[i].name), zo_strformat("<<z:1>>",GetString(LEOALT_WOODWORKER)))) then
-                                    if char.quests.writs[i].lastDone ~= nil and char.quests.writs[i].lastDone > LeoAltholic.TodayReset() then
-                                        color = {0,1,0,1}
-                                    end
-                                    control:SetTexture("esoui/art/buttons/accept_up.dds")
-                                    control:SetColor(unpack(color))
-                                    if char.quests.writs[i].lastDone ~= nil then
-                                        local diff = GetTimeStamp() - char.quests.writs[i].lastDone
-                                        if diff < 3600 then
-                                            control.data = zo_strformat(GetString(LEOALT_MINUTES_AGO),  math.floor(diff / 60))
-                                        elseif diff < 86400 then
-                                            control.data = zo_strformat(GetString(LEOALT_HOURS_AGO),  math.floor(diff / 3600))
-                                        else
-                                            control.data = zo_strformat(GetString(LEOALT_DAYS_AGO),  math.floor(diff / 86400))
-                                        end
-                                    else
-                                        control.data = "|cCB110E"..GetString(LEOALT_NOT_DONE_TODAY).."|r"
-                                    end
-                                    shown = true
-                                end
-                            end
-                        end
-                        if shown == false then
-                            control:SetTexture("esoui/art/tutorial/menubar_help_up.dds")
-                            control:SetColor(unpack({1,1,1,1}))
-                            control.data = ""
-                        end
-                    end
-                end
-            end
-        end
-    end
-end
-
 function LeoAltholic.GetTime(seconds)
     if seconds and seconds > 0 then
         local ss = seconds % 60
@@ -317,34 +124,6 @@ function LeoAltholic.GetTime(seconds)
     else return '|cFF4020'..GetString(LEOALT_FINISHED)..'|r' end
 end

-function LeoAltholic.TooltipSkill(control, visible, charId, line, lineId)
-
-    if visible then
-        if not parent then parent = control end
-
-        control.text = InformationTooltip
-        InitializeTooltip(control.text,control,2,1,0,8)
-
-        local char = LeoAltholic.GetCharacters()[charId]
-        local added = false
-        for _, s in pairs(char.skills[line][lineId].list) do
-            local skillName = s.name
-            local rank = s.earnedRank
-            control.text:AddLine("|cE8DFAF" .. skillName .. "|r " .. rank)
-            added = true
-        end
-        if added then
-            control.text:SetHidden(false)
-        else
-            control.text:SetHidden(true)
-        end
-    else
-        ClearTooltip(control.text)
-        control.text:SetHidden(true)
-        control.text = nil
-    end
-end
-
 local function formatNumber(amount)
     if amount == nil then return nil; end
     if type(amount) == "string" then amount = tonumber( amount ) end
diff --git a/ui/bio.lua b/ui/bio.lua
index ca5aa4d..0dd9fa4 100644
--- a/ui/bio.lua
+++ b/ui/bio.lua
@@ -89,7 +89,7 @@ end

 function LeoAltholicBioList:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,
diff --git a/ui/champion.lua b/ui/champion.lua
index 7785da3..79887ef 100644
--- a/ui/champion.lua
+++ b/ui/champion.lua
@@ -65,7 +65,7 @@ end

 function LeoAltholicChampionList:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,
diff --git a/ui/inventory.lua b/ui/inventory.lua
index e4afd1f..78e2d1f 100644
--- a/ui/inventory.lua
+++ b/ui/inventory.lua
@@ -115,7 +115,7 @@ end

 function LeoAltholicInventoryList:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,
diff --git a/ui/research.lua b/ui/research.lua
index 9793bfd..3a1bb2d 100644
--- a/ui/research.lua
+++ b/ui/research.lua
@@ -67,6 +67,7 @@ function LeoAltholicResearchList:SetupEntry(control, data)
         if researching < data.research[craft].max then
             color = '|cCB110E'
         end
+        if researching > data.research[craft].max then researching = data.research[craft].max end
         local output = color .. researching .. '/' .. data.research[craft].max .. '|r'
         color = '|cFFFFFF'
         if lowest <= 3600 then
@@ -98,7 +99,7 @@ end

 function LeoAltholicResearchList:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,
@@ -141,23 +142,14 @@ function LeoAltholicUI.TooltipResearch(control, visible)
         if #control.list == 0 then return end
         if not parent then parent = control end

-        InitializeTooltip(InformationTooltip, control, LEFT, 5, 0)
+        InitializeTooltip(InformationTooltip, control, LEFT, -30, 0)

         addLineTitle(InformationTooltip, GetCraftingSkillName(control.list[1].craft))
-        --[[
-        {
-            craft = craft,
-            line = line,
-            trait = trait,
-            lineName = lineName,
-            lineIcon = lineIcon,
-            traitName = traitName,
-            timer = LeoAltholic.GetTime(lowest)
-        }
-        ]]
+
         for _, trait in pairs(control.list) do
             addLine(InformationTooltip, "|t30:30:"..trait.lineIcon.."|t "..trait.lineName.." "..trait.traitName.." "..trait.timer)
         end
+
         InformationTooltip:SetHidden(false)
     else
         ClearTooltip(InformationTooltip)
diff --git a/ui/skills.lua b/ui/skills.lua
index c46b020..74a9fc9 100644
--- a/ui/skills.lua
+++ b/ui/skills.lua
@@ -122,7 +122,7 @@ end

 function LeoAltholicSkillsList:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,
diff --git a/ui/skills2.lua b/ui/skills2.lua
index 8e6fc32..7da50fe 100644
--- a/ui/skills2.lua
+++ b/ui/skills2.lua
@@ -100,7 +100,7 @@ end

 function LeoAltholicSkills2List:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,
diff --git a/ui/stats.lua b/ui/stats.lua
index 3f0d755..3c8647e 100644
--- a/ui/stats.lua
+++ b/ui/stats.lua
@@ -61,7 +61,7 @@ end

 function LeoAltholicStatsList:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,
diff --git a/ui/tracked.lua b/ui/tracked.lua
index 48cf8ec..c00fbf1 100644
--- a/ui/tracked.lua
+++ b/ui/tracked.lua
@@ -4,7 +4,7 @@ function LeoAltholicUI.InitTrackedPanel()
     local control
     local anchorY = 112;
     control = WINDOW_MANAGER:GetControlByName('LeoAltholicWindowTrackedPanelScrollChild')
-    control:SetHeight(#LeoAltholic.GetCharacters() * anchorY)
+    control:SetHeight(#charList * anchorY)

     local numRows = 1

diff --git a/ui/writs.lua b/ui/writs.lua
index b208078..82d814c 100644
--- a/ui/writs.lua
+++ b/ui/writs.lua
@@ -92,7 +92,7 @@ end

 function LeoAltholicWritsList:BuildMasterList()
     self.masterList = {}
-    local list = LeoAltholic.ExportCharacters()
+    local list = LeoAltholic.ExportCharacters(true)
     for k, v in ipairs(list) do
         local data = {
             name = v.bio.name,