From bbe8e1337120539d5423775d231c9cbe36e077ce Mon Sep 17 00:00:00 2001 From: pschifferer Date: Tue, 24 Feb 2009 06:29:30 +0000 Subject: [PATCH] Fixed a logic error in potential count function. --- CauldronUtil.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CauldronUtil.lua b/CauldronUtil.lua index 99e7420..4b57b68 100644 --- a/CauldronUtil.lua +++ b/CauldronUtil.lua @@ -12,8 +12,8 @@ end function Cauldron:GetPotentialCraftCount(skillInfo) self:debug("GetPotentialCraftCount enter"); - local count = 0; ---[[ + local count = 999999; + -- iterate over the reagent list and find out how many can be made for each reagent count; -- the lowest value is the potential amount craftable for i,rinfo in ipairs(skillInfo.reagents) do @@ -24,7 +24,10 @@ function Cauldron:GetPotentialCraftCount(skillInfo) count = makeable; end end ---]] + + if count == 999999 then + count = 0; + end self:debug("GetPotentialCraftCount exit"); @@ -40,7 +43,7 @@ function Cauldron:ReagentCount(reagent) mail = 0, altHas = {}, total = 0, - } + }; -- sanity checks if not reagent then -- 1.7.9.5