Skip to content

Commit

Permalink
blablabla
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyrivers committed Mar 24, 2024
1 parent ed3aa12 commit c2a98f6
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
17 changes: 13 additions & 4 deletions WeakAurasOptions/ActionOptions.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if not WeakAuras.IsLibsOK() then return end
---@type string, OptionsPrivate
local AddonName, OptionsPrivate = ...

local L = WeakAuras.L
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions WeakAurasOptions/BuffTrigger2.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
if not WeakAuras.IsLibsOK() then return end
---@type string, OptionsPrivate
local AddonName, OptionsPrivate = ...

local L = WeakAuras.L
Expand Down Expand Up @@ -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 },

Check warning on line 185 in WeakAurasOptions/BuffTrigger2.lua

View workflow job for this annotation

GitHub Actions / build

accessing undefined variable 'triggernum'
payload = i
})
shiftTable(trigger[optionKey], i)
else
if isExactSpellId then
Expand Down

0 comments on commit c2a98f6

Please sign in to comment.