Quantcast

Remove pointless fallbacks and callbacks that we won't ever use

Adrian L Lange [09-23-14 - 13:23]
Remove pointless fallbacks and callbacks that we won't ever use
Filename
elements/burningembers.lua
elements/demonicfury.lua
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