from retail

This commit is contained in:
Bunny67
2020-07-12 02:03:03 +03:00
parent f95aaa696b
commit d5c19a28e5
7 changed files with 70 additions and 47 deletions
+18 -18
View File
@@ -75,12 +75,12 @@ local function IsSingleMissing(trigger)
return not IsGroupTrigger(trigger) and trigger.matchesShowOn == "showOnMissing"
end
local function CreateNameOptions(aura_options, data, trigger, size, isExactSpellId, blacklist, prefix, baseOrder, useKey, optionKey, name, desc)
local function CreateNameOptions(aura_options, data, trigger, size, isExactSpellId, isIgnoreList, prefix, baseOrder, useKey, optionKey, name, desc)
local spellCache = WeakAuras.spellCache
for i = 1, size do
local hiddenFunction
if blacklist then
if isIgnoreList then
hiddenFunction = function()
return not (trigger.type == "aura2" and trigger[useKey] and (i == 1 or trigger[optionKey] and trigger[optionKey][i - 1]) and trigger.unit ~= "multi" and not IsSingleMissing(trigger))
end
@@ -341,33 +341,33 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and not trigger.useExactSpellId) end
},
useBlackName = {
useIgnoreName = {
type = "toggle",
name = L["Blacklisted Name(s)"],
name = L["Ignored Name(s)"],
order = 32,
width = WeakAuras.normalWidth - 0.2,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useBlackNameSpace = {
useIgnoreNameSpace = {
type = "description",
name = "",
order = 32.1,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and not trigger.useBlackName and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
hidden = function() return not (trigger.type == "aura2" and not trigger.useIgnoreName and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useBlackExactSpellId = {
useIgnoreExactSpellId = {
type = "toggle",
name = L["Blacklisted Exact Spell ID(s)"],
name = L["Ignored Exact Spell ID(s)"],
width = WeakAuras.normalWidth - 0.2,
order = 42,
hidden = function() return not (trigger.type == "aura2" and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useBlackExactSpellIdSpace = {
useIgnoreExactSpellIddSpace = {
type = "description",
name = "",
order = 42.1,
width = WeakAuras.normalWidth,
hidden = function() return not (trigger.type == "aura2" and not trigger.useBlackExactSpellId and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
hidden = function() return not (trigger.type == "aura2" and not trigger.useIgnoreExactSpellId and trigger.unit ~= "multi" and not IsSingleMissing(trigger)) end
},
useNamePattern = {
@@ -945,8 +945,8 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
-- Names
local nameOptionSize = CountNames(data, optionTriggerChoices, "auranames") + 1
local spellOptionsSize = CountNames(data, optionTriggerChoices, "auraspellids") + 1
local blackNameOptionSize = CountNames(data, optionTriggerChoices, "blackauranames") + 1
local blackSpellOptionsSize = CountNames(data, optionTriggerChoices, "blackauraspellids") + 1
local ignoreNameOptionSize = CountNames(data, optionTriggerChoices, "ignoreAuraNames") + 1
local ignoreSpellOptionsSize = CountNames(data, optionTriggerChoices, "ignoreAuraSpellids") + 1
CreateNameOptions(aura_options, data, trigger, nameOptionSize,
false, false, "name", 12, "useName", "auranames",
@@ -958,14 +958,14 @@ local function GetBuffTriggerOptions(data, optionTriggerChoices)
true, false, "spellid", 22, "useExactSpellId", "auraspellids",
L["Spell ID"], L["Enter a Spell ID"])
CreateNameOptions(aura_options, data, trigger, blackNameOptionSize,
false, true, "blackname", 32, "useBlackName", "blackauranames",
L["Blacklisted Aura Name"],
CreateNameOptions(aura_options, data, trigger, ignoreNameOptionSize,
false, true, "ignorename", 32, "useIgnoreName", "ignoreAuraNames",
L["Ignored Aura Name"],
L["Enter an Aura Name, partial Aura Name, or Spell ID. A Spell ID will match any spells with the same name."])
CreateNameOptions(aura_options, data, trigger, blackSpellOptionsSize,
true, true, "blackspellid", 42, "useBlackExactSpellId", "blackauraspellids",
L["Blacklisted Spell ID"], L["Enter a Spell ID"])
CreateNameOptions(aura_options, data, trigger, ignoreSpellOptionsSize,
true, true, "ignorespellid", 42, "useIgnoreExactSpellId", "ignoreAuraSpellids",
L["Ignored Spell ID"], L["Enter a Spell ID"])
return aura_options