cd17ca17b212f276ff3508d375303fad6143fdfc
[wowui.git] / RaidFrameCustomization / UpdateNameHook.lua
1 local UnitName = UnitName;
2
3 hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
4     -- allowClassColorsForNPCs only in regular raid frames,
5     -- match only to them
6     if frame.optionTable.allowClassColorsForNPCs ~= nil then
7         local name, _;
8         name, _ = UnitName(frame.unit);
9         if name then
10             frame.name:SetText(name);
11         end
12     end
13 end);