Quantcast

Modified the message text to indicate the total number of an item the toon has instead of what was just acquired.

pschifferer [11-06-09 - 02:53]
Modified the message text to indicate the total number of an item the toon has instead of what was just acquired.
Filename
CauldronMain.lua
diff --git a/CauldronMain.lua b/CauldronMain.lua
index dd8e8a2..b94bf31 100644
--- a/CauldronMain.lua
+++ b/CauldronMain.lua
@@ -400,13 +400,15 @@ function Cauldron:OnBagUpdate(event, bagid)
 				self:debug("OnBagUpdate: set recalc flag");
 				recalc = true;

-				local amount = math.min(itemCount, intItem.amount);
+				local counts = Cauldron:ReagentCount(item);
+				local amount = math.min(counts.has, intItem.amount);
 				local str = string.format("%s: %s: %d/%d", L["Intermediate"], item, amount, intItem.amount);
 				UIErrorsFrame:AddMessage(str, 0.0, 0.9, 0.4, 86, 3);
 			else
 				local rItem = CauldronQueue:GetReagentItem(queue, item);
 				if rItem then
-					local amount = math.min(itemCount, rItem.amount);
+					local counts = Cauldron:ReagentCount(item);
+					local amount = math.min(counts.has, rItem.amount);
 					local str = string.format("%s: %s: %d/%d", L["Reagent"], item, amount, rItem.amount);
 					UIErrorsFrame:AddMessage(str, 0.0, 0.9, 0.0, 86, 3);
 				end