View Single Post
07-16-12, 01:06 AM   #3
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 331
Originally Posted by Phanx View Post
The colorStr keys have been part of RAID_CLASS_COLORS at least since they enabled addons in the MoP beta, in case anyone was wondering.
What would be the best way to easily create a table for just the hex values of those strings, i.e. just clip the 'ff' off at the start?

Lua Code:
  1. HEX_CLASS_COLORS = {};
  2. for i=1,#CLASS_SORT_ORDER do
  3.     local str = RAID_CLASS_COLORS[CLASS_SORT_ORDER[i]].colorStr;
  4.     local str = -- Do action here that changes str to correct str;
  5.     HEX_CLASS_COLORS[CLASS_SORT_ORDER[i]] = str;
  6. end

edit: local str = gsub(str,"(ff)","",1)

seems to do the trick.

Last edited by suicidalkatt : 07-16-12 at 01:14 AM.