4,980
edits
m (Fix parameters for standalone creation tables being reversed) |
m (Fix lua error if the first unlockRequirement for a township trade was not a skill level requirement) |
||
Line 1,549: | Line 1,549: | ||
local resName = (res ~= nil and res.name) or 'Unknown' | local resName = (res ~= nil and res.name) or 'Unknown' | ||
local resQty = math.max(item.sellsFor, 2) | local resQty = math.max(item.sellsFor, 2) | ||
local townshipReq = GameData. | local lvl = nil | ||
local townshipReq = GameData.getEntities(tradeDef.unlockRequirements, function(req) return req.skillID == 'melvorD:Township' end) | |||
if townshipReq ~= nil and townshipReq[1] ~= nil then | |||
lvl = townshipReq[1].level + (townshipReq[1].type == 'AbyssalLevel' and 120 or 0) | |||
end | |||
table.insert(tableData, { | table.insert(tableData, { |