View Single Post
12-04-08, 11:03 AM   #283
Slakah
A Molten Giant
 
Slakah's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2007
Posts: 863
Originally Posted by p3lim View Post
wups, forgot how UnitSelectionColor returned

Code:
local color
if(UnitIsPlayer(unit)) then
	local localized, english = UnitClass(unit)
	color = self.colors.class[english]
else
	color = {UnitSelectionColor(unit)}
end

self.Health.bg:SetVertexColor(unpack(color))

if(self.Portraitglosst) then
	self.Portraitglosst:SetVertexColor(unpack(color))
end
I wouldn't create a table, why not just pass UnitSelectionColor directly to SetVertexColor?