Module:Skills/Summoning: Difference between revisions

Fix Summoning non-shard item cost quantity
(Further 1.0.3 fixes, reverts temporary 'fix')
(Fix Summoning non-shard item cost quantity)
Line 112: Line 112:
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(nonShardItem.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}))