From 34b2e696000add1260fe0ec71b2bf0f31078e94f Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Thu, 5 Jun 2025 13:57:23 +0200 Subject: [PATCH] small fixes --- WeakAuras/Modernize.lua | 15 ++++++++++++++- WeakAuras/Prototypes.lua | 2 +- WeakAurasOptions/OptionsFrames/TextEditor.lua | 2 +- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/WeakAuras/Modernize.lua b/WeakAuras/Modernize.lua index bade47b..0cc3655 100644 --- a/WeakAuras/Modernize.lua +++ b/WeakAuras/Modernize.lua @@ -2153,7 +2153,7 @@ function Private.Modernize(data, oldSnapshot) ["Alternate Power"] = true, ["Cast"] = true } - for _, triggerData in ipairs(data.triggers) do + for triggerNum, triggerData in ipairs(data.triggers) do local trigger = triggerData.trigger if trigger and trigger.type == "unit" then -- Migrate raidMarkIndex @@ -2174,6 +2174,19 @@ function Private.Modernize(data, oldSnapshot) end -- Migrate old Combo Points triggers if trigger.event == "Combo Points" then + -- Conditions + if data.conditions then + for conditionIndex, condition in ipairs(data.conditions) do + if condition.check then + if condition.check.trigger == triggerNum then + if condition.check.variable == "stacks" then + condition.check.variable = "power" + end + end + end + end + end + -- Trigger local newTrigger = { type = "unit", use_unit = true, diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index b1a263d..17983cf 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -6114,7 +6114,7 @@ Private.event_prototypes = { preamble = "local spellChecker = Private.ExecEnv.CreateSpellChecker()", preambleGroup = "spell", test = "spellChecker:CheckName(spellNames)", - conditionType = "number", + --conditionType = "number", -- Disabled because input would be string and would break imports to retail noProgressSource = true }, { diff --git a/WeakAurasOptions/OptionsFrames/TextEditor.lua b/WeakAurasOptions/OptionsFrames/TextEditor.lua index 32e8a58..17e31cf 100644 --- a/WeakAurasOptions/OptionsFrames/TextEditor.lua +++ b/WeakAurasOptions/OptionsFrames/TextEditor.lua @@ -506,7 +506,7 @@ local function ConstructTextEditor(frame) editor.editBox.timeMachinePos = 1 local TimeMachineMaximumRollback = 10 - -- We do not have those events in the editbox, so we created buttons for undo/redo below... + -- These events aren’t supported in the editbox, so we add undo/redo buttons below instead... --[[editor.editBox:HookScript( "OnKeyDown", function(self, key)