Thread Tools Display Modes
Prev Previous Post   Next Post Next
12-04-08, 10:32 AM   #11
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
Originally Posted by p3lim View Post
First off, your code is far from readable, took me a bit to read that piece of code.

Try the following
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'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)
 
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » oUF - Layout discussion


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off