# HG changeset patch # User Vynn # Date 1491157365 14400 # Node ID 6c495455f0694ed5cfdb3dc009d3335e3cda1cc5 # Parent 2a0df868533ac45c9230402fbb52428d6f77aae3 Fixed a bug in the LDB display for completed skins (thanks pros4c for catching!). Changed the way unlocked skins are displayed in most circumstances. diff -r 2a0df868533a -r 6c495455f069 Spotlight.lua --- a/Spotlight.lua Sun Apr 02 14:20:40 2017 -0400 +++ b/Spotlight.lua Sun Apr 02 14:22:45 2017 -0400 @@ -26,7 +26,11 @@ print("|T" .. Spotlight.Icon .. ":0|t |cffe5cc80Spotlight|r - Artifact Hidden Skin Progress:"); if Spotlight.IDs then for key, value in pairs(Spotlight.IDs) do - print(" " .. ICONS[tostring(key)] .. " |cffe5cc80" .. key .. " - " .. Spotlight.Format(key, false) .. " (" .. Spotlight.Format(key, true) .. ")|r"); + if not Spotlight.Status[key].Completed then + print(" " .. ICONS[tostring(key)] .. " |cffe5cc80" .. key .. " - " .. Spotlight.Format(key, false) .. " (" .. Spotlight.Format(key, true) .. ")|r"); + else + print(" " .. ICONS[tostring(key)] .. " |cffe5cc80" .. key .. " - |cff00ff00Completed!|r"); + end end end end @@ -107,12 +111,12 @@ Spotlight.Status[key].Completed = select(3, GetAchievementCriteriaInfo(value,1)); if not Spotlight.Status[key].Completed then Spotlight.Status[key].Progress = Spotlight.Calculate(key); - if output == "" then - output = " "; - else - output = output .. " || "; - end - if Spotlight.Status[key].Progress > 0 then + if Spotlight.Status[key].Progress >= 0 then + if output == "" then + output = " "; + else + output = output .. " || "; + end if Spotlight.ShowIcon then output = output .. ICONS[tostring(key)] .. Spotlight.Format(key, Spotlight.ShowPercent); else @@ -122,7 +126,7 @@ end end if output == "" then - output = " Everything Unlocked!"; + output = " |cff00ff00All Hidden Skins Unlocked!|r"; end dataobj.icon = Spotlight.Icon @@ -139,6 +143,9 @@ for k, v in pairs(Spotlight.IDs) do if not Spotlight.Status[k].Completed then self:AddDoubleLine(ICONS[tostring(k)] .. " " .. k .. ":", Spotlight.Format(k, false) .. " (" .. Spotlight.Format(k, true) .. ")"); + else + self:AddDoubleLine(ICONS[tostring(k)] .. " " .. k .. ":", "|cff00ff00Completed!|r"; + end end self:AddLine("|nLeft Click to toggle Percentage or Fractional Display");