diff --git a/WeakAurasOptions/ActionOptions.lua b/WeakAurasOptions/ActionOptions.lua index 447e8025cc..a68dc1debd 100644 --- a/WeakAurasOptions/ActionOptions.lua +++ b/WeakAurasOptions/ActionOptions.lua @@ -1,4 +1,5 @@ if not WeakAuras.IsLibsOK() then return end +---@type string, OptionsPrivate local AddonName, OptionsPrivate = ... local L = WeakAuras.L @@ -1009,8 +1010,12 @@ function OptionsPrivate.GetActionOptions(data) local reload = option.reloadOptions option.reloadOptions = nil option.set = function(info, v) - data.actions.start["message_format_" .. key] = v - WeakAuras.Add(data) + OptionsPrivate.Private.TimeMachine:Append({ + actionType = "set", + uid = data.uid, + path = {"actions", "start", "message_format_" .. key}, + payload = v + }) if reload then WeakAuras.ClearAndUpdateOptions(data.id) end @@ -1072,8 +1077,12 @@ function OptionsPrivate.GetActionOptions(data) local reload = option.reloadOptions option.reloadOptions = nil option.set = function(info, v) - data.actions.finish["message_format_" .. key] = v - WeakAuras.Add(data) + OptionsPrivate.Private.TimeMachine:Append({ + actionType = "set", + uid = data.uid, + path = {"actions", "finish", "message_format_" .. key}, + payload = v + }) if reload then WeakAuras.ClearAndUpdateOptions(data.id) end diff --git a/WeakAurasOptions/BuffTrigger2.lua b/WeakAurasOptions/BuffTrigger2.lua index 0d17fda98f..2a791b76f9 100644 --- a/WeakAurasOptions/BuffTrigger2.lua +++ b/WeakAurasOptions/BuffTrigger2.lua @@ -1,4 +1,5 @@ if not WeakAuras.IsLibsOK() then return end +---@type string, OptionsPrivate local AddonName, OptionsPrivate = ... local L = WeakAuras.L @@ -178,6 +179,12 @@ local function CreateNameOptions(aura_options, data, trigger, size, isExactSpell set = function(info, v) trigger[optionKey] = trigger[optionKey] or {} if v == "" then + OptionsPrivate.Private.TimeMachine:Append({ + actionType = "remove", + uid = data.uid, + path = { "triggers", triggernum, "trigger", optionKey }, + payload = i + }) shiftTable(trigger[optionKey], i) else if isExactSpellId then