View Single Post
11-26-17, 11:23 AM   #5
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 309
Pretty sure the PlayerHitIndicator text is drawn on sort of like Blizzard's combat text so, the only ways to change it are by changing fonts or disabling it completely.

As for the name color stuff....

Code:
local function getPlayerColors(unit)

   if not UnitExists(unit) then return end

   local color
   local class = select(2, UnitClass(unit))

   if UnitIsPlayer(unit) then
      color = (CUSTOM_CLASS_COLORS or RAID_CLASS_COLORS)[class]
   else
      color = FACTION_BAR_COLORS[UnitReaction(unit, "player")]
   end

   return color.r, color.g, color.b

end

local UpdateColor = CreateFrame("Frame")
UpdateColor:RegisterEvent("PLAYER_ENTERING_WORLD")
UpdateColor:RegisterEvent("PLAYER_TARGET_CHANGED")
UpdateColor:RegisterEvent("PLAYER_FOCUS_CHANGED")
UpdateColor:RegisterEvent("UNIT_FACTION")
UpdateColor:SetScript("OnEvent", function(_, event)

   _G["PlayerName"]:SetTextColor(getPlayerColors("player"))
   _G["TargetFrameTextureFrameName"]:SetTextColor(getPlayerColors("target"))
   _G["FocusFrameTextureFrameName"]:SetTextColor(getPlayerColors("focus"))

end)
  Reply With Quote