From e8c3737b2a500f02aefba2308af0492d75f9ebd6 Mon Sep 17 00:00:00 2001 From: Aviana Date: Sat, 5 Dec 2020 00:22:16 +0100 Subject: [PATCH] Some fixes - Fix #786 - Fix #795 - Fix performance fix - Bump version --- LunaUnitFrames.lua | 8 +++---- LunaUnitFrames.toc | 2 +- locales/deDE.lua | 2 ++ locales/enUS.lua | 2 ++ locales/koKR.lua | 2 ++ locales/zhCN.lua | 2 ++ locales/zhTW.lua | 2 ++ modules/Options.lua | 55 ++++++++++++++++++++++--------------------- modules/overrides.lua | 3 ++- 9 files changed, 45 insertions(+), 33 deletions(-) diff --git a/LunaUnitFrames.lua b/LunaUnitFrames.lua index af454fa..d602c4f 100644 --- a/LunaUnitFrames.lua +++ b/LunaUnitFrames.lua @@ -1,7 +1,7 @@ -- Luna Unit Frames 4.0 by Aviana LUF = select(2, ...) -LUF.version = 4030 +LUF.version = 4040 local L = LUF.L local ACR = LibStub("AceConfigRegistry-3.0", true) @@ -364,7 +364,7 @@ function LUF:HideBlizzardFrames() handleFrame(CastingBarFrame) active_hiddens.cast = true elseif( not self.db.profile.hidden.cast and not active_hiddens.cast ) then - CastingBarFrame_OnLoad(CastingBarFrame, "player", true, false) + CastingBarFrame_OnLoad(CastingBarFrame, "player", true, false) --restore castbar as oUF kills it end if( CompactRaidFrameManager ) then @@ -904,7 +904,7 @@ function LUF.PlaceModules(frame) usableX = (frame:GetWidth() - 2) * config.portrait.width v:SetWidth(usableX) usableX = frame:GetWidth() - usableX - 2 - elseif not config[k].autoHide or v:IsShown() then + elseif (not config[k].autoHide or v:IsShown()) and not v.isDisabled then if config[k].vertical then table.insert(vert,{key = k, order = config[k].order, size = config[k].height}) vertValue = vertValue + config[k].height @@ -1305,9 +1305,9 @@ frame:SetScript("OnEvent", function(self, event, addon) elseif( event == "ADDON_LOADED" and ( addon == "Blizzard_ArenaUI" or addon == "Blizzard_CompactRaidFrames" ) and not LUF.InCombatLockdown) then LUF:HideBlizzardFrames() elseif event == "PLAYER_REGEN_DISABLED" then + LUF.InCombatLockdown = true if not LUF.db.profile.locked then LUF.db.profile.locked = true - LUF.InCombatLockdown = true LUF:UpdateMovers() if( ACR ) then ACR:NotifyChange("LunaUnitFrames") diff --git a/LunaUnitFrames.toc b/LunaUnitFrames.toc index 69a0ece..06a8eb9 100644 --- a/LunaUnitFrames.toc +++ b/LunaUnitFrames.toc @@ -2,7 +2,7 @@ ## Title: Luna Unit Frames ## Notes: ## Author: Aviana -## Version: 4030 +## Version: 4040 ## SavedVariables: LunaUFDB ## OptionalDeps: Ace3, LibSharedMedia-3.0, AceGUI-3.0-SharedMediaWidgets, LibSpellRange-1.0, Clique, RealMobHealth ## X-License: WTFPL (http://www.wtfpl.net/about/) diff --git a/locales/deDE.lua b/locales/deDE.lua index 73cf253..d8ba58e 100644 --- a/locales/deDE.lua +++ b/locales/deDE.lua @@ -255,7 +255,9 @@ local L = { ["Squares"] = "Vierecke", ["What the indicator should display."] = "Was der Indikator anzeigen soll.", ["Name (exact) or ID"] = "Name (exakt) oder ID", +["Name (partial) or ID"] = "Name (partiell) oder ID", ["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] = "Name (exakt) oder ID des anzuzeigenden Effektes. Benutze ; als logisches UND und / als logisches ODER. Verwende [mana] um nur Manaklassen zu pr\195\188fen. Beispiel: Arkane Intelligenz[mana]/Arkane Brillanz[mana];Magie d\195\164mpfen", +["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] = "Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras", ["Buff/Debuff"] = "St\195\164rkung/Schw\195\164chung", ["Own buff/debuff"] = "Eigene St\195\164rkung/Schw\195\164chung", ["Missing Buff"] = "Fehlende St\195\164rkung", diff --git a/locales/enUS.lua b/locales/enUS.lua index 5d760f9..e030e07 100644 --- a/locales/enUS.lua +++ b/locales/enUS.lua @@ -252,7 +252,9 @@ local L = { ["Squares"] = "Squares", ["What the indicator should display."] = "What the indicator should display.", ["Name (exact) or ID"] = "Name (exact) or ID", +["Name (partial) or ID"] = "Name (partial) or ID", ["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] = "Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic", +["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] = "Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras", ["Buff/Debuff"] = "Buff/Debuff", ["Own buff/debuff"] = "Own buff/debuff", ["Missing Buff"] = "Missing Buff", diff --git a/locales/koKR.lua b/locales/koKR.lua index a63118f..6fccea7 100644 --- a/locales/koKR.lua +++ b/locales/koKR.lua @@ -252,7 +252,9 @@ local L = { ["Squares"] = "지시기", ["What the indicator should display."] = "지시기가 표시할 항목을 설정합니다.", ["Name (exact) or ID"] = "(정확한) 이름 또는 ID", +["Name (partial) or ID"] = "Name (partial) or ID", ["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] = "Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic", +["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] = "Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras", ["Buff/Debuff"] = "버프/디버프", ["Own buff/debuff"] = "자신의 버프/디버프", ["Missing Buff"] = "누락된 버프", diff --git a/locales/zhCN.lua b/locales/zhCN.lua index c79a7f2..dee69fb 100644 --- a/locales/zhCN.lua +++ b/locales/zhCN.lua @@ -252,7 +252,9 @@ local L = { ["Squares"] = "自定义指示器", ["What the indicator should display."] = "指示器要显示什么。", ["Name (exact) or ID"] = "正确法术全名 或者 ID", +["Name (partial) or ID"] = "Name (partial) or ID", ["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] = "Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic", +["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] = "Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras", ["Buff/Debuff"] = "光环图标", ["Own buff/debuff"] = "你施放的光环", ["Missing Buff"] = "Missing Buff", diff --git a/locales/zhTW.lua b/locales/zhTW.lua index bac86b8..440269e 100644 --- a/locales/zhTW.lua +++ b/locales/zhTW.lua @@ -252,7 +252,9 @@ local L = { ["Squares"] = "自訂邊角指示器", ["What the indicator should display."] = "指示器要顯示什麼。", ["Name (exact) or ID"] = "正確全名 或者 ID", +["Name (partial) or ID"] = "Name (partial) or ID", ["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] = "Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic", +["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] = "Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras", ["Buff/Debuff"] = "光環圖示", ["Own buff/debuff"] = "你施放的光環", ["Missing Buff"] = "Missing Buff", diff --git a/modules/Options.lua b/modules/Options.lua index c3b1d80..7bc7220 100644 --- a/modules/Options.lua +++ b/modules/Options.lua @@ -526,6 +526,7 @@ function LUF:CreateConfig() } local function validateMissingBuffInput(info, value) + if LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type ~= "missing" then return true end local spellGroups = {strsplit(";",value)} local j for j,spellGroup in ipairs(spellGroups) do @@ -2927,11 +2928,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -2980,11 +2981,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -3033,11 +3034,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -3086,11 +3087,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -3139,11 +3140,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -3192,11 +3193,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -3245,11 +3246,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -3298,11 +3299,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, @@ -3351,11 +3352,11 @@ function LUF:CreateConfig() type = "select", order = 3, values = { ["aggro"] = L["Aggro"], ["legacythreat"] = L["Aggro"].." ("..L["targettarget"]..")", ["aura"] = L["Buff/Debuff"], ["ownaura"] = L["Own buff/debuff"], ["dispel"] = DISPELS, ["missing"] = L["Missing Buff"] }, - set = function(info, value) set(info,value) ACR:NotifyChange("LunaUnitFrames") end, + set = function(info, value) set(info,value) LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].value = nil ACR:NotifyChange("LunaUnitFrames") end, }, value = { - name = L["Name (exact) or ID"], - desc = L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"], + name = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID"] or L["Name (partial) or ID"] end, + desc = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "missing" and L["Name (exact) or ID of the effect to track. Use ; as a logical AND and / as logical OR. Also supports [mana] to only check on mana classes. Example: Arcane Intellect[mana]/Arcane Brilliance[mana];Dampen Magic"] or L["Name (partial) or ID of the effect to track. Use ; as a seperator for multiple auras"] end, type = "input", order = 4, hidden = function(info) return LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "aggro" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "legacythreat" or LUF.db.profile.units[info[#info-3]].squares[info[#info-1]].type == "dispel" end, diff --git a/modules/overrides.lua b/modules/overrides.lua index 00b2eab..005109b 100644 --- a/modules/overrides.lua +++ b/modules/overrides.lua @@ -270,7 +270,8 @@ end LUF.overrides["ComboPoints"].PostUpdate = function(self, cur, max, hasMaxChanged, powerType) local mod = self[1]:GetParent() local cp = GetComboPoints("player", "target") - if (not cp or cp ==0) and mod.autoHide then + mod.isDisabled = not self.isEnabled + if (not cp or cp ==0) and mod.autoHide or mod.isDisabled then mod:Hide() else mod:Show()