From 72865dca532cc1e74c05a6ec9f0daef26b0fb6a2 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Sun, 27 Dec 2009 03:40:48 +0100 Subject: [PATCH] Simplify the debuff filter and color all player units to be colored by debuff type --- oUF_P3lim.lua | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua index 03fa3d7..8559ac6 100644 --- a/oUF_P3lim.lua +++ b/oUF_P3lim.lua @@ -14,6 +14,12 @@ local backdrop = { insets = {top = -1, bottom = -1, left = -1, right = -1} } +local playerUnits = { + player = true, + pet = true, + vehicle = true, +} + local colors = setmetatable({ power = setmetatable({ MANA = {0, 144/255, 1} @@ -99,13 +105,13 @@ local function updateDebuff(self, icons, unit, icon, index) local name, _, _, _, dtype = UnitAura(unit, index, icon.filter) if(icon.debuff) then - if(not debuffFilter[name] and not UnitIsFriend('player', unit) and icon.owner ~= 'player' and icon.owner ~= 'vehicle') then - icon:SetBackdropColor(0, 0, 0) - icon.icon:SetDesaturated(true) - else + if(debuffFilter[name] or playerUnits[icon.owner]) then local color = DebuffTypeColor[dtype] or DebuffTypeColor.none icon:SetBackdropColor(color.r * 0.6, color.g * 0.6, color.b * 0.6) icon.icon:SetDesaturated(false) + else + icon:SetBackdropColor(0, 0, 0) + icon.icon:SetDesaturated(true) end end end -- 1.7.9.5