fix registerevent logic

This commit is contained in:
NoM0Re
2025-01-16 18:53:43 +01:00
committed by GitHub
parent 04feb2f3ff
commit 858ba0ca5c
+2 -2
View File
@@ -122,7 +122,7 @@ local function GetCustomTriggerOptions(data, triggernum)
end
elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i)
if not (OptionsPrivate.Private.baseUnitId[unit] and OptionsPrivate.Private.multiUnitId[unit]) and not unit:find("^nameplate%d+$") then
if not ((OptionsPrivate.Private.baseUnitId[unit] and OptionsPrivate.Private.multiUnitId[unit]) or unit ~= "nameplate") then
return "|cFFFF0000"..L["Unit %s is not a valid unit for RegisterUnitEvent"]:format(unit)
end
elseif trueEvent == "TRIGGER" then
@@ -170,7 +170,7 @@ local function GetCustomTriggerOptions(data, triggernum)
end
elseif trueEvent:match("^UNIT_") then
local unit = string.lower(i)
if not (OptionsPrivate.Private.baseUnitId[unit] or unit:find("^nameplate%d+$")) then
if not (OptionsPrivate.Private.baseUnitId[unit] or unit ~= "nameplate") then
return false
end
elseif trueEvent == "TRIGGER" then