Anonymous

Module:Skills/Summoning: Difference between revisions

From Melvor Idle
m
no edit summary
(Fix Summoning non-shard item cost quantity)
mNo edit summary
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(nonShardItem.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}))