View Single Post
11-12-08, 04:48 AM   #242
Quokka
A Chromatic Dragonspawn
 
Quokka's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2005
Posts: 196
I know that thread can be shown static or with a bar.

Code:
	local function OverrideUpdateThreat(self, event, unit)
	local isTanking, state, scaledPercent, rawPercent, threatValue = UnitDetailedThreatSituation("player", unit)
		if threatValue < 50 then
			self.Threat:SetText("[-]")
			self.Threat:SetTextColor(r,g,b)
                        self.Threat:Show()
		if threatValue > 50 and  threatValue < 90 then
			self.Threat:SetText("[50%]")
			self.Threat:SetTextColor(r,g,b)
                        self.Threat:Show()
		elseif threatValue > 90 then	
			self.Threat:SetText("[90%]")
			self.Threat:SetTextColor(r,g,b)
			self.Threat:Show()
		elseif (class == 'HUNTER') and threatValue > 110 then	
			self.Threat:SetText("[110% FD]")
			self.Threat:SetTextColor(r,g,b)
			self.Threat:Show()
		else
			self.Threat:Hide()
		end
	end
I'd like to have some textbased warning
But for some reason I'ts not working I know i'm missing something

Last edited by Quokka : 11-12-08 at 06:14 AM.