# HG changeset patch # User Vynn # Date 1485694539 18000 # Node ID c5024af048456dfc761bdd8c775c0bc95e1fe2fc # Parent bcb59f5bceefde860120c8f3cd2d809bb548d03f Changed some verbage in the display Updated LDB display to hide artifact progress that hasn't been started (as well as that has been completed) Fixed a bug with the LDB icon on load diff -r bcb59f5bceef -r c5024af04845 Spotlight.lua --- a/Spotlight.lua Sun Jan 29 07:53:06 2017 -0500 +++ b/Spotlight.lua Sun Jan 29 07:55:39 2017 -0500 @@ -1,6 +1,6 @@ local dataobj = LibStub:GetLibrary("LibDataBroker-1.1"):NewDataObject("Spotlight", { type = "data source", - text = "Everything Unlocked!", + text = "Nothing to track!", icon = GetInventoryItemTexture("player", 16), OnClick = function(clickedframe, button) Spotlight.ShowPercent = not Spotlight.ShowPercent; @@ -77,7 +77,9 @@ Spotlight.Status[key].Completed = select(3, GetAchievementCriteriaInfo(value,1)); if not Spotlight.Status[key].Completed then Spotlight.Status[key].Progress = Spotlight.Calculate(key); - output = output .. string.format(" %.1s", key) .. ":" .. Spotlight.Format(key); + if Spotlight.Status[key].Progress > 0 then + output = output .. string.format(" %.1s", key) .. ":" .. Spotlight.Format(key); + end end end dataobj.icon = GetInventoryItemTexture("player", 16); @@ -111,7 +113,7 @@ if event == "VARIABLES_LOADED" then Initialize(); end - if event == "CRITERIA_UPDATE" then + if event == "CRITERIA_UPDATE" or "PLAYER_ENTERING_WORLD" then Spotlight.Update(); end end @@ -119,5 +121,6 @@ local EventListener = CreateFrame("FRAME", "Spotlight"); EventListener:RegisterEvent("VARIABLES_LOADED"); EventListener:RegisterEvent("CRITERIA_UPDATE"); +EventListener:RegisterEvent("PLAYER_ENTERING_WORLD"); EventListener:SetScript("OnEvent", EventHandler);