local normalBarColor = CreateColor(0.3, 0.3, 0.3); local dispelBarColor = CreateColor(1, 0.5, 0); local normalBackColor = {0.7, 0.7, 0.7}; local dispelBackColor = {0.5, 0.2, 0}; local UnitDebuff = UnitDebuff; local CompactUnitFrame_UpdateHealthColor = CompactUnitFrame_UpdateHealthColor; local CompactRaidFrameContainer_ApplyToFrames = CompactRaidFrameContainer_ApplyToFrames; hooksecurefunc("CompactRaidFrameContainer_LayoutFrames", function(frame) if not frame then return end CompactRaidFrameContainer_ApplyToFrames(frame, "normal", function(frame) if frame then -- used in CompactUnitFrame_UpdateHealthColor, might not be set prior frame.optionTable.healthBarColorOverride = normalBarColor; frame.background:SetColorTexture(unpack(normalBackColor)); end end); end); hooksecurefunc("CompactUnitFrame_UpdateDispellableDebuffs", function(frame) if frame and not frame:IsForbidden() and frame:GetName():match("^CompactRaidFrame%d") then -- try to find dispellable debuff if UnitDebuff(frame.displayedUnit, 1, "RAID") ~= nil then frame.optionTable.healthBarColorOverride = dispelBarColor; if frame.background then frame.background:SetColorTexture(unpack(dispelBackColor)); end else frame.optionTable.healthBarColorOverride = normalBarColor; if frame.background then frame.background:SetColorTexture(unpack(normalBackColor)); end end -- update color CompactUnitFrame_UpdateHealthColor(frame); end end);