Browse Source

Make sure items from import lists are cached

pull/18/head
xanthics 2 years ago
parent
commit
ed525d1a2e
  1. 4
      TradeSkillMaster/Core/Groups.lua

4
TradeSkillMaster/Core/Groups.lua

@ -1314,6 +1314,7 @@ function TSM:ImportGroup(importStr, groupPath)
end end
local items = {} local items = {}
local bulkquerybuffer = {}
local currentSubPath = "" local currentSubPath = ""
for _, str in ipairs(TSMAPI:SafeStrSplit(importStr, ",")) do for _, str in ipairs(TSMAPI:SafeStrSplit(importStr, ",")) do
str = str:trim() str = str:trim()
@ -1336,10 +1337,13 @@ function TSM:ImportGroup(importStr, groupPath)
currentSubPath = subPath currentSubPath = subPath
elseif itemString then elseif itemString then
items[itemString] = currentSubPath items[itemString] = currentSubPath
local item = Item:CreateFromID(tonumber(noSpaceStr))
if not item:IsCached() then bulkquerybuffer[#bulkquerybuffer+1] = item.itemID end
else else
return return
end end
end end
TSMAPI:BulkQuery(bulkquerybuffer)
local num = 0 local num = 0
for itemString, subPath in pairs(items) do for itemString, subPath in pairs(items) do

Loading…
Cancel
Save