New release

Leandro Silva [11-05-18 - 15:23]
New release
Filename
LeoAltholic.lua
LeoAltholic.txt
LeoAltholicInit.lua
LeoAltholic_API.lua
ui/research.lua
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 824673d..b40d9da 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -123,6 +123,7 @@ local function checkQuestForWrits(questName)
                     LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastPreDeliver = GetTimeStamp()
                     LeoAltholicChecklistUI.preDeliverWrit(trackedQuest.craft)
                     hasUpdated = false
+                    break
                 end
             end
             if hasUpdated then
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index 09f240a..67ab4f6 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,6 +1,7 @@
 ## Title: Leo's Altholic
 ## APIVersion: 100024 100025
-## Version: 1.6.4
+## Version: 1.6.5
+## AddOnVersion: 165
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoAltholicSavedVariables LeoAltholicCharVariables
 ## OptionalDependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index 6c18c93..80e686b 100644
--- a/LeoAltholicInit.lua
+++ b/LeoAltholicInit.lua
@@ -6,7 +6,7 @@ LeoAltholicToolbarUI = LeoAltholicToolbarUI or {}

 LeoAltholic.name = "LeoAltholic"
 LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.6.4"
+LeoAltholic.version = "1.6.5"
 LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "

 LeoAltholic.TAB_BIO = "Bio"
diff --git a/LeoAltholic_API.lua b/LeoAltholic_API.lua
index 0b09541..3911d03 100644
--- a/LeoAltholic_API.lua
+++ b/LeoAltholic_API.lua
@@ -179,6 +179,17 @@ function LeoAltholic.ExportCharacters(forceUpdate)
 end

 --[[
+Return the list of character names
+]]
+function LeoAltholic.GetCharactersNames()
+    local list = {}
+    for _, char in pairs(LeoAltholic.GetCharacters()) do
+        table.insert(list, char.bio.name)
+    end
+    return list
+end
+
+--[[
 Return all info on 1 char by name
 ]]
 function LeoAltholic.GetCharByName(name, forceUpdate)
diff --git a/ui/research.lua b/ui/research.lua
index dcc6416..5279ee5 100644
--- a/ui/research.lua
+++ b/ui/research.lua
@@ -37,7 +37,11 @@ function LeoAltholicResearchList:SetupEntry(control, data)
         local list = {}
         for _, research in pairs(data.research.doing[craft]) do

-            if first == nil then first = research end
+            if research.doneAt - GetTimeStamp() < 0 then
+                researching = researching - 1
+            elseif first == nil then
+                first = research
+            end

             local lineName, lineIcon = GetSmithingResearchLineInfo(craft, research.line)
             local traitType = GetSmithingResearchLineTraitInfo(craft, research.line, research.trait)
@@ -68,7 +72,7 @@ function LeoAltholicResearchList:SetupEntry(control, data)
         if first and first.doneAt ~= nil and first.doneAt - GetTimeStamp() <= 3600 then
             color = '|c'..LeoAltholic.color.hex.yellow
         end
-        if #list > 0 then
+        if first ~= nil then
             if first.doneAt ~= nil then
                 output = output .. " " .. color..LeoAltholic.FormatTime(first.doneAt - GetTimeStamp(), false, true) .. '|r'
             end