diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index bdd7b0a..9fc836b 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -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); diff --git a/WeakAuras/Types_ClassicPlus.lua b/WeakAuras/Types_ClassicPlus.lua index 7007a7c..48a7268 100644 --- a/WeakAuras/Types_ClassicPlus.lua +++ b/WeakAuras/Types_ClassicPlus.lua @@ -125,7 +125,7 @@ function Private.InitializeEncounterAndZoneLists() encounter_list = encounter_list .. "\n" end - encounter_list = encounter_list:sub(1, -3) .. "\n\n" .. L["Based on "] .. "https://wago.tools/db2/DungeonEncounter?build=3.4.5.63009\n" .. L["Supports multiple entries, separated by commas\n"] + encounter_list = encounter_list:sub(1, -3) .. "\n\n" .. L["Based on "] .. "https://wago.tools/db2/DungeonEncounter?build=3.4.5.63009\n" .. L["Supports multiple entries, separated by commas. Prefix with '-' for negation."] end function Private.get_encounters_list() diff --git a/WeakAuras/Types_TBC.lua b/WeakAuras/Types_TBC.lua index 599f5bd..4a7e6ab 100644 --- a/WeakAuras/Types_TBC.lua +++ b/WeakAuras/Types_TBC.lua @@ -121,7 +121,7 @@ function Private.InitializeEncounterAndZoneLists() encounter_list = encounter_list .. "\n" end - encounter_list = encounter_list:sub(1, -3) .. "\n\n" .. L["Based on "] .. "https://wago.tools/db2/DungeonEncounter?build=3.4.5.63009\n" .. L["Supports multiple entries, separated by commas\n"] + encounter_list = encounter_list:sub(1, -3) .. "\n\n" .. L["Based on "] .. "https://wago.tools/db2/DungeonEncounter?build=3.4.5.63009\n" .. L["Supports multiple entries, separated by commas. Prefix with '-' for negation."] end function Private.get_encounters_list() diff --git a/WeakAuras/Types_Wrath.lua b/WeakAuras/Types_Wrath.lua index 51343dd..beec2c1 100644 --- a/WeakAuras/Types_Wrath.lua +++ b/WeakAuras/Types_Wrath.lua @@ -146,7 +146,7 @@ function Private.InitializeEncounterAndZoneLists() encounter_list = encounter_list .. "\n" end - encounter_list = encounter_list:sub(1, -3) .. "\n\n" .. L["Based on "] .. "https://wago.tools/db2/DungeonEncounter?build=3.4.5.63009\n" .. L["Supports multiple entries, separated by commas\n"] + encounter_list = encounter_list:sub(1, -3) .. "\n\n" .. L["Based on "] .. "https://wago.tools/db2/DungeonEncounter?build=3.4.5.63009\n" .. L["Supports multiple entries, separated by commas. Prefix with '-' for negation."] end function Private.get_encounters_list()