From a2b603a1f9bd30023e208be584b1259f9d8de188 Mon Sep 17 00:00:00 2001 From: Adrian L Lange Date: Tue, 23 Sep 2014 15:23:45 +0200 Subject: [PATCH] Remove pointless fallbacks and callbacks that we won't ever use --- elements/burningembers.lua | 15 --------------- elements/demonicfury.lua | 12 ------------ 2 files changed, 27 deletions(-) diff --git a/elements/burningembers.lua b/elements/burningembers.lua index fe8a37f..3b1de57 100644 --- a/elements/burningembers.lua +++ b/elements/burningembers.lua @@ -16,10 +16,6 @@ local function UNIT_POWER(self, event, unit, powerType) element[index]:SetValue(cur) cur = cur - 10 end - - if(element.PostUpdatePower) then - return element:PostUpdatePower(unit, total, max) - end end local function UPDATE_VISIBILITY(self) @@ -43,10 +39,6 @@ local function UPDATE_VISIBILITY(self) element[index]:Hide() end end - - if(element.PostUpdateVisibility) then - return element:PostUpdateVisibility(self.unit) - end end local function Update(self, ...) @@ -71,13 +63,6 @@ local function Enable(self, unit) self:RegisterEvent('SPELLS_CHANGED', UPDATE_VISIBILITY, true) self:RegisterEvent('UNIT_POWER_FREQUENT', UNIT_POWER) - for index = 1, 4 do - local Ember = element[index] - if(Ember:GetObjectType() == 'StatusBar' and not Ember:GetStatusBarTexture()) then - Ember:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - end - return true end end diff --git a/elements/demonicfury.lua b/elements/demonicfury.lua index bc88299..61b3e01 100644 --- a/elements/demonicfury.lua +++ b/elements/demonicfury.lua @@ -23,10 +23,6 @@ local function UNIT_POWER(self, event, unit, powerType) element:SetMinMaxValues(0, max) element:SetValue(cur) - - if(element.PostUpdatePower) then - return element:PostUpdatePower(unit, cur, max) - end end local function UPDATE_VISIBILITY(self) @@ -46,10 +42,6 @@ local function UPDATE_VISIBILITY(self) else element:Hide() end - - if(element.PostUpdateVisibility) then - return element:PostUpdateVisibility(self.unit) - end end local function Update(self, ...) @@ -70,10 +62,6 @@ local function Enable(self, unit) self:RegisterEvent('SPELLS_CHANGED', UPDATE_VISIBILITY, true) self:RegisterEvent('UNIT_POWER_FREQUENT', UNIT_POWER) - if(element:GetObjectType() == 'StatusBar' and not element:GetStatusBarTexture()) then - element:SetStatusBarTexture([[Interface\TargetingFrame\UI-StatusBar]]) - end - return true end end -- 1.7.9.5