Thread Tools Display Modes
Prev Previous Post   Next Post Next
11-20-12, 02:27 AM   #1
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
Casters Classcolor.

Hey fellow Wowiers!

Im currently tracking buffs and debuffs on my raidframes, i would like to try and have my bufficons border colored by the class it is cast from, if that makes sense.

Currently the part of the code looks like this were i color the border..

Lua Code:
  1. local buffcolor = { r = 1.0, g = 1.0, b = 0 }
  2. local updateBuff = function(icon, texture, count, dtype, duration, expires, buff)
  3. local color = buffcolor
  4. icon.border:SetBackdropBorderColor(color.r, color.g, color.b,1)

Tried a couple things but getting errors and my lua knowledge is very limited..have a feeling i need to get this to work with the color function somehow?

Lua Code:
  1. local _, class = UnitClass(unit)
  2. local color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]

Im probably really off here and it makes me feel really dumb :P.. so if anyone could point me in the right direction i'd be thankful!

EDIT: If you need more code to be able to help out let me know! thank you.
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Casters Classcolor.


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