Quantcast

Fixed a logic error in potential count function.

pschifferer [02-24-09 - 06:29]
Fixed a logic error in potential count function.
Filename
CauldronUtil.lua
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