Quantcast

Clamp infinite time values to one hour when displayed on an icon.

Johnny C. Lam [10-15-13 - 01:25]
Clamp infinite time values to one hour when displayed on an icon.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1053 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleIcone.lua
diff --git a/OvaleIcone.lua b/OvaleIcone.lua
index a1960c7..411054b 100644
--- a/OvaleIcone.lua
+++ b/OvaleIcone.lua
@@ -32,8 +32,11 @@ local function SetValue(self, value, actionTexture)
 	self.aPortee:Hide()
 	self.shortcut:Hide()
 	if value then
-		if value<10 then
+		if value < 10 then
 			self.remains:SetFormattedText("%.1f", value)
+		elseif value == math.huge then
+			-- Clamp infinite time values to 3600 (one hour)
+			self.remains:SetFormattedText("3600")
 		else
 			self.remains:SetFormattedText("%d", value)
 		end