diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua index a1824f1..f40166b 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua @@ -961,10 +961,6 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end local function setAuraFilteringOptions(configTable, unitName, auraType, updateFunction, isPlayer) - local typeName = auraType == "buffs" and L["Buffs"] or L["Debuffs"] - local raidTypeName = "Raid " .. typeName; - local raidTypeDesc = "Don't display raid " .. auraType; - if isPlayer then configTable.filterGroup = { order = 10, @@ -1007,8 +1003,8 @@ local function setAuraFilteringOptions(configTable, unitName, auraType, updateFu filterRaid = { order = 5, type = "toggle", - name = raidTypeName, - desc = raidTypeDesc, + name = L["Raid Buffs"], + desc = L["Don't display raid buffs"], get = function(key) return SV.db.SVUnit[unitName][auraType].filterRaid end, set = function(key, value) SV.db.SVUnit[unitName][auraType].filterRaid = value; updateFunction(MOD, unitName) end, }, @@ -1075,14 +1071,6 @@ local function setAuraFilteringOptions(configTable, unitName, auraType, updateFu get = function(key)return SV.db.SVUnit[unitName][auraType].filterInfinite.friendly end, set = function(key, value)SV.db.SVUnit[unitName][auraType].filterInfinite.friendly = value; updateFunction(MOD, unitName) end }, - filterRaid = { - order = 5, - type = "toggle", - name = raidTypeName, - desc = raidTypeDesc, - get = function(key)return SV.db.SVUnit[unitName][auraType].filterRaid.friendly end, - set = function(key, value)SV.db.SVUnit[unitName][auraType].filterRaid.friendly = value; updateFunction(MOD, unitName) end - }, }, }, enemyGroup = { @@ -1123,14 +1111,6 @@ local function setAuraFilteringOptions(configTable, unitName, auraType, updateFu get = function(key)return SV.db.SVUnit[unitName][auraType].filterInfinite.enemy end, set = function(key, value)SV.db.SVUnit[unitName][auraType].filterInfinite.enemy = value; updateFunction(MOD, unitName) end }, - filterRaid = { - order = 5, - type = "toggle", - name = raidTypeName, - desc = raidTypeDesc, - get = function(key)return SV.db.SVUnit[unitName][auraType].filterRaid.enemy end, - set = function(key, value)SV.db.SVUnit[unitName][auraType].filterRaid.enemy = value; updateFunction(MOD, unitName) end - }, }, }, useFilter = { @@ -1151,6 +1131,25 @@ local function setAuraFilteringOptions(configTable, unitName, auraType, updateFu } } } + + if(SV.db.SVUnit[unitName][auraType].filterRaid) then + configTable.filterGroup.args.friendlyGroup.args.filterRaid = { + order = 5, + type = "toggle", + name = L["Raid Buffs"], + desc = L["Don't display raid buffs"], + get = function(key)return SV.db.SVUnit[unitName][auraType].filterRaid.friendly end, + set = function(key, value)SV.db.SVUnit[unitName][auraType].filterRaid.friendly = value; updateFunction(MOD, unitName) end + }; + configTable.filterGroup.args.enemyGroup.args.filterRaid = { + order = 5, + type = "toggle", + name = L["Raid Buffs"], + desc = L["Don't display raid buffs"], + get = function(key)return SV.db.SVUnit[unitName][auraType].filterRaid.enemy end, + set = function(key, value)SV.db.SVUnit[unitName][auraType].filterRaid.enemy = value; updateFunction(MOD, unitName) end + }; + end end end