from retail
This commit is contained in:
@@ -844,14 +844,14 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
name = L["Filter by Npc ID"],
|
||||
order = 69.31,
|
||||
hidden = function() return
|
||||
not (trigger.type == "aura2" and trigger.unit == "nameplate")
|
||||
not (trigger.type == "aura2" and (trigger.unit == "nameplate" or trigger.unit == "boss"))
|
||||
end
|
||||
},
|
||||
npcId = {
|
||||
type = "input",
|
||||
width = WeakAuras.normalWidth,
|
||||
name = L["Npc ID"],
|
||||
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "nameplate" and trigger.useNpcId) end,
|
||||
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "nameplate" or trigger.unit == "boss") and trigger.useNpcId) end,
|
||||
order = 69.32,
|
||||
desc = L["Supports multiple entries, separated by commas"]
|
||||
},
|
||||
@@ -860,7 +860,7 @@ local function GetBuffTriggerOptions(data, triggernum)
|
||||
name = "",
|
||||
order = 69.33,
|
||||
width = WeakAuras.normalWidth,
|
||||
hidden = function() return not (trigger.type == "aura2" and trigger.unit == "nameplate" and not trigger.useNpcId) end
|
||||
hidden = function() return not (trigger.type == "aura2" and (trigger.unit == "nameplate" or trigger.unit == "boss") and not trigger.useNpcId) end
|
||||
},
|
||||
|
||||
ignoreSelf = {
|
||||
|
||||
@@ -1232,7 +1232,7 @@ local function PositionOptions(id, data, _, hideWidthHeight, disableSelfPoint, g
|
||||
|
||||
local screenWidth, screenHeight = math.ceil(GetScreenWidth() / 20) * 20, math.ceil(GetScreenHeight() / 20) * 20;
|
||||
local positionOptions = {
|
||||
__title = L["Position Settings"],
|
||||
__title = L["Position and Size Settings"],
|
||||
__order = metaOrder,
|
||||
__collapsed = true,
|
||||
width = {
|
||||
|
||||
@@ -401,8 +401,6 @@ local function addControlsForChange(args, order, data, conditionVariable, totalA
|
||||
conditions[i].changes[j].value = {};
|
||||
end
|
||||
conditions[i].changes[j].value[property] = v;
|
||||
|
||||
WeakAuras.Add(data)
|
||||
WeakAuras.ClearAndUpdateOptions(data.id)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -636,7 +636,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum
|
||||
hidden = disabled or hidden,
|
||||
image = function()
|
||||
local value = getValue(trigger, "use_"..realname, realname, multiEntry, entryNumber)
|
||||
if value then
|
||||
if type(value) == "number" or type(value) == "string" then
|
||||
if(arg.type == "aura") then
|
||||
local icon = spellCache.GetIcon(value);
|
||||
return icon and tostring(icon) or "", 18, 18;
|
||||
@@ -653,6 +653,9 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum
|
||||
end,
|
||||
disabled = function()
|
||||
local value = getValue(trigger, nil, realname, multiEntry, entryNumber)
|
||||
if type(value) ~= "number" and type(value) ~= "string" then
|
||||
return true
|
||||
end
|
||||
return not ((arg.type == "aura" and value and spellCache.GetIcon(value)) or (arg.type == "spell" and value and GetSpellInfo(value)) or (arg.type == "item" and value and GetItemIcon(value)))
|
||||
end
|
||||
};
|
||||
@@ -690,7 +693,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum
|
||||
end
|
||||
elseif(arg.type == "spell") then
|
||||
local useExactSpellId = (arg.showExactOption and getValue(trigger, nil, "use_exact_"..realname, multiEntry, entryNumber))
|
||||
if value and value ~= "" then
|
||||
if value and value ~= "" and (type(value) == "number" or type(value) == "string") then
|
||||
local spellID = WeakAuras.SafeToNumber(value)
|
||||
if spellID then
|
||||
local spellName = GetSpellInfo(WeakAuras.SafeToNumber(value))
|
||||
@@ -878,7 +881,7 @@ function OptionsPrivate.ConstructOptions(prototype, data, startorder, triggernum
|
||||
values = WeakAuras[arg.values];
|
||||
end
|
||||
end
|
||||
local sortOrder = arg.sorted and OptionsPrivate.Private.SortOrderForValues(values) or nil
|
||||
local sortOrder = arg.sorted and (arg.sortOrder or OptionsPrivate.Private.SortOrderForValues(values)) or nil
|
||||
options[name..suffix] = {
|
||||
type = "select",
|
||||
width = WeakAuras.normalWidth,
|
||||
|
||||
@@ -152,7 +152,7 @@ local function ConstructIconPicker(frame)
|
||||
else
|
||||
self.givenPath = {};
|
||||
for child in OptionsPrivate.Private.TraverseLeafsOrAura(baseObject) do
|
||||
if(child) then
|
||||
if child and paths[child.id] then
|
||||
local value = valueFromPath(child, paths[child.id])
|
||||
self.givenPath[child.id] = value or "";
|
||||
end
|
||||
|
||||
@@ -182,15 +182,15 @@ local function recurseUpdate(data, chunk)
|
||||
end
|
||||
end
|
||||
|
||||
local function RecurseDiff(ours, theirs, ignoredForDiffChecking)
|
||||
local function RecurseDiff(ours, theirs, ignored)
|
||||
local diff, seen, same = {}, {}, true
|
||||
for key, ourVal in pairs(ours) do
|
||||
if not (type(ignoredForDiffChecking) == "table" and ignoredForDiffChecking[key] == true) then
|
||||
local ignoredVal = ignored and ignored[key]
|
||||
if not ignoredVal or type(ignoredVal) == "table" then
|
||||
seen[key] = true
|
||||
local theirVal = theirs[key]
|
||||
if type(ourVal) == "table" and type(theirVal) == "table" then
|
||||
local diffVal = RecurseDiff(ourVal, theirVal,
|
||||
type(ignoredForDiffChecking) == table and ignoredForDiffChecking[key] or nil)
|
||||
local diffVal = RecurseDiff(ourVal, theirVal, type(ignoredVal) == "table" and ignoredVal or nil)
|
||||
if diffVal then
|
||||
diff[key] = diffVal
|
||||
same = false
|
||||
@@ -207,7 +207,7 @@ local function RecurseDiff(ours, theirs, ignoredForDiffChecking)
|
||||
end
|
||||
end
|
||||
for key, theirVal in pairs(theirs) do
|
||||
if not seen[key] and not (type(ignoredForDiffChecking) == "table" and ignoredForDiffChecking[key] == true) then
|
||||
if not seen[key] and not (type(ignored) == "table" and ignored[key] == true) then
|
||||
diff[key] = theirVal
|
||||
same = false
|
||||
end
|
||||
@@ -243,13 +243,13 @@ local function DebugPrintDiff(diff, id, uid)
|
||||
end
|
||||
|
||||
local function Diff(ours, theirs)
|
||||
local ignoredForDiffChecking = WeakAuras.Mixin({}, OptionsPrivate.Private.internal_fields,
|
||||
OptionsPrivate.Private.non_transmissable_fields)
|
||||
local ignored = WeakAuras.Mixin({}, OptionsPrivate.Private.internal_fields,
|
||||
OptionsPrivate.Private.non_transmissable_fields)
|
||||
|
||||
-- generates a diff which WeakAuras.Update can use
|
||||
local debug = false
|
||||
if not ours or not theirs then return end
|
||||
local diff = RecurseDiff(ours, theirs, ignoredForDiffChecking)
|
||||
local diff = RecurseDiff(ours, theirs, ignored)
|
||||
if diff then
|
||||
if debug then
|
||||
DebugPrintDiff(diff, theirs.id, theirs.uid)
|
||||
|
||||
@@ -545,7 +545,7 @@ local function OnRename(event, uid, oldid, newid)
|
||||
end
|
||||
|
||||
OptionsPrivate.StopGrouping()
|
||||
OptionsPrivate.SortDisplayButtons()
|
||||
OptionsPrivate.SortDisplayButtons(nil, true)
|
||||
|
||||
frame:OnRename(uid, oldid, newid)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user