View Single Post
08-14-20, 12:21 AM   #2
Kanegasi
A Molten Giant
 
Kanegasi's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2007
Posts: 666
Lua Code:
  1. hooksecurefunc("CompactUnitFrame_UpdateName",function(frame)
  2.     local arena
  3.     if IsActiveBattlefieldArena() and frame.unit:find("nameplate") then
  4.         for i=1,5 do
  5.             if UnitIsUnit(frame.unit,"arena"..i) then
  6.                 frame.name:SetText(i)
  7.                 frame.name:SetTextColor(1,1,0)
  8.                 arena=true
  9.                 break
  10.             end
  11.         end
  12.     end
  13.     if not arena and ShouldShowName(frame) then
  14.         if frame.optionTable.colorNameBySelection then
  15.             frame.name:SetText(GetUnitName(frame.unit))
  16.         end
  17.     end
  18. end)
  Reply With Quote