Module:Items/SourceTables: Difference between revisions

m
Fix Summoning non-shard item cost quantity
(Update for v1.0.3)
m (Fix Summoning non-shard item cost quantity)
Line 154: Line 154:
local nonShard = Items.getItemByID(nonShardID)
local nonShard = Items.getItemByID(nonShardID)
if nonShard ~= nil then
if nonShard ~= nil then
local itemValue = math.max(item.sellsFor, 20)
local itemValue = math.max(nonShard.sellsFor, 20)
local nonShardQty = math.max(1, math.floor(recipeGPCost / itemValue))
local nonShardQty = math.max(1, math.floor(recipeGPCost / itemValue))
table.insert(OtherCostArray, Icons.Icon({nonShard.name, type='item', notext=true, qty=nonShardQty}))
table.insert(OtherCostArray, Icons.Icon({nonShard.name, type='item', notext=true, qty=nonShardQty}))