Module:Items: Difference between revisions

Fixed quantity column
(Added header to the result from the getUseTable function to that the header can be hidden if not needed)
(Fixed quantity column)
Line 926: Line 926:
             rowReq = Icons._MasteryReq(item2.name, potTierMastery[item2.potionTier])
             rowReq = Icons._MasteryReq(item2.name, potTierMastery[item2.potionTier])
           end
           end
           table.insert(useArray, {item = item2, qty = req[2], mats = mat, skill = 'Upgrade', req = rowReq, xp = xp, gp = item2.trimmedGPCost})
           table.insert(useArray, {item = item2, qty = 1, mats = mat, skill = 'Upgrade', req = rowReq, xp = xp, gp = item2.trimmedGPCost})
           break
           break
         end
         end
Line 937: Line 937:
           local xp = item2.craftingXP
           local xp = item2.craftingXP
           local rowReq = item2.craftingLevel
           local rowReq = item2.craftingLevel
           table.insert(useArray, {item = item2, qty = req[2], mats = mat, skill = 'Crafting', req = rowReq, xp = xp})
          local qty = item2.craftQty
           table.insert(useArray, {item = item2, qty = qty, mats = mat, skill = 'Crafting', req = rowReq, xp = xp})
           break
           break
         end
         end
Line 948: Line 949:
           local xp = item2.fletchingXP
           local xp = item2.fletchingXP
           local rowReq = item2.fletchingLevel
           local rowReq = item2.fletchingLevel
           table.insert(useArray, {item = item2, qty = req[2], mats = mat, skill = 'Fletching', req = rowReq, xp = xp})
          local qty = item2.fletchQty
           table.insert(useArray, {item = item2, qty = qty, mats = mat, skill = 'Fletching', req = rowReq, xp = xp})
           break
           break
         end
         end
Line 959: Line 961:
           local xp = item2.smithingXP
           local xp = item2.smithingXP
           local rowReq = item2.smithingLevel
           local rowReq = item2.smithingLevel
           table.insert(useArray, {item = item2, qty = req[2], mats = mat, skill = 'Smithing', req = rowReq, xp = xp})
          local qty = item2.smithingQty
           table.insert(useArray, {item = item2, qty = qty, mats = mat, skill = 'Smithing', req = rowReq, xp = xp})
           break
           break
         end
         end
Line 970: Line 973:
           local xp = item2.runecraftingXP
           local xp = item2.runecraftingXP
           local rowReq = item2.runecraftingLevel
           local rowReq = item2.runecraftingLevel
           table.insert(useArray, {item = item2, qty = req[2], mats = mat, skill = 'Runecrafting', req = rowReq, xp = xp})
          local qty = item2.runecraftQty
           table.insert(useArray, {item = item2, qty = qty, mats = mat, skill = 'Runecrafting', req = rowReq, xp = xp})
           break
           break
         end
         end
Line 982: Line 986:
           local xp = potionData.herbloreXP
           local xp = potionData.herbloreXP
           local rowReq = potionData.herbloreLevel
           local rowReq = potionData.herbloreLevel
           table.insert(useArray, {item = item2, qty = req[2], mats = mat, skill = 'Herblore', req = rowReq, xp = xp})
           table.insert(useArray, {item = item2, qty = 1, mats = mat, skill = 'Herblore', req = rowReq, xp = xp})
           break
           break
         end
         end