Skip to content

Commit 58b088c

Browse files
committed
Fix filter options and split up the reverse option.
1 parent 3d5ca96 commit 58b088c

10 files changed

+66
-34
lines changed

Locales/deDE.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ L["Font"] = "Schriftart"
6060
--L["Icons"] = "Icons"
6161
L["If the addon is enabled."] = "Falls das Addon aktiviert ist."
6262
L["Immune"] = "Immun"
63-
--L["Inverse Filter"] = "Inverse Filter"
64-
--L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
L["Left"] = "Links"
6668
--L["Let Masque skin the icons"] = "Let Masque skin the icons"
6769
--L["Low"] = "Low"

Locales/enUS.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@ L["Icon Y Offset"] = true
5959
L["Icons"] = true
6060
L["If the addon is enabled."] = true
6161
L["Immune"] = true
62-
L["Inverse Filter"] = true
63-
L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = true
62+
L["Inverse Spell Filter"] = true
63+
L["Inverse the logic and only show the spells in the list instead of filtering them away."] = true
64+
L["Inverse NPC Filter"] = true
65+
L["Inverse the logic and only show npc's in the list instead of filtering them away."] = true
6466
L["Left"] = true
6567
L["Let Masuqe skin the icons"] = true
6668
L["Low"] = true

Locales/esES.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ L["Default"] = "Defecto"
6060
--L["Icons"] = "Icons"
6161
L["If the addon is enabled."] = "Falls el addon está activado."
6262
--L["Immune"] = "Immune"
63-
--L["Inverse Filter"] = "Inverse Filter"
64-
--L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
L["Left"] = "Izquierda"
6668
--L["Let Masque skin the icons"] = "Let Masque skin the icons"
6769
--L["Low"] = "Low"

Locales/esMX.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ if not L then return end
6060
--L["Icons"] = "Icons"
6161
--L["If the addon is enabled."] = "If the addon is enabled."
6262
--L["Immune"] = "Immune"
63-
--L["Inverse Filter"] = "Inverse Filter"
64-
--L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
--L["Left"] = "Left"
6668
--L["Let Masque skin the icons"] = "Let Masque skin the icons"
6769
--L["Low"] = "Low"

Locales/frFR.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ L["Icon Y Offset"] = "Décalage de l’icône sur l’axe Y"
6060
L["Icons"] = "Icônes"
6161
L["If the addon is enabled."] = "Si l’addon est activé."
6262
L["Immune"] = "Insensible"
63-
--L["Inverse Filter"] = "Inverse Filter"
64-
--L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
L["Left"] = "Gauche"
6668
L["Let Masuqe skin the icons"] = "Laisser Masque gérer l’apparence des icônes"
6769
L["Low"] = "Bas"

Locales/koKR.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ L["Icon Y Offset"] = "아이콘 Y 오프셋"
6060
L["Icons"] = "아이콘"
6161
L["If the addon is enabled."] = "애드온이 활성화 된 경우입니다."
6262
L["Immune"] = "면역"
63-
--L["Inverse Filter"] = "Inverse Filter"
64-
--L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
L["Left"] = "좌측"
6668
L["Let Masuqe skin the icons"] = "아이콘에 Masque 스킨을 입힙니다"
6769
--L["Low"] = "Low"

Locales/ruRU.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ L["Icon Y Offset"] = "Отступ иконки по Y"
6060
L["Icons"] = "Иконки"
6161
L["If the addon is enabled."] = "Если аддон включен"
6262
L["Immune"] = "Неуязвимость"
63-
--L["Inverse Filter"] = "Inverse Filter"
64-
--L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
L["Left"] = "Слева"
6668
L["Let Masuqe skin the icons"] = "Позволить Masque менять стиль иконок"
6769
L["Low"] = "Нижний"

Locales/zhCN.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ L["Icon Y Offset"] = "图标垂直偏移"
6060
L["Icons"] = "图标"
6161
L["If the addon is enabled."] = "启用本插件"
6262
L["Immune"] = "免疫"
63-
L["Inverse Filter"] = "反向过滤"
64-
L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "反转逻辑,只显示列表中的技能和NPC,而不是过滤掉它们。"
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
L["Left"] = "左侧"
6668
L["Let Masuqe skin the icons"] = "使用 Masque 管理图标"
6769
L["Low"] = ""

Locales/zhTW.lua

+4-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ L["Icon Y Offset"] = "圖示垂直位置"
6060
L["Icons"] = "圖示"
6161
L["If the addon is enabled."] = "啟用這個插件。"
6262
L["Immune"] = "免疫"
63-
L["Inverse Filter"] = "反向過濾"
64-
L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."] = "反向的邏輯,而且僅在列表中顯示法術和NPC,而不是將它們過濾掉。"
63+
--L["Inverse Spell Filter"] = "Inverse Spell Filter"
64+
--L["Inverse the logic and only show the spells in the list instead of filtering them away."] = "Inverse the logic and only show the spells in the list instead of filtering them away."
65+
--L["Inverse NPC Filter"] = "Inverse NPC Filter"
66+
--L["Inverse the logic and only show npc's in the list instead of filtering them away."] = "Inverse the logic and only show npc's in the list instead of filtering them away."
6567
L["Left"] = ""
6668
L["Let Masuqe skin the icons"] = "讓 Masuqe 插件更改圖示外觀。"
6769
L["Low"] = ""

NameplateSCT.lua

+30-16
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@ local defaults = {
189189
alpha = 0.5,
190190
},
191191
filterEnabled = false,
192-
inverseFilter = false,
192+
inverseSpellFilter = false,
193+
inverseNPCFilter = false,
193194
filter = "",
194195
npcFilter = "",
195196
},
@@ -743,13 +744,12 @@ if NameplateSCT.db.global.personalOnly and NameplateSCT.db.global.personal and p
743744
if NameplateSCT.db.global.filterEnabled then -- Filter out mobId's if needed
744745
local _, _, _, _, _, destUnitId = strsplit("-", destGUID)
745746
destUnitId = tostring(destUnitId) or "1"
746-
if (NameplateSCT.db.global.inverseFilter and not npcFiltersTable[destUnitId]) -- Inverse filter
747+
if (NameplateSCT.db.global.inverseNPCFilter and not npcFiltersTable[destUnitId]) -- Inverse filter
747748
or
748-
(not NameplateSCT.db.global.inverseFilter and npcFiltersTable[destUnitId]) -- Normal Filter
749+
(not NameplateSCT.db.global.inverseNPCFilter and npcFiltersTable[destUnitId]) -- Normal Filter
749750
then return end
750751
end
751752
if playerGUID == sourceGUID or (NameplateSCT.db.global.personal and playerGUID == destGUID) then -- Player events
752-
753753
local destUnit = guidToUnit[destGUID]
754754
if (destUnit) or (destGUID == playerGUID and NameplateSCT.db.global.personal) then
755755
if (string.find(clue, "_DAMAGE")) then
@@ -766,7 +766,7 @@ if NameplateSCT.db.global.personalOnly and NameplateSCT.db.global.personal and p
766766
end
767767
if NameplateSCT.db.global.filterEnabled then
768768
local spellInFilter = filtersTable[tostring(spellId)] or filtersTable[spellName]
769-
if (NameplateSCT.db.global.inverseFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseFilter and spellInFilter) then
769+
if (NameplateSCT.db.global.inverseSpellFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseSpellFilter and spellInFilter) then
770770
return
771771
end
772772
end
@@ -788,7 +788,7 @@ if NameplateSCT.db.global.personalOnly and NameplateSCT.db.global.personal and p
788788
end
789789
if NameplateSCT.db.global.filterEnabled then
790790
local spellInFilter = filtersTable[tostring(spellId)] or filtersTable[spellName]
791-
if (NameplateSCT.db.global.inverseFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseFilter and spellInFilter) then
791+
if (NameplateSCT.db.global.inverseSpellFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseSpellFilter and spellInFilter) then
792792
return
793793
end
794794
end
@@ -816,7 +816,7 @@ if NameplateSCT.db.global.personalOnly and NameplateSCT.db.global.personal and p
816816
end
817817
if NameplateSCT.db.global.filterEnabled then
818818
local spellInFilter = filtersTable[tostring(spellId)] or filtersTable[spellName]
819-
if (NameplateSCT.db.global.inverseFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseFilter and spellInFilter) then
819+
if (NameplateSCT.db.global.inverseSpellFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseSpellFilter and spellInFilter) then
820820
return
821821
end
822822
end
@@ -838,7 +838,7 @@ if NameplateSCT.db.global.personalOnly and NameplateSCT.db.global.personal and p
838838
end
839839
if NameplateSCT.db.global.filterEnabled then
840840
local spellInFilter = filtersTable[tostring(spellId)] or filtersTable[spellName]
841-
if (NameplateSCT.db.global.inverseFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseFilter and spellInFilter) then
841+
if (NameplateSCT.db.global.inverseSpellFilter and not spellInFilter) or (not NameplateSCT.db.global.inverseSpellFilter and spellInFilter) then
842842
return
843843
end
844844
end
@@ -1943,23 +1943,37 @@ local filters = {
19431943
get = function() return NameplateSCT.db.global.filterEnabled end,
19441944
set = function(_, newValue) NameplateSCT.db.global.filterEnabled = newValue end,
19451945
order = 1,
1946-
width = "half",
1946+
width = 1,
1947+
},
1948+
inverseSpellFilter = {
1949+
type = "toggle",
1950+
name = L["Inverse Spell Filter"],
1951+
desc = L["Inverse the logic and only show the spells in the list instead of filtering them away."],
1952+
get = function() return NameplateSCT.db.global.inverseSpellFilter end,
1953+
set = function(_, newValue) NameplateSCT.db.global.inverseSpellFilter = newValue end,
1954+
order = 1.5,
1955+
width = 1,
19471956
},
19481957
inverseFilter = {
19491958
type = "toggle",
1950-
name = L["Inverse Filter"],
1951-
desc = L["Inverse the logic, and only show the spells and npc's in the list instead of filtering them away."],
1952-
get = function() return NameplateSCT.db.global.inverseFilter end,
1953-
set = function(_, newValue) NameplateSCT.db.global.inverseFilter = newValue end,
1959+
name = L["Inverse NPC Filter"],
1960+
desc = L["Inverse the logic and only show npc's in the list instead of filtering them away."],
1961+
get = function() return NameplateSCT.db.global.inverseNPCFilter end,
1962+
set = function(_, newValue) NameplateSCT.db.global.inverseNPCFilter = newValue end,
19541963
order = 1.5,
1955-
width = "half",
1964+
width = 1,
1965+
},
1966+
header = {
1967+
type = "header",
1968+
name = "",
1969+
order = 2,
19561970
},
19571971
spellList = {
19581972
type = "input",
19591973
name = L["Spells"],
19601974
multiline = 20,
19611975
desc = L["Spellid/Spellname seperated by line\n\nWhite hits/melee = melee"],
1962-
order = 2,
1976+
order = 3,
19631977
width = 1,
19641978
get = function() return NameplateSCT.db.global.filter end,
19651979
set = function(_, newValue) NameplateSCT:updateFilterTable(newValue) end,
@@ -1969,7 +1983,7 @@ local filters = {
19691983
name = L["NPCs"],
19701984
multiline = 20,
19711985
desc = L["NPC id (eg: 23682) seperated by line\n\n The example is the Headless Horseman."],
1972-
order = 3,
1986+
order = 4,
19731987
width = 1,
19741988
get = function() return NameplateSCT.db.global.npcFilter end,
19751989
set = function(_, newValue) NameplateSCT:updateNPCFilterTable(newValue) end,

0 commit comments

Comments
 (0)