From da06edbdd352a4da09fd1315eb06eb0ae592cf60 Mon Sep 17 00:00:00 2001 From: pschifferer Date: Sat, 28 Feb 2009 15:48:13 +0000 Subject: [PATCH] Modified the checks for reagents before adding to shopping list. --- CauldronMain.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CauldronMain.lua b/CauldronMain.lua index 297c91d..67bcce2 100644 --- a/CauldronMain.lua +++ b/CauldronMain.lua @@ -739,7 +739,12 @@ function Cauldron:UpdateShoppingListFromQueue() local items = CauldronQueue:GetReagents(self.db.realm.userdata[self.vars.playername].queue); if items then for i,item in ipairs(items) do - Cauldron:AddItemToShoppingList(item.name, item.amount, true); + local id = Cauldron:GetIdFromLink(item.link); + local have = GetItemCount(item.link); + local needed = math.max(0, item.amount - have); + if (needed > 0) and Cauldron:IsVendorItem(id) then + Cauldron:AddItemToShoppingList(item.name, needed, true); + end end end end -- 1.7.9.5