diff --git a/src/models/RolePlugin.lua b/src/models/RolePlugin.lua index f8fd90f..ca952c8 100644 --- a/src/models/RolePlugin.lua +++ b/src/models/RolePlugin.lua @@ -46,8 +46,9 @@ function RolePlugin.bind(Role) if limit and self:getItemCount(itemId) == 0 then local curCount = 0 local items = self:getProperty("items"):toNumMap() - for _,_ in pairs(items) do - if globalCsv.store_type[itemData.type] == page then + for id ,_ in pairs(items) do + local tempData = csvdb["itemCsv"][id] + if globalCsv.store_type[tempData.type] == page then curCount = curCount + 1 if curCount >= limit then count = 0 -- libgit2 0.21.2