diff --git a/WeakAurasOptions/GenericTrigger.lua b/WeakAurasOptions/GenericTrigger.lua index 0731789..b2edeef 100644 --- a/WeakAurasOptions/GenericTrigger.lua +++ b/WeakAurasOptions/GenericTrigger.lua @@ -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