7e6c1d4 - Detach indicators from protected frames
[wowui.git] / OmaRF / UpdateNameHook.lua
1 local UnitName = UnitName;
2
3 local function nameHook(frame)
4     if InCombatLockdown() then
5         table.insert(OmaRF.ooc_queue, {func = nameHook, args = {frame}});
6         return;
7     end
8     -- allowClassColorsForNPCs only in regular raid frames,
9     -- match only to them
10     if frame.optionTable.allowClassColorsForNPCs ~= nil then
11         local name, _;
12         name, _ = UnitName(frame.unit);
13         if name then
14             frame.name:SetFont(STANDARD_TEXT_FONT, 12, "");
15             frame.name:SetText(name);
16         end
17     end
18 end
19 hooksecurefunc("CompactUnitFrame_UpdateName", nameHook);