2,875
edits
No edit summary |
No edit summary |
||
Line 99: | Line 99: | ||
function getShardCosts(familiar) | function getShardCosts(familiar) | ||
local shardCosts = {} | local shardCosts = {} | ||
for _, | for _, shard in ipairs(familiar.itemCosts) do | ||
for _, shardCost in ipairs( | 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 |
edits