From 89782bdc42df2fd7eb4b19db549d518cc1b51a8a Mon Sep 17 00:00:00 2001 From: "James D. Callahan III" Date: Thu, 10 Mar 2011 05:39:04 -0600 Subject: [PATCH] May as well go ahead and detect if a vendor listed as limited supply actually has an unlimited supply and fix that, too. --- Scanner.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Scanner.lua b/Scanner.lua index 80e90f3..e6d3fa2 100644 --- a/Scanner.lua +++ b/Scanner.lua @@ -1294,10 +1294,16 @@ do 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 + local reported_supply = private.vendor_list[vendor_id].item_list[spell_id] + + if reported_supply == 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 + elseif type(reported_supply) ~= "boolean" and supply == -1 then + recipe:AddVendor(vendor_id) + table.insert(output, ("Unlimited quantity for \"%s\" (%d) found on vendor %d - listed as limited quantity."):format(recipe.name, spell_id, vendor_id)) + added_output = true end if not recipe:HasFilter("common1", "VENDOR") then -- 1.7.9.5