7e6c1d4 - Detach indicators from protected frames
[wowui.git] / OmaRF / UpdateNameHook.lua
index cd17ca1..8165c7d 100644 (file)
@@ -1,13 +1,19 @@
 local UnitName = UnitName;
 
-hooksecurefunc("CompactUnitFrame_UpdateName", function(frame)
+local function nameHook(frame)
+    if InCombatLockdown() then
+        table.insert(OmaRF.ooc_queue, {func = nameHook, args = {frame}});
+        return;
+    end
     -- allowClassColorsForNPCs only in regular raid frames,
     -- match only to them
     if frame.optionTable.allowClassColorsForNPCs ~= nil then
         local name, _;
         name, _ = UnitName(frame.unit);
         if name then
+            frame.name:SetFont(STANDARD_TEXT_FONT, 12, "");
             frame.name:SetText(name);
         end
     end
-end);
+end
+hooksecurefunc("CompactUnitFrame_UpdateName", nameHook);