625925f - Remove safeties, possible tainting
[wowui.git] / RaidFrameCustomization / UpdateStatusTextHook.lua
index 6fdf535..3df8d5b 100644 (file)
@@ -5,7 +5,9 @@ local UnitHealth = UnitHealth;
 local format = string.format
 
 hooksecurefunc("CompactUnitFrame_UpdateStatusText", function(frame)
-    if frame and not frame:IsForbidden() and frame:GetName():match("^CompactRaidFrame%d") then
+    -- allowClassColorsForNPCs only in regular raid frames,
+    -- match only to them
+    if frame.optionTable.allowClassColorsForNPCs ~= nil then
         -- conditions taken from CompactUnitFrame.lua
         if not UnitIsConnected(frame.unit) or UnitIsDeadOrGhost(frame.displayedUnit) then
             return;