From 5ca6f209442dba3fda2aa3f97eb6c13957328aac Mon Sep 17 00:00:00 2001 From: Parnic Date: Tue, 19 Jul 2016 10:11:58 -0500 Subject: [PATCH] Fixed minor inefficient texture access Also fixed an issue where we were looking for a variable that was not declared in the scope we were looking for it in. --- modules/ClassPowerCounter.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/ClassPowerCounter.lua b/modules/ClassPowerCounter.lua index 99e6815..475db11 100644 --- a/modules/ClassPowerCounter.lua +++ b/modules/ClassPowerCounter.lua @@ -784,10 +784,10 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune) self.frame.graphical[rune]:SetPoint("CENTER", 0, -1 * (runeAdjust * (self.runeHeight-5) + runeAdjust + (runeAdjust * self.moduleSettings.runeGap))) end + local tex = self:GetRuneTexture(rune) if self:GetRuneMode() == "Graphical" then - local tex = self:GetRuneTexture(rune) if tex then - self.frame.graphical[rune].rune:SetTexture(self:GetRuneTexture(rune)) + self.frame.graphical[rune].rune:SetTexture(tex) else self.frame.graphical[rune].rune:SetAtlas(self:GetRuneAtlas(rune), self:UseAtlasSize(rune)) end @@ -801,7 +801,7 @@ function IceClassPowerCounter.prototype:SetupRuneTexture(rune) self.frame.graphical[rune].rune:SetTexture(IceElement.TexturePath .. "ComboCleanCurves") end if tex then - self.frame.graphical[rune].runebg:SetTexture(self.frame.graphical[rune].rune:GetTexture()) + self.frame.graphical[rune].runebg:SetTexture(tex) else self.frame.graphical[rune].runebg:SetAtlas(self.frame.graphical[rune].rune:GetAtlas()) end