Thread Tools Display Modes
10-08-08, 10:30 AM   #1
Oakayam
Premium Member
 
Oakayam's Avatar
Join Date: Apr 2007
Posts: 40
How to globally change reaction color.

Heya

Is it possible to globally change the UnitReactionColors? I have been using
Code:
RAID_CLASS_COLORS
to change the class colors but I haven't been able to come up with the script to deal with reaction colors. I'm not trying to attach the script to any specific addon atm, I would like to change the default UI behavior.

Any help would be appreciated.
__________________
  Reply With Quote
10-08-08, 07:53 PM   #2
Duugu
Premium Member
 
Duugu's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 851
This is from the default TargetFrame.lua:

Code:
UnitReactionColor = {
	{ r = 1.0, g = 0.0, b = 0.0 },
	{ r = 1.0, g = 0.0, b = 0.0 },
	{ r = 1.0, g = 0.5, b = 0.0 },
	{ r = 1.0, g = 1.0, b = 0.0 },
	{ r = 0.0, g = 1.0, b = 0.0 },
	{ r = 0.0, g = 1.0, b = 0.0 },
	{ r = 0.0, g = 1.0, b = 0.0 },
};
You could change this table.
  Reply With Quote
10-09-08, 04:04 PM   #3
Oakayam
Premium Member
 
Oakayam's Avatar
Join Date: Apr 2007
Posts: 40
Yes this was a first thing I tried but it doesn't seem to work. Perhaps I'm using it wrong? All I am doing it loading a file with with few lines of raw code. No functions, events, frames. I'm not sure why it works fine for class colors but wont for reaction colors.
__________________

Last edited by Oakayam : 10-09-08 at 04:18 PM.
  Reply With Quote
10-10-08, 06:35 PM   #4
Cirk
A Cobalt Mageweaver
 
Cirk's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2006
Posts: 226
GameTooltip_UnitColor(unit) is the function used for setting the reaction color in the tooltip. You could probably hook that without taint problems.

In WoW 3.0, the UnitReactionColor table has been replaced with the function:
Code:
ref, green, blue, alpha = UnitSelectionColor(unit)
Which is called in a bunch of places. I've no idea if hooking that would cause you taint issues.

-- Cirk
__________________
Cirk's Addons
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » How to globally change reaction color.

Thread Tools
Display Modes

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