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;