From 5fd07421dabc0ba625476a5f0cd50a803fb56d0c Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Thu, 10 Mar 2011 05:27:14 -0600 Subject: [PATCH] Detect if a vendor who is listed as selling a recipe in unlimited quantity is actually a limited-quantity vendor and fix the recipe. --- Scanner.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Scanner.lua b/Scanner.lua index c2a6769..80e90f3 100644 --- a/Scanner.lua +++ b/Scanner.lua @@ -1293,6 +1293,18 @@ do end added_output = true table.insert(output, ("Vendor ID missing from \"%s\" %d."):format(recipe and recipe.name or _G.UNKNOWN, spell_id)) + else + if private.vendor_list[vendor_id].item_list[spell_id] == true and supply > -1 then + recipe:AddLimitedVendor(vendor_id, supply) + table.insert(output, ("Limited quantity for \"%s\" (%d) found on vendor %d - listed as unlimited quantity."):format(recipe.name, spell_id, vendor_id)) + added_output = true + end + + if not recipe:HasFilter("common1", "VENDOR") then + recipe:AddFilters(F.VENDOR) + table.insert(output, ("%d: Vendor flag needs to be set."):format(spell_id)) + added_output = true + end end else --@debug@ -- 1.7.9.5