*** GridStatusHots.lua~	2010-10-21 06:28:46.000000000 -0700
--- GridStatusHots.lua	2010-12-29 15:12:37.000000000 -0800
***************
*** 30,35 ****
--- 30,36 ----
  spellNameCache.Lifebloom2 = GetSpellInfo(94447);
  spellNameCache.Regrowth = GetSpellInfo(8936);
  spellNameCache.Rejuvenation = GetSpellInfo(774);
+ spellNameCache.Tranquility = GetSpellInfo(44203);
  spellNameCache.WildGrowth = GetSpellInfo(48438);
  
  --Paladin
***************
*** 122,127 ****
--- 123,141 ----
  		color2 = { r = 1, g = 1, b = 0, a = 1 },
  		color3 = { r = 1, g = 0, b = 0, a = 1 },
  	},
+ 	alert_tranq = {
+ 		text = L["Hots: My Tranquility"],
+ 		desc = L["Hots: My Tranquility"],
+ 		enable = true,
+ 		totshow = true,
+ 		priority = 95,
+ 		range = false,
+ 		threshold2 = 4,
+ 		threshold3 = 2,
+ 		color = { r = 1, g = 0, b = 1, a = 1 },
+ 		color2 = { r = 1, g = 1, b = 0, a = 1 },
+ 		color3 = { r = 1, g = 0, b = 0, a = 1 },
+ 	},
  	alert_wgrowth = {
  		text = L["Hots: My Wild Growth"],
  		desc = L["Hots: My Wild Growth"],
***************
*** 722,727 ****
--- 736,815 ----
  	},
  }
  
+ local tranq_hotcolors = {
+ 	["threshold2"] = {
+ 		type = "range",
+ 		name = L["Threshold to activate color 2"],
+ 		desc = L["Threshold to activate color 2"],
+ 		max = 10,
+ 		min = 1,
+ 		step = .5,
+ 		get = function ()
+ 			return GridStatusHots.db.profile.alert_tranq.threshold2
+ 		end,
+ 		set = function (_, v)
+ 			GridStatusHots.db.profile.alert_tranq.threshold2 = v
+ 		end,
+ 	},
+ 	["color2"] = {
+ 		type = "color",
+ 		name = L["Color 2"],
+ 		desc = L["Color 2"],
+ 		hasAlpha = true,
+ 		get = function ()
+ 			local color = GridStatusHots.db.profile.alert_tranq.color2
+ 			return color.r, color.g, color.b, color.a
+ 		end,
+ 		set = function (_, r, g, b, a)
+ 			local color = GridStatusHots.db.profile.alert_tranq.color2
+ 			color.r = r
+ 			color.g = g
+ 			color.b = b
+ 			color.a = a or 1
+ 		end,
+ 	},
+ 	["threshold3"] = {
+ 		type = "range",
+ 		name = L["Threshold to activate color 3"],
+ 		desc = L["Threshold to activate color 3"],
+ 		max = 10,
+ 		min = 1,
+ 		step = .5,
+ 		get = function ()
+ 			return GridStatusHots.db.profile.alert_tranq.threshold3
+ 		end,
+ 		set = function (_, v)
+ 			GridStatusHots.db.profile.alert_tranq.threshold3 = v
+ 		end,
+ 	},
+ 	["color3"] = {
+ 		type = "color",
+ 		name = L["Color 3"],
+ 		desc = L["Color 3"],
+ 		hasAlpha = true,
+ 		get = function ()
+ 			local color = GridStatusHots.db.profile.alert_tranq.color3
+ 			return color.r, color.g, color.b, color.a
+ 		end,
+ 		set = function (_, r, g, b, a)
+ 			local color = GridStatusHots.db.profile.alert_tranq.color3
+ 			color.r = r
+ 			color.g = g
+ 			color.b = b
+ 			color.a = a or 1
+ 		end,
+ 	},
+ 	["totshow"] = {
+ 		type = "toggle",
+ 		name = L["Show HoT-Counter"],
+ 		desc = L["Check, if you want to see the total of HoTs behind the countdown of your HoT(i.e. 13-5)"],
+ 		get = function () return GridStatusHots.db.profile.alert_tranq.totshow end,
+ 		set = function (_, arg)
+ 			GridStatusHots.db.profile.alert_tranq.totshow = arg
+ 		end,
+ 	},
+ }
+ 
  local wgrowth_hotcolors = {
  	["threshold2"] = {
  		type = "range",
***************
*** 1522,1527 ****
--- 1610,1616 ----
  		self:RegisterStatus("alert_regrow", L["Hots: My Regrowth"], regrow_hotcolors)
  		self:RegisterStatus("alert_lifebl", L["Hots: My Lifebloom"], lifebl_hotcolors)
  		self:RegisterStatus("alert_lifebl_stack", L["Hots: My Lifebloom Stack Colored"], lifebl_stack_hotcolors)
+ 		self:RegisterStatus("alert_tranq", L["Hots: My Tranquility"], tranq_hotcolors)
  		self:RegisterStatus("alert_wgrowth", L["Hots: My Wild Growth"], wgrowth_hotcolors)
  	end
  	if englishClass == "PALADIN" then
***************
*** 1553,1558 ****
--- 1642,1648 ----
  		self:UnregisterStatus("alert_regrow")
  		self:UnregisterStatus("alert_lifebl")
  		self:UnregisterStatus("alert_lifebl_stack")
+ 		self:UnregisterStatus("alert_tranq")
  		self:UnregisterStatus("alert_wgrowth")
  	end
  	if englishClass == "PALADIN" then
***************
*** 1580,1586 ****
  
  function UpdateUnit(self, guid, unitid)
  	local total_hots, lbstack, pomstack, grastack, esstack = 0, 0, 0, 0, 0;
! 	local asptime,retime,rjtime,rgtime,lbtime,wgtime,sltime,sstime,ritime,pomtime,pwstime,boltime,eltime,estime,gratime,gifttime
  	local wstime
  
  	local now = GetTime()
--- 1670,1676 ----
  
  function UpdateUnit(self, guid, unitid)
  	local total_hots, lbstack, pomstack, grastack, esstack = 0, 0, 0, 0, 0;
! 	local asptime,retime,rjtime,rgtime,lbtime,tqtime,wgtime,sltime,sstime,ritime,pomtime,pwstime,boltime,eltime,estime,gratime,gifttime
  	local wstime
  
  	local now = GetTime()
***************
*** 1612,1617 ****
--- 1702,1710 ----
  				lbtime = btime
  				lbstack = bcount
  			end
+ 		elseif bname == spellNameCache["Tranquility"] then
+ 			total_hots = total_hots + 1;
+ 			if (bismine == "player" and btime) then tqtime = btime end
  		elseif bname == spellNameCache["WildGrowth"] then
  			total_hots = total_hots + 1;
  			if (bismine == "player" and btime) then wgtime = btime end
***************
*** 1829,1834 ****
--- 1922,1952 ----
  		if self.core:GetCachedStatus(guid, "alert_lifebl_stack") then self.core:SendStatusLost(guid, "alert_lifebl_stack") end
  	end
  
+ 	--Tranquility
+ 	if tqtime and self.db.profile.alert_tranq.enable then
+ 		local settings = self.db.profile.alert_tranq
+ 		local hotcolor = settings.color
+ 		if tqtime <= settings.threshold2 then hotcolor = settings.color2 end
+ 		if tqtime <= settings.threshold3 then hotcolor = settings.color3 end
+ 		if settings.totshow then
+ 			self.core:SendStatusGained(guid, "alert_tranq",
+ 				settings.priority,
+ 				(settings.range and 40),
+ 				hotcolor,
+ 				tostring(math.floor(tqtime).."-"..tostring(total_hots))
+ 			)
+ 		else
+ 			self.core:SendStatusGained(guid, "alert_tranq",
+ 				settings.priority,
+ 				(settings.range and 40),
+ 				hotcolor,
+ 				tostring(math.floor(tqtime))
+ 			)
+ 		end
+ 	else
+ 		if self.core:GetCachedStatus(guid, "alert_tranq") then self.core:SendStatusLost(guid, "alert_tranq") end
+ 	end
+ 
  	--Wild Growth
  	if wgtime and self.db.profile.alert_wgrowth.enable then
  		local settings = self.db.profile.alert_wgrowth
