View Single Post
01-26-11, 09:34 PM   #6
Kendian
A Molten Giant
 
Kendian's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 614
Originally Posted by Seerah View Post
Fixed. That one there will only fire for your target.

/edit: you also need to change the OnEvent (btw, checking for the event isn't needed since we're only registering for one event anyway)

Code:
-- OnEvent
local _, class = UnitClass("target")
if class then
	if (class=="DEATHKNIGHT") then
		self.bg:SetVertexColor(0.77, 0.12, 0.23, self.bg:GetAlpha())
	elseif (class=="DRUID") then
		self.bg:SetVertexColor(1,0.49,0.04, self.bg:GetAlpha())
	elseif (class=="HUNTER") then
		self.bg:SetVertexColor(0.67,0.83,0.45, self.bg:GetAlpha())
	elseif (class=="MAGE") then
		self.bg:SetVertexColor(0.41,0.8,0.94, self.bg:GetAlpha())
	elseif (class=="PALADIN") then
		self.bg:SetVertexColor(0.96,0.55,0.73, self.bg:GetAlpha())
	elseif (class=="PRIEST") then
		self.bg:SetVertexColor(1,1,1, self.bg:GetAlpha())
	elseif (class=="ROGUE") then
		self.bg:SetVertexColor(1,0.96,0.41, self.bg:GetAlpha())
	elseif (class=="SHAMAN") then
		self.bg:SetVertexColor(0,0.44,0.87, self.bg:GetAlpha())
	elseif (class=="WARLOCK") then
		self.bg:SetVertexColor(0.58,0.51,0.79, self.bg:GetAlpha())
	elseif (class=="WARRIOR") then
		self.bg:SetVertexColor(0.78,0.61,0.43, self.bg:GetAlpha())
	end
end
Sigh...I need to wear a helmet in public, I suppose ( my brain is mushy)...how would I apply this to BORDER of targets panel?
  Reply With Quote