Mercurial > wow > inventory
diff Summary.lua @ 7:1a815139e4c3 v0.1.1-BETA
Fixed pullout hiding to avoid fatal errors.
Updated TOC to include dependencies.
Updated summary to stop timer when closing the window and to make AH mods optional.
author | Zerotorescue |
---|---|
date | Fri, 08 Oct 2010 17:10:34 +0200 |
parents | 9fff13c08f99 |
children | 3bac0bdd59e2 |
line wrap: on
line diff
--- a/Summary.lua Fri Oct 08 16:38:47 2010 +0200 +++ b/Summary.lua Fri Oct 08 17:10:34 2010 +0200 @@ -73,6 +73,7 @@ mod.frame:SetLayout("Fill"); mod.frame:SetCallback("OnClose", function(widget) AceGUI:Release(widget); + mod:CancelTimer(self.tmrUpdater, true); end); -- ScrollFrame child @@ -280,6 +281,7 @@ if CACHE_ITEMS_TOTAL > 0 then cacheStart = GetTime(); + self:CancelTimer(self.tmrUpdater, true); self.tmrUpdater = self:ScheduleRepeatingTimer("UpdateNextItem", .01); -- Once every 100 frames (or once every x frames if you have less than 100 FPS, basically, once every frame) end end @@ -308,7 +310,7 @@ i = i + 1; CACHE_ITEMS_CURRENT = CACHE_ITEMS_CURRENT + 1; - mod.frame:SetStatusText("Caching auction values and item-counts... " .. floor(CACHE_ITEMS_CURRENT / CACHE_ITEMS_TOTAL * 100) .. "% has already been processed."); + mod.frame:SetStatusText(("Caching auction values and item-counts... %d% has already been processed."):format(floor(CACHE_ITEMS_CURRENT / CACHE_ITEMS_TOTAL * 100))); if i >= CACHE_ITEMS_PER_UPDATE then return; @@ -349,7 +351,11 @@ end function mod:DisplayMoney(value, priceThreshold) - if value < priceThreshold then + if value == -1 then + return "|cff0000ffNone up|r"; + elseif value == -2 then + return "|cff0000ffNo AH mod|r"; + elseif value < priceThreshold then return ("|cffff0000%s|r"):format(addon:ReadableMoney(value or 0, true)); else return addon:ReadableMoney(value or 0, true);