625925f - Remove safeties, possible tainting
[wowui.git] / RaidFrameCustomization / UpdateDispellableDebuffsHook.lua
index bf95832..5ff9e0a 100644 (file)
@@ -6,7 +6,9 @@ local UnitDebuff = UnitDebuff;
 local CompactUnitFrame_UpdateHealthColor = CompactUnitFrame_UpdateHealthColor;
 
 hooksecurefunc("CompactUnitFrame_UpdateDispellableDebuffs", 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
         -- try to find dispellable debuff
         if UnitDebuff(frame.displayedUnit, 1, "RAID") ~= nil then
             frame.optionTable.healthBarColorOverride = dispelBarColor;