Originally Posted by ObbleYeah
I've been working on cleaning my code up for a while and my health update is the final bit to do :P
Tried it but getting the error: bad argument #1 to 'unpack' (table expected, got number)
|
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