From cf5b8ad1123891916a2981a992e111bc84563659 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Tue, 7 Feb 2012 18:04:42 +0100 Subject: [PATCH] Remove rip tracking --- oUF_P3lim.lua | 79 +++++++-------------------------------------------------- 1 file changed, 9 insertions(+), 70 deletions(-) diff --git a/oUF_P3lim.lua b/oUF_P3lim.lua index e6813f3..42f0f0d 100644 --- a/oUF_P3lim.lua +++ b/oUF_P3lim.lua @@ -36,74 +36,17 @@ local function PostCreateAura(element, button) button.icon:SetDrawLayer('ARTWORK') end -local CLEU, PostUpdateDebuff -do - local stack = 0 - function PostUpdateDebuff(element, unit, button, index) - local _, _, _, count, type, _, _, owner, _, _, id = UnitAura(unit, index, button.filter) - local color = DebuffTypeColor[type or 'none'] - - if(owner == 'player') then - button:SetBackdropColor(color.r * 3/5, color.g * 3/5, color.b * 3/5) - button.icon:SetDesaturated(false) - else - button:SetBackdropColor(0, 0, 0) - button.icon:SetDesaturated(true) - end - - if(id == 1079 and owner == 'player') then - if(stack) then - button.count:SetText(stack > 0 and stack or '') - end - elseif(not count or count < 2) then - button.count:SetText() - end - end - - local player, glyphed - function CLEU(self, ...) - if(not glyphed) then return end - if(not player) then - player = UnitGUID('player') - end - - local _, _, event, _, source, _, _, _, _, _, _, _, spell = ... - if(source ~= player) then return end +local function PostUpdateDebuff(element, unit, button, index) + local _, _, _, _, type = UnitAura(unit, index, button.filter) - if(spell == 1079) then - if(event == 'SPELL_AURA_APPLIED' or event == 'SPELL_AURA_REFRESH' or event == 'SPELL_AURA_REMOVED') then - stack = 0 - self.Debuffs:ForceUpdate() - end - end - - if(event == 'SPELL_DAMAGE') then - if(spell == 5221 and stack < 3) then - stack = stack + 1 - self.Debuffs:ForceUpdate() - elseif(spell == 22568) then - if(UnitHealth('target') / UnitHealthMax('target') <= 0.25) then - stack = 0 - self.Debuffs:ForceUpdate() - end - end - end + if(button.owner == 'player') then + local color = DebuffTypeColor[type or 'none'] + button:SetBackdropColor(color.r * 3/5, color.g * 3/5, color.b * 3/5) + button.icon:SetDesaturated(false) + else + button:SetBackdropColor(0, 0, 0) + button.icon:SetDesaturated(true) end - - local talentGroup - local talents = CreateFrame('Frame') - talents:RegisterEvent('PLAYER_TALENT_UPDATE') - talents:RegisterEvent('GLYPH_UPDATED') - talents:SetScript('OnEvent', function(self, event) - for index = 1, NUM_GLYPH_SLOTS do - local _, _, _, glyph = GetGlyphSocketInfo(index) - if(glyph == 54815) then - glyphed = true - return - end - end - glyphed = false - end) end local FilterPlayerBuffs @@ -193,10 +136,6 @@ local UnitSpecific = { self.Debuffs.CustomFilter = FilterTargetDebuffs self.Debuffs.PostUpdateIcon = PostUpdateDebuff - if(select(2, UnitClass('player')) == 'DRUID') then - self:RegisterEvent('COMBAT_LOG_EVENT_UNFILTERED', CLEU) - end - self.Power.PostUpdate = PostUpdatePower self:Tag(self.HealthValue, '[p3lim:status][p3lim:hostile][p3lim:friendly]') self:SetWidth(230) -- 1.7.9.5