17,105
edits
m (Adapt to revised data format) |
m (Remove cloning of item tables as ID is provided in source data) |
||
Line 58: | Line 58: | ||
function p.getItemByID(ID) | function p.getItemByID(ID) | ||
return ItemData.Items[ID + 1] | |||
end | end | ||
Line 72: | Line 68: | ||
for i, item in pairs(ItemData.Items) do | for i, item in pairs(ItemData.Items) do | ||
local itemName = string.gsub(item.name, '#', '') | local itemName = string.gsub(item.name, '#', '') | ||
if(name == itemName) then | if (name == itemName) then return item end | ||
end | end | ||
end | end | ||
Line 86: | Line 76: | ||
for i, item in pairs(ItemData.Items) do | for i, item in pairs(ItemData.Items) do | ||
if checkFunc(item) then | if checkFunc(item) then | ||
table.insert(result, item) | |||
table.insert(result, | |||
end | end | ||
end | end |