Skip to content

Commit

Permalink
fix imports from new wa versions
Browse files Browse the repository at this point in the history
  • Loading branch information
fxpw authored and Bunny67 committed Oct 30, 2023
1 parent 4a8725d commit 5695210
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -211,14 +211,18 @@ function ConstructTest(trigger, arg)
test = "("..arg.test:format(tostring(trigger[name]) or "")..")";
elseif(arg.type == "longstring" and trigger[name.."_operator"]) then
test = TestForLongString(trigger, arg);
elseif (arg.type == "string" or arg.type == "select" or arg.type == "item") then
elseif (arg.type == "string" or arg.type == "select" or arg.type == "item") and not (type(trigger[name]) == "table") then
test = "(".. name .." and "..name.."==" ..(number or "\""..(trigger[name] or "").."\"")..")";
else
if(type(trigger[name]) == "table") then
trigger[name] = "error";
end
-- number
test = "(".. name .." and "..name..(trigger[name.."_operator"] or "==")..(number or "\""..(trigger[name] or "").."\"")..")";
-- if (type(trigger[name]) == "table") or type(trigger[name.."_operator"]) == "table" then
-- 3.4.0 auras fix
if (type(trigger[name]) == "table") then
trigger[name] = trigger[name][1] or "error";
end
if (type(trigger[name.."_operator"]) == "table") then
trigger[name.."_operator"] = trigger[name.."_operator"][1] or "error";
end
test = "(".. name .." and "..name..(trigger[name.."_operator"] or "==")..(number or ("\""..(trigger[name])) or ("".."\""))..")";
end
end

Expand Down

0 comments on commit 5695210

Please sign in to comment.