New release

Leandro Silva [11-06-18 - 10:14]
New release
Filename
LeoAltholic.lua
LeoAltholic.txt
LeoAltholicInit.lua
ui/checklist.lua
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 7f616dd..bf6f8d2 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -110,7 +110,6 @@ local function checkQuestForWrits(questName)
             LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastPreDeliver = nil
             LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastUpdated = nil
             LeoAltholicChecklistUI.startedWrit(trackedQuest.craft)
-
             local numConditions = GetJournalQuestNumConditions(trackedQuest.questIndex, QUEST_MAIN_STEP_INDEX)
             local hasUpdated = false
             for condition = 1, numConditions do
@@ -907,8 +906,13 @@ local function trackQuest(questId, automatically)
     else
         lookInto = LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.tracked
     end
-    for _,trackedQuest in pairs(lookInto) do
+    for trackedIndex,trackedQuest in pairs(lookInto) do
         if (trackedQuest.name == quest.name) then
+            if quest.isCrafting then
+                LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[trackedIndex].questIndex = questId
+            else
+                LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.tracked[trackedIndex].questIndex = questId
+            end
             if automatically ~= true then
                 LeoAltholic.log(ZO_CachedStrFormat(GetString(LEOALT_QUEST_ALREADY_TRACKED), quest.name))
             end
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index d03797d..1573075 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,7 +1,7 @@
 ## Title: Leo's Altholic
 ## APIVersion: 100024 100025
-## Version: 1.6.7
-## AddOnVersion: 167
+## Version: 1.6.8
+## AddOnVersion: 168
 ## Author: |c39B027@LeandroSilva|r
 ## SavedVariables: LeoAltholicSavedVariables LeoAltholicCharVariables
 ## OptionalDependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholicInit.lua b/LeoAltholicInit.lua
index a666ba2..179e3d5 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.7"
+LeoAltholic.version = "1.6.8"
 LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "

 LeoAltholic.TAB_BIO = "Bio"
diff --git a/ui/checklist.lua b/ui/checklist.lua
index cd6ea0f..a1e478e 100644
--- a/ui/checklist.lua
+++ b/ui/checklist.lua
@@ -304,9 +304,7 @@ function LeoAltholicChecklistUI.initializeQuests()
         for questIndex = 1, MAX_JOURNAL_QUESTS do
             if IsValidQuestIndex(questIndex) and GetJournalQuestName(questIndex) == trackedQuest.name then

-                if LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].questIndex == nil then
-                    LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].questIndex = questIndex
-                end
+                LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].questIndex = questIndex
                 LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastStarted = GetTimeStamp()
                 LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastPreDeliver = nil
                 LeoAltholic.globalData.CharList[LeoAltholic.CharName].quests.writs[i].lastUpdated = nil