# HG changeset patch # User Asa Ayers # Date 1282285682 25200 # Node ID 89663c9dd7724eb580dab651a913983ce1dc0704 # Parent 53147a647e28a15f4a0dcad99d696277b962c7c9 Fixed reagent costs so that /ia snatch will get the correct prices. diff -r 53147a647e28 -r 89663c9dd772 CHANGELOG.txt --- a/CHANGELOG.txt Thu Aug 19 23:26:54 2010 -0700 +++ b/CHANGELOG.txt Thu Aug 19 23:28:02 2010 -0700 @@ -4,6 +4,7 @@ - Added a menu to allow the user to see what is to be crafted, only what you hae mats for, or view everything so you can see why something isn't to be crafted. - Added a new Crafting Rules module to allow the user to set up custom rules based on item names. - Converted the crafting threshold option to allow input instead of a drop down. +- Fixed reagent costs so that /ia snatch will get the correct prices. 2010-08-14 Asa Ayers diff -r 53147a647e28 -r 89663c9dd772 Modules/Crafting.lua --- a/Modules/Crafting.lua Thu Aug 19 23:26:54 2010 -0700 +++ b/Modules/Crafting.lua Thu Aug 19 23:28:02 2010 -0700 @@ -423,16 +423,17 @@ for reagentId = 1, GetTradeSkillNumReagents(i) do local reagentName, _, reagentCount = GetTradeSkillReagentInfo(i, reagentId); local reagentLink = GetTradeSkillReagentItemLink(i, reagentId) + local reagentTotalCost = self:GetReagentCost(reagentLink, reagentCount) reagents[reagentId] = { link = reagentLink, name = reagentName, count = reagentCount, - price = self:GetReagentCost(reagentLink, reagentCount), + price = reagentTotalCost / reagentCount, need = 0, -- This will get populated after the decisions have been made. it can't -- be done before that because highest profit items get priority on materials. } - totalCost = totalCost + self:GetReagentCost(reagentLink, reagentCount) + totalCost = totalCost + reagentTotalCost end local data = { recipeLink = recipeLink,