if(UnitExists(unit) and ColoredTooltips_Config["ENABLE"] == 1) then |
local r, g, b = GameTooltip_UnitColor(unit); |
local changed = false; |
local playerFaction = UnitFactionGroup("player") |
local unitFaction = UnitFactionGroup(unit) |
|
GameTooltipTextLeft1:SetTextColor(1,1,1); |
if (ColoredTooltips_Config["COLOR"] == 1) then |
-- Set tooltip bg to blue for players |
-- Set tooltip bg to blue for players of the same faction, red for opposite faction |
if(r == 1 and g == 1 and b == 1) then |
r = 0; |
g = 0; |
if playerFaction == unitFaction then |
r = 0 |
g = 0 |
else |
r = 0.8; |
g = 0.3; |
b = 0.22; |
end |
end |
changed = true; |
end |