Fix importing actionbars
This commit is contained in:
@@ -407,6 +407,7 @@ function ParseAction(action)
|
||||
|
||||
if not action or action == "" then return ret end
|
||||
action = strtrim(action)
|
||||
---@type string, string, string
|
||||
local slot, id, typeChar = string.match(action, "([^\\]+)\\([^\\]+)\\([^\\]+)")
|
||||
if not typeChar then
|
||||
print(string.format("Unknown action type '%s' for action '%s'", tostring(typeChar), FormatAction(ret)))
|
||||
@@ -418,10 +419,8 @@ function ParseAction(action)
|
||||
return ret
|
||||
end
|
||||
|
||||
slot = tonumber(slot)
|
||||
id = tonumber(id)
|
||||
|
||||
if not slot then
|
||||
local slotNum = tonumber(slot)
|
||||
if not slotNum then
|
||||
print(string.format("Unknown slot '%s' for action '%s'", tostring(slot), FormatAction(ret)))
|
||||
return ret
|
||||
end
|
||||
@@ -432,7 +431,7 @@ function ParseAction(action)
|
||||
end
|
||||
|
||||
return {
|
||||
slot = slot,
|
||||
slot = slotNum,
|
||||
id = id,
|
||||
type = type,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user