From 45543bdcdba6963823e19a1f6e0045d9b2bf59aa Mon Sep 17 00:00:00 2001 From: Logan Payton Date: Wed, 16 May 2018 11:51:29 -0400 Subject: [PATCH] First time the install didnt throw an error --- ElvUI/Core/install.lua | 20 +- ElvUI/Libraries/Load_Libraries.xml | 1 + ElvUI/Libraries/oUF/elements/auras.lua | 8 +- ElvUI/Libraries/oUF/elements/elements.xml | 2 +- .../oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua | 391 ++++++++++++++++++ ElvUI/Libraries/oUF_Plugins/oUF_Plugins.xml | 3 + .../Modules/UnitFrames/Elements/AuraBars.lua | 287 +++++++++++++ ElvUI/Modules/UnitFrames/Elements/Auras.lua | 27 +- .../UnitFrames/Elements/Load_Elements.xml | 1 + ElvUI/Modules/UnitFrames/Units/Load_Units.xml | 5 - ElvUI/Modules/UnitFrames/Units/Player.lua | 4 + ElvUI/Modules/UnitFrames/Units/Target.lua | 3 + 12 files changed, 718 insertions(+), 34 deletions(-) create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua create mode 100644 ElvUI/Libraries/oUF_Plugins/oUF_Plugins.xml create mode 100644 ElvUI/Modules/UnitFrames/Elements/AuraBars.lua diff --git a/ElvUI/Core/install.lua b/ElvUI/Core/install.lua index ef3d4be..ec8e861 100644 --- a/ElvUI/Core/install.lua +++ b/ElvUI/Core/install.lua @@ -665,17 +665,17 @@ local function SetupAuras(style) UF:Configure_AuraBars(frame) end - frame = UF["focus"] - E:CopyTable(E.db.unitframe.units.focus.buffs, P.unitframe.units.focus.buffs) - E:CopyTable(E.db.unitframe.units.focus.debuffs, P.unitframe.units.focus.debuffs) - E:CopyTable(E.db.unitframe.units.focus.aurabar, P.unitframe.units.focus.aurabar) - E.db.unitframe.units.focus.smartAuraDisplay = P.unitframe.units.focus.smartAuraDisplay + -- frame = UF["focus"] + -- E:CopyTable(E.db.unitframe.units.focus.buffs, P.unitframe.units.focus.buffs) + -- E:CopyTable(E.db.unitframe.units.focus.debuffs, P.unitframe.units.focus.debuffs) + -- E:CopyTable(E.db.unitframe.units.focus.aurabar, P.unitframe.units.focus.aurabar) + -- E.db.unitframe.units.focus.smartAuraDisplay = P.unitframe.units.focus.smartAuraDisplay - if frame then - UF:Configure_Auras(frame, "Buffs") - UF:Configure_Auras(frame, "Debuffs") - UF:Configure_AuraBars(frame) - end + -- if frame then + -- UF:Configure_Auras(frame, "Buffs") + -- UF:Configure_Auras(frame, "Debuffs") + -- UF:Configure_AuraBars(frame) + -- end if not style then E.db.unitframe.units.player.buffs.enable = true diff --git a/ElvUI/Libraries/Load_Libraries.xml b/ElvUI/Libraries/Load_Libraries.xml index 4b9c2ae..ea430d1 100644 --- a/ElvUI/Libraries/Load_Libraries.xml +++ b/ElvUI/Libraries/Load_Libraries.xml @@ -17,6 +17,7 @@ + diff --git a/ElvUI/Libraries/oUF/elements/auras.lua b/ElvUI/Libraries/oUF/elements/auras.lua index c67bac0..30508e2 100644 --- a/ElvUI/Libraries/oUF/elements/auras.lua +++ b/ElvUI/Libraries/oUF/elements/auras.lua @@ -64,8 +64,8 @@ button.isDebuff - indicates if the button holds a debuff (boolean) local ns = oUF local oUF = ns.oUF -local tinsert = table.insert -local floor, min = math.floor, math.min +local tinsert, getn = table.insert, table.getn +local floor, min, mod = math.floor, math.min, math.mod local CreateFrame = CreateFrame local GetTime = GetTime @@ -250,7 +250,7 @@ local function SetPosition(element, from, to) -- Bail out if the to range is out of scope. if(not button) then break end - local col = (i - 1) % cols + local col = mod((i - 1), cols) local row = floor((i - 1) / cols) button:ClearAllPoints() @@ -277,7 +277,7 @@ local function filterIcons(element, unit, filter, limit, isDebuff, offset, dontH end if not dontHide then - for i = visible + offset + 1, #element do + for i = visible + offset + 1, getn(element) do element[i]:Hide() end end diff --git a/ElvUI/Libraries/oUF/elements/elements.xml b/ElvUI/Libraries/oUF/elements/elements.xml index 91f969b..d3455b9 100644 --- a/ElvUI/Libraries/oUF/elements/elements.xml +++ b/ElvUI/Libraries/oUF/elements/elements.xml @@ -1,6 +1,6 @@