Lua Code:
hooksecurefunc("CompactUnitFrame_UpdateName",function(frame)
local arena
if IsActiveBattlefieldArena() and frame.unit:find("nameplate") then
for i=1,5 do
if UnitIsUnit(frame.unit,"arena"..i) then
frame.name:SetText(i)
frame.name:SetTextColor(1,1,0)
arena=true
break
end
end
end
if not arena and ShouldShowName(frame) then
if frame.optionTable.colorNameBySelection then
frame.name:SetText(GetUnitName(frame.unit))
end
end
end)