From 285ace9f1200d724e7aaa4ac5769fb7cc9f1b46f Mon Sep 17 00:00:00 2001 From: NoM0Re Date: Wed, 19 Feb 2025 14:32:35 +0100 Subject: [PATCH] (fix/Prototypes) fix switching triggers lead to errors e.g. from Combat Log to Spell Trigger --- WeakAuras/Prototypes.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index 87aed18..92e1d55 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -3417,6 +3417,7 @@ Private.event_prototypes = { return table.concat(ret) end, GetNameAndIcon = function(trigger) + if type(trigger.spellName) == "table" then return end local name, _, icon = GetSpellInfo(trigger.spellName or 0) return name or "Invalid", icon end, @@ -3646,6 +3647,7 @@ Private.event_prototypes = { return ret:format(spellName); end, GetNameAndIcon = function(trigger) + if type(trigger.spellName) == "table" then return end local spellName if (trigger.use_exact_spellName) then spellName = tonumber(trigger.spellName) @@ -3733,6 +3735,7 @@ Private.event_prototypes = { end, statesParameter = "one", GetNameAndIcon = function(trigger) + if type(trigger.spellName) == "table" then return end local spellName if (trigger.use_exact_spellName) then spellName = tonumber(trigger.spellName) @@ -4623,6 +4626,7 @@ Private.event_prototypes = { return ret:format(spellName) end, GetNameAndIcon = function(trigger) + if type(trigger.spellName) == "table" then return end local spellName if (trigger.use_exact_spellName) then spellName = tonumber(trigger.spellName)