avoid using string:split defined in bigwigs

This commit is contained in:
pepopo978
2025-04-07 16:20:30 -07:00
parent 4ae2f14349
commit 7d0cff5eaf
+14 -1
View File
@@ -45,6 +45,19 @@ Cursive:RegisterDefaults("profile", {
ignorelist = {},
})
local function splitString(str, delimiter)
local result = {}
local from = 1
local delim_from, delim_to = string.find(str, delimiter, from)
while delim_from do
table.insert(result, string.sub(str, from, delim_from - 1))
from = delim_to + 1
delim_from, delim_to = string.find(str, delimiter, from)
end
table.insert(result, string.sub(str, from))
return result
end
local barOptions = {
["showtargetindicator"] = {
type = "toggle",
@@ -365,7 +378,7 @@ local mobFilters = {
if not v or v == "" then
Cursive.db.profile.ignorelist = {}
else
Cursive.db.profile.ignorelist = string.split(v, ",");
Cursive.db.profile.ignorelist = splitString(v, ",");
end
end,
},