Hi, im making an ui and i want my target panel to be hostile colored.. aka "faction colored" and class color if its a friendly target :P my script only uses class color but i need help to make it better:P
on load:
self:RegisterEvent("PLAYER_TARGET_CHANGED")
on event:
if UnitExists("target") then
local _, Class = UnitClass("target")
local Color = RAID_CLASS_COLORS[Class] or {r = 1, g = 1, b = 1}
self.bg:SetVertexColor(Color.r, Color.g, Color.b, self.bg:GetAlpha())
end
Any help appriciated