From fde12ef78f72ce34712a66669a29cc7bb6fcbf57 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Fri, 31 Jul 2020 18:25:12 +0300 Subject: [PATCH] from retail --- WeakAuras/GenericTrigger.lua | 2 +- WeakAuras/RegionTypes/AuraBar.lua | 4 +--- WeakAurasOptions/OptionsFrames/MoverSizer.lua | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index a4f5c79..74f96c6 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -3397,7 +3397,7 @@ function GenericTrigger.GetOverlayInfo(data, triggernum) WeakAuras.ActivateAuraEnvironment(nil); local count = 0; for id, state in pairs(allStates) do - if (state.additionalProgress) then + if (type(state.additionalProgress) == "table") then count = max(count, #state.additionalProgress); end end diff --git a/WeakAuras/RegionTypes/AuraBar.lua b/WeakAuras/RegionTypes/AuraBar.lua index 1e15548..9d8e5a6 100644 --- a/WeakAuras/RegionTypes/AuraBar.lua +++ b/WeakAuras/RegionTypes/AuraBar.lua @@ -301,7 +301,7 @@ local barPrototype = { end, ["UpdateAdditionalBars"] = function(self) - if (self.additionalBars) then + if (type(self.additionalBars) == "table") then for index, additionalBar in ipairs(self.additionalBars) do if (not self.extraTextures[index]) then local extraTexture = self:CreateTexture(nil, "ARTWORK"); @@ -1175,8 +1175,6 @@ local function modify(parent, region, data) end end - max = max or 0 - local path = state.icon or "Interface\\Icons\\INV_Misc_QuestionMark" local iconPath = ( region.useAuto diff --git a/WeakAurasOptions/OptionsFrames/MoverSizer.lua b/WeakAurasOptions/OptionsFrames/MoverSizer.lua index b81afb8..ad48be1 100644 --- a/WeakAurasOptions/OptionsFrames/MoverSizer.lua +++ b/WeakAurasOptions/OptionsFrames/MoverSizer.lua @@ -945,7 +945,7 @@ local function ConstructMoverSizer(parent) frame.lineX:SetPoint("BOTTOMLEFT", UIParent, 0, v) frame.lineX:SetPoint("BOTTOMRIGHT", UIParent, 0, v) frame.lineX:Show() - mover.alignYFrom = ctrlDown and "CENTER" or (top >= v - 5 and top <= v + 5) and "TOP" or "BOTTOM" + mover.alignYFrom = (ctrlDown and "CENTER" or (top >= v - 5 and top <= v + 5) and "TOP" or "BOTTOM") or (reverse and ((top >= v - 5 and top <= v + 5) and "TOP" or "BOTTOM")) -- top side first or (not reverse and ((bottom >= v - 5 and bottom <= v + 5) and "BOTTOM" or "TOP")) -- bottom side first mover.alignYOf = v