Module:Skills/Summoning: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 99: Line 99:
function getShardCosts(familiar)
function getShardCosts(familiar)
local shardCosts = {}
local shardCosts = {}
for _, shardItem in ipairs(familiar.itemCosts) do
for _, shard in ipairs(familiar.itemCosts) do
for _, shardCost in ipairs(shardItem.cost.currencies) do
local shopItem = Shop.getPurchaseByID(shard)
for _, shardCost in ipairs(shopItem.cost.currencies) do
if shardCosts[shardCost.currency] then
if shardCosts[shardCost.currency] then
shardCosts[shardCost.currency] = shardCosts[shardCost.currency] + shardCost.cost
shardCosts[shardCost.currency] = shardCosts[shardCost.currency] + shardCost.cost
2,875

edits