4,683
edits
(_getItemUses: Fix shop icon type derivation) |
(Use Abyssal level req where applicable) |
||
Line 434: | Line 434: | ||
local itemDef = {id = recipe.itemID, name = recipeItem.name} | local itemDef = {id = recipe.itemID, name = recipeItem.name} | ||
local qty = (recipe.baseQuantity or 1) * (costDef.quantityMultiplier or 1) | local qty = (recipe.baseQuantity or 1) * (costDef.quantityMultiplier or 1) | ||
local rowReq = Skills. | local rowReq, isAbyssal = Skills.getRecipeLevelRealm(recipeSkillID, recipe) | ||
local reqVal = nil | local reqVal = nil | ||
local xp = recipe.baseAbyssalExperience or recipe.baseExperience | local xp = recipe.baseAbyssalExperience or recipe.baseExperience | ||
Line 443: | Line 443: | ||
local masteryReq = Icons._MasteryReq(recipeItem.name, levelUnlock.level) | local masteryReq = Icons._MasteryReq(recipeItem.name, levelUnlock.level) | ||
reqVal = rowReq + levelUnlock.level * 0.01 | reqVal = rowReq + levelUnlock.level * 0.01 | ||
rowReq = Icons. | rowReq = Icons._GetSkillReq(skillName, rowReq, false, isAbyssal) .. '<br/>' .. masteryReq | ||
end | end | ||
end | end | ||
table.insert(useArray, {item = itemDef, qty = qty, mats = costDef.itemCosts, gp = recipe.gpCost, sc = recipe.scCost, skill = skillName, reqVal = reqVal, req = rowReq, xp = xp}) | table.insert(useArray, {item = itemDef, qty = qty, mats = costDef.itemCosts, gp = recipe.gpCost, sc = recipe.scCost, skill = skillName, reqVal = reqVal, req = rowReq, isAbyssal = isAbyssal, xp = xp}) | ||
end | end | ||
end | end | ||
Line 462: | Line 462: | ||
local product = Items.getItemByID(recipe.productId) | local product = Items.getItemByID(recipe.productId) | ||
local mat = {{id = recipe.seedCost.id, quantity = recipe.seedCost.quantity}} | local mat = {{id = recipe.seedCost.id, quantity = recipe.seedCost.quantity}} | ||
local rowReq = Skills. | local rowReq, isAbyssal = Skills.getRecipeLevelRealm('melvorD:Farming', recipe) | ||
local category = GameData.getEntityByID(SkillData.Farming.categories, recipe.categoryID) | local category = GameData.getEntityByID(SkillData.Farming.categories, recipe.categoryID) | ||
local qty = 5 * category.harvestMultiplier | local qty = 5 * category.harvestMultiplier | ||
local xp = recipe.baseAbyssalExperience or recipe.baseExperience | local xp = recipe.baseAbyssalExperience or recipe.baseExperience | ||
table.insert(useArray, {item = {id = product.id, name = product.name}, qty = qty, mats = mat, skill = 'Farming', req = rowReq, xp = xp}) | table.insert(useArray, {item = {id = product.id, name = product.name}, qty = qty, mats = mat, skill = 'Farming', req = rowReq, isAbyssal = isAbyssal, xp = xp}) | ||
end | end | ||
end | end | ||
Line 507: | Line 507: | ||
local recipeCosts = Shared.clone(recipe.itemCosts) | local recipeCosts = Shared.clone(recipe.itemCosts) | ||
local xp = recipe.baseAbyssalExperience or recipe.baseExperience | local xp = recipe.baseAbyssalExperience or recipe.baseExperience | ||
local req = Skills. | local req, isAbyssal = Skills.getRecipeLevelRealm('melvorD:Summoning', recipe) | ||
local recipeCosts = {} | local recipeCosts = {} | ||
for k, itemCost in ipairs(recipe.itemCosts) do | for k, itemCost in ipairs(recipe.itemCosts) do | ||
Line 518: | Line 518: | ||
table.insert(recipeCosts, {id = nonShardItemID, quantity = nonShardQty}) | table.insert(recipeCosts, {id = nonShardItemID, quantity = nonShardQty}) | ||
end | end | ||
table.insert(useArray, {item = {id = recipeItem.id, name = recipeItem.name}, qty = recipe.baseQuantity, mats = recipeCosts, gp = recipe.gpCost, sc = recipe.scCost, skill = 'Summoning', req = req, xp = xp}) | table.insert(useArray, {item = {id = recipeItem.id, name = recipeItem.name}, qty = recipe.baseQuantity, mats = recipeCosts, gp = recipe.gpCost, sc = recipe.scCost, skill = 'Summoning', req = req, isAbyssal = isAbyssal, xp = xp}) | ||
end | end | ||
end | end | ||
Line 576: | Line 576: | ||
if type(row.req) == 'number' then | if type(row.req) == 'number' then | ||
reqVal = row.req | reqVal = row.req | ||
reqText = Icons. | reqText = Icons._GetSkillReq(typeName, row.req, false, row.isAbyssal) | ||
elseif type(row.req) == 'string' then | elseif type(row.req) == 'string' then | ||
reqText = row.req | reqText = row.req |