avoid using string:split defined in bigwigs
This commit is contained in:
+14
-1
@@ -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,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user