local config = RaidFrameCustomization.db.profile[pos];
if not config.mine or UnitIsPlayer(caster) then
if config.showIcon and not config.useDefaultIcon then
- -- show icon TODO coloring
+ -- show icon
ind.icon:SetTexture(icon);
end
if config.showText then
-- TODO remove 1px border
hooksecurefunc("CompactRaidFrameContainer_LayoutFrames", function(frame)
- if not frame then return end
CompactRaidFrameContainer_ApplyToFrames(frame, "normal", function(frame)
- if frame then
- -- Health bar color --
- -- used in CompactUnitFrame_UpdateHealthColor, might not be set prior
- frame.optionTable.healthBarColorOverride = normalBarColor;
- frame.background:SetColorTexture(unpack(normalBackColor));
- -- Power bar display --
- local role = UnitGroupRolesAssigned(frame.unit);
- local options = DefaultCompactUnitFrameSetupOptions;
- if options.displayPowerBar and role ~= "HEALER" then
- frame.healthBar:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
- frame.powerBar:Hide();
- end
+ -- Health bar color --
+ -- used in CompactUnitFrame_UpdateHealthColor, might not be set prior
+ frame.optionTable.healthBarColorOverride = normalBarColor;
+ frame.background:SetColorTexture(unpack(normalBackColor));
+ -- Power bar display --
+ local role = UnitGroupRolesAssigned(frame.unit);
+ local options = DefaultCompactUnitFrameSetupOptions;
+ if options.displayPowerBar and role ~= "HEALER" then
+ frame.healthBar:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1);
+ frame.powerBar:Hide();
end
end);
end);
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;
local UnitName = UnitName;
hooksecurefunc("CompactUnitFrame_UpdateName", 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
local name, _;
name, _ = UnitName(frame.unit);
if name then
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;