From 137f7a87574df4c0d7caa676d887f9267848ffa3 Mon Sep 17 00:00:00 2001 From: pschifferer Date: Tue, 24 Feb 2009 06:44:43 +0000 Subject: [PATCH] Made the potential craft count only consider "key" reagents. --- CauldronUtil.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CauldronUtil.lua b/CauldronUtil.lua index 1c8a4ab..8713476 100644 --- a/CauldronUtil.lua +++ b/CauldronUtil.lua @@ -19,11 +19,14 @@ function Cauldron:GetPotentialCraftCount(skillInfo) -- than one reagent if #skillInfo.reagents > 1 then for i,rinfo in ipairs(skillInfo.reagents) do - local counts = Cauldron:ReagentCount(rinfo.name); - local makeable = math.floor(counts.total / rinfo.numRequired); - - if (makeable > 0) and (count > 0) and (makeable < count) then - count = makeable; + -- only count "key" reagents + if rinfo.key then + local counts = Cauldron:ReagentCount(rinfo.name); + local makeable = math.floor(counts.total / rinfo.numRequired); + + if (makeable > 0) and (count > 0) and (makeable < count) then + count = makeable; + end end end end -- 1.7.9.5