Made the check for displaying reagent/intermediate items acquired consider the number of items
pschifferer [11-14-09 - 05:47]
Made the check for displaying reagent/intermediate items acquired consider the number of items
the character had before acquiring it before displaying the message.
diff --git a/CauldronMain.lua b/CauldronMain.lua
index 689d5a3..55fb071 100644
--- a/CauldronMain.lua
+++ b/CauldronMain.lua
@@ -404,7 +404,7 @@ function Cauldron:OnBagUpdate(event, bagid)
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);
- if amount <= intItem.amount then
+ if (counts.has - itemCount) < intItem.amount then
UIErrorsFrame:AddMessage(str, 0.0, 0.9, 0.4, 86, 3);
end
else
@@ -413,7 +413,7 @@ function Cauldron:OnBagUpdate(event, bagid)
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);
- if amount <= rItem.amount then
+ if (counts.has - itemCount) <= rItem.amount then
UIErrorsFrame:AddMessage(str, 0.0, 0.9, 0.0, 86, 3);
end
end