(feat/Prototypes) Add prefix negation also to zoneId and encounterId load checks
(cherry picked from commit 666d59ccc86b7f2c34fe032e4f6a57c3689fdf9f)
This commit is contained in:
@@ -593,10 +593,11 @@ function WeakAuras.CheckNumericIds(loadids, currentId)
|
||||
local startI, endI = string.find(loadids, currentId, searchFrom);
|
||||
while (startI) do
|
||||
searchFrom = endI + 1; -- start next search from end
|
||||
if (startI == 1 or tonumber(string.sub(loadids, startI - 1, startI - 1)) == nil) then
|
||||
local isNeg = (startI > 1 and string.sub(loadids, startI - 1, startI - 1) == "-")
|
||||
if (isNeg or startI == 1 or tonumber(string.sub(loadids, startI - 1, startI - 1)) == nil) then
|
||||
-- Either right at start, or character before is not a number
|
||||
if (endI == string.len(loadids) or tonumber(string.sub(loadids, endI + 1, endI + 1)) == nil) then
|
||||
return true;
|
||||
return not isNeg
|
||||
end
|
||||
end
|
||||
startI, endI = string.find(loadids, currentId, searchFrom);
|
||||
|
||||
Reference in New Issue
Block a user