Originally Posted by p3lim
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?