From fd7a6e631b0ee53d79b1ad9b7942f1371b66a736 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Sat, 13 Jun 2015 21:36:36 +0400 Subject: [PATCH] Can't make the thing to respect E:UpdateAll() => making it private --- ElvUI_SLE/core/install.lua | 3 +-- ElvUI_SLE/defaults/private.lua | 4 ++++ ElvUI_SLE/defaults/profile.lua | 1 - ElvUI_SLE/modules/auras.lua | 12 +++++++++--- ElvUI_SLE/options/auras_c.lua | 4 ++-- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/ElvUI_SLE/core/install.lua b/ElvUI_SLE/core/install.lua index 0a2d2da..9295735 100644 --- a/ElvUI_SLE/core/install.lua +++ b/ElvUI_SLE/core/install.lua @@ -512,8 +512,6 @@ function AI:DarthSetup() --The function to switch from classic ElvUI settings to E.db["sle"]["uibuttons"]["size"] = 20 E.db["sle"]["uibuttons"]["orientation"] = "horizontal" E.db["sle"]["uibuttons"]["yoffset"] = -2 - - E.db["sle"]["auras"]["consolidatedMark"] = true end --Movers-- do @@ -579,6 +577,7 @@ function AI:DarthSetup() --The function to switch from classic ElvUI settings to E.private["sle"]["farm"]["enable"] = true E.private["sle"]["equip"]["spam"] = true E.private["sle"]["equip"]["setoverlay"] = true + E.private["sle"]["auras"]["consolidatedMark"] = true E.private["ElvUI_Currency"]["Unused"] = false E.private["ElvUI_Currency"]["Archaeology"] = false diff --git a/ElvUI_SLE/defaults/private.lua b/ElvUI_SLE/defaults/private.lua index d6a06af..5d9bcb3 100644 --- a/ElvUI_SLE/defaults/private.lua +++ b/ElvUI_SLE/defaults/private.lua @@ -59,6 +59,10 @@ V['sle'] = { ['backgrounds'] = false, ['uiButtonStyle'] = "dropdown", + + ['auras'] = { + ['consolidatedMark'] = false, + }, } G['sle'] = { diff --git a/ElvUI_SLE/defaults/profile.lua b/ElvUI_SLE/defaults/profile.lua index c99c2ab..d2e6a22 100644 --- a/ElvUI_SLE/defaults/profile.lua +++ b/ElvUI_SLE/defaults/profile.lua @@ -13,7 +13,6 @@ P['sle'] = { ['tempenchants'] = { ['hideTimer'] = false, }, - ['consolidatedMark'] = false, }, --Background frames ['backgrounds'] = { diff --git a/ElvUI_SLE/modules/auras.lua b/ElvUI_SLE/modules/auras.lua index 4fedf1e..fed67ff 100644 --- a/ElvUI_SLE/modules/auras.lua +++ b/ElvUI_SLE/modules/auras.lua @@ -91,6 +91,7 @@ AT.Spells = { local ignoreIcons = {} function AT:Update_ConsolidatedBuffsSettings() local frame = A.frame + twipe(ignoreIcons) if E.db.auras.consolidatedBuffs.filter then if E.role == 'Caster' then @@ -166,8 +167,8 @@ function A:CreateButton(i) button.icon = CreateFrame("Frame", "ElvUIConsolidatedBuff"..i.."CanCast", button) local icon = button.icon icon:SetWidth(3) - icon:SetPoint("TOPLEFT", button, -2, -1) - icon:SetPoint("BOTTOMLEFT", button, -2, 1) + icon:SetPoint("TOPLEFT", button, -1, -1) + icon:SetPoint("BOTTOMLEFT", button, -1, 1) local overlay = icon:CreateTexture(nil, "OVERLAY") overlay:SetTexture(E['media'].blankTex) overlay:SetAllPoints(icon) @@ -230,7 +231,7 @@ function AT:BuildCasts(event, unit) local name = AT.Spells[E.myclass][i] if name then button:SetAttribute("spell1", name) - if E.db.sle.auras.consolidatedMark then + if E.private.sle.auras.consolidatedMark then button.icon:Show() else button.icon:Hide() @@ -277,4 +278,9 @@ function AT:Initialize() self:RegisterEvent("PLAYER_REGEN_DISABLED", "UpdateAuraStandings") AT:BuildCasts() + + -- hooksecurefunc(E, "UpdateAll", function() + -- A:Update_ConsolidatedBuffsSettings() + -- collectgarbage('collect'); + -- end) end \ No newline at end of file diff --git a/ElvUI_SLE/options/auras_c.lua b/ElvUI_SLE/options/auras_c.lua index e560fa5..a8b048f 100644 --- a/ElvUI_SLE/options/auras_c.lua +++ b/ElvUI_SLE/options/auras_c.lua @@ -65,8 +65,8 @@ local function configTable() name = L["Mark Your Consolidated Buffs"], desc = L["Create a mark bar on a consolidated buffs bar's icons for buffs your class can provide."], disabled = function() return (E.private.general.minimap.enable ~= true or E.private.auras.disableBlizzard ~= true) end, - get = function(info) return E.db.sle.auras.consolidatedMark end, - set = function(info, value) E.db.sle.auras.consolidatedMark = value; AT:BuildCasts(); A:Update_ConsolidatedBuffsSettings() end, + get = function(info) return E.private.sle.auras.consolidatedMark end, + set = function(info, value) E.private.sle.auras.consolidatedMark = value; AT:BuildCasts(); A:Update_ConsolidatedBuffsSettings() end, }, }, } -- 1.7.9.5