From c75ffcc6fc0285c68eb7079694f2a5d4f5f9a362 Mon Sep 17 00:00:00 2001 From: Parnic Date: Sat, 28 May 2016 23:58:23 -0500 Subject: [PATCH] Fixed error generated when gaining a max combo point When loading into the game as an Outlaw, the mod was creating 5 slots for combo points. Switching to Assassination increases the max to 6, but the module was failing to compensate for this and causing an error instead. --- modules/ComboPoints.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/ComboPoints.lua b/modules/ComboPoints.lua index 14794c1..4864d47 100644 --- a/modules/ComboPoints.lua +++ b/modules/ComboPoints.lua @@ -290,11 +290,11 @@ function ComboPoints.prototype:CreateFrame() self.frame:SetFrameStrata("BACKGROUND") if self.moduleSettings.graphicalLayout == "Horizontal" then - self.frame:SetWidth((self.comboSize - 5)*self.GetMaxComboPoints()) + self.frame:SetWidth((self.comboSize - 5)*self:GetMaxComboPoints()) self.frame:SetHeight(1) else self.frame:SetWidth(1) - self.frame:SetHeight(self.comboSize*self.GetMaxComboPoints()) + self.frame:SetHeight(self.comboSize*self:GetMaxComboPoints()) end self.frame:ClearAllPoints() self.frame:SetPoint("TOP", self.parent, "BOTTOM", self.moduleSettings.hpos, self.moduleSettings.vpos) @@ -323,7 +323,7 @@ function ComboPoints.prototype:CreateComboFrame(forceTextureUpdate) end local i - local maxComboPoints = self.GetMaxComboPoints() + local maxComboPoints = self:GetMaxComboPoints() -- create backgrounds for i = 1, maxComboPoints do @@ -463,6 +463,10 @@ function ComboPoints.prototype:UpdateComboPoints(...) points = points or 0 anticipate = self.moduleSettings.showAnticipation and anticipate or 0 + if self:GetMaxComboPoints() > #self.frame.graphical then + self:CreateFrame() + end + if (self.moduleSettings.comboMode == "Numeric") then local r, g, b = self:GetColor("ComboPoints") if (self.moduleSettings.gradient and points) then