Module:Items: Difference between revisions

Tweaked handling of Gems slightly in getItemLootSources
(Various improvements to both getCreationTable and getItemLootSources)
(Tweaked handling of Gems slightly in getItemLootSources)
Line 611: Line 611:
     local mineType = Icons.Icon({'Mining', type='skill'})
     local mineType = Icons.Icon({'Mining', type='skill'})
     local thisGemChance = GemTable[item.name].chance  
     local thisGemChance = GemTable[item.name].chance  
     table.insert(dropRows, {source = 'Special Drop', type = mineType, minqty = 1, qty = 1, chance = (thisGemChance * GemChance)})
     table.insert(dropRows, {source = '[[Mining#Gems|Gem]]', type = mineType, minqty = 1, qty = 1, chance = thisGemChance})
     local magicType = Icons.Icon({'Magic', type = 'skill'})
     local magicType = Icons.Icon({'Magic', type = 'skill'})
     table.insert(dropRows, {source = Icons.Icon({"Rags to Riches I", type="spell"}), type = magicType, minqty = 1, qty = 1, chance = thisGemChance})
     table.insert(dropRows, {source = Icons.Icon({"Rags to Riches I", type="spell"}), type = magicType, minqty = 1, qty = 1, chance = thisGemChance})