Fixed missing daily writ icon
Leandro Silva [10-11-18 - 17:53]
Fixed missing daily writ icon
diff --git a/LeoAltholic.lua b/LeoAltholic.lua
index 6e09524..f084060 100644
--- a/LeoAltholic.lua
+++ b/LeoAltholic.lua
@@ -2,7 +2,7 @@
LeoAltholic = {}
LeoAltholic.name = "LeoAltholic"
LeoAltholic.displayName = "Leo's Altholic"
-LeoAltholic.version = "1.2.2"
+LeoAltholic.version = "1.2.3"
LeoAltholic.chatPrefix = "|c39B027" .. LeoAltholic.name .. "|r: "
LeoAltholic.timerQueue = {}
diff --git a/LeoAltholic.txt b/LeoAltholic.txt
index b16c4a8..7cb90e5 100644
--- a/LeoAltholic.txt
+++ b/LeoAltholic.txt
@@ -1,6 +1,6 @@
## Title: Leo's Altholic
## APIVersion: 100024 100025
-## Version: 1.2.2
+## Version: 1.2.3
## Author: |c39B027@LeandroSilva|r
## SavedVariables: LeoAltholicSavedVariables
## OptionalDependsOn: LibStub LibFeedback LibAddonMenu-2.0
diff --git a/LeoAltholicUI.lua b/LeoAltholicUI.lua
index 0624921..e14691f 100644
--- a/LeoAltholicUI.lua
+++ b/LeoAltholicUI.lua
@@ -254,52 +254,50 @@ function LeoAltholic.InitializeCharacterFrames()
end
elseif panel == "Daily" then
if char.quests ~= nil and char.quests.tracked ~= nil then
- for i = 1, 10 do
- if char.quests.tracked[i] ~= nil and char.quests.tracked[i].questType == QUEST_TYPE_CRAFTING then
- local craft = 0
- local color = {1,0,0,1}
- if char.quests.tracked[i].name == GetString(LEOALT_ALCHEMY_WRIT) then
- craft = CRAFTING_TYPE_ALCHEMY
- elseif char.quests.tracked[i].name == GetString(LEOALT_BLACKSMITHING_WRIT) then
- craft = CRAFTING_TYPE_BLACKSMITHING
- elseif char.quests.tracked[i].name == GetString(LEOALT_CLOTHIER_WRIT) then
- craft = CRAFTING_TYPE_CLOTHIER
- elseif char.quests.tracked[i].name == GetString(LEOALT_ENCHANTING_WRIT) then
- craft = CRAFTING_TYPE_ENCHANTING
- elseif char.quests.tracked[i].name == GetString(LEOALT_JEWELRYCRAFTING_WRIT) then
- craft = CRAFTING_TYPE_JEWELRYCRAFTING
- elseif char.quests.tracked[i].name == GetString(LEOALT_PROVISIONING_WRIT) then
- craft = CRAFTING_TYPE_PROVISIONING
- elseif char.quests.tracked[i].name == GetString(LEOALT_WOODWORKING_WRIT) then
- craft = CRAFTING_TYPE_WOODWORKING
- end
- if char.quests.tracked[i].lastDone ~= nil and char.quests.tracked[i].lastDone > LeoAltholic.TodayReset() then
- color = {0,1,0,1}
- end
- if craft > 0 then
- control = row:GetNamedChild("Craft"..craft.."Status")
- control:SetTexture("esoui/art/buttons/accept_up.dds")
- control:SetColor(unpack(color))
- if char.quests.tracked[i].lastDone ~= nil then
- local diff = GetTimeStamp() - char.quests.tracked[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))
+ 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.tracked[i] ~= nil and char.quests.tracked[i].questType == QUEST_TYPE_CRAFTING then
+ local color = {1,0,0,1}
+ if (craft == CRAFTING_TYPE_ALCHEMY and char.quests.tracked[i].name == GetString(LEOALT_ALCHEMY_WRIT)) or
+ (craft == CRAFTING_TYPE_BLACKSMITHING and char.quests.tracked[i].name == GetString(LEOALT_BLACKSMITHING_WRIT)) or
+ (craft == CRAFTING_TYPE_CLOTHIER and char.quests.tracked[i].name == GetString(LEOALT_CLOTHIER_WRIT)) or
+ (craft == CRAFTING_TYPE_ENCHANTING and char.quests.tracked[i].name == GetString(LEOALT_ENCHANTING_WRIT)) or
+ (craft == CRAFTING_TYPE_JEWELRYCRAFTING and char.quests.tracked[i].name == GetString(LEOALT_JEWELRYCRAFTING_WRIT)) or
+ (craft == CRAFTING_TYPE_PROVISIONING and char.quests.tracked[i].name == GetString(LEOALT_PROVISIONING_WRIT)) or
+ (craft == CRAFTING_TYPE_WOODWORKING and char.quests.tracked[i].name == GetString(LEOALT_WOODWORKING_WRIT)) then
+
+ if char.quests.tracked[i].lastDone ~= nil and char.quests.tracked[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.tracked[i].lastDone ~= nil then
+ local diff = GetTimeStamp() - char.quests.tracked[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 = zo_strformat(GetString(LEOALT_DAYS_AGO), math.floor(diff / 86400))
+ control.data = "|cCB110E"..GetString(LEOALT_NOT_DONE_TODAY).."|r"
end
- else
- control.data = "|cCB110E"..GetString(LEOALT_NOT_DONE_TODAY).."|r"
+ shown = true
end
- else
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