Quantcast

Fixed the check for vendor items.

pschifferer [02-27-09 - 05:52]
Fixed the check for vendor items.
Filename
CauldronTradeskill.lua
CauldronUtil.lua
diff --git a/CauldronTradeskill.lua b/CauldronTradeskill.lua
index 562daa3..fa5672d 100644
--- a/CauldronTradeskill.lua
+++ b/CauldronTradeskill.lua
@@ -139,7 +139,7 @@ function Cauldron:UpdateSkills()
 					local rLink = GetTradeSkillReagentItemLink(i, j);
 					local rItemId = Cauldron:GetIdFromLink(rLink);
 --					local value, set = self.libs.PT:ItemInSet(rItemId, "Tradeskill.Mat.BySource.Vendor");
-					local key = Cauldron:IsVendorItem(rItemId);
+					local key = not Cauldron:IsVendorItem(rItemId);
 --					if value then
 --						key = false;
 --					end
diff --git a/CauldronUtil.lua b/CauldronUtil.lua
index 1942d43..d4c4aac 100644
--- a/CauldronUtil.lua
+++ b/CauldronUtil.lua
@@ -2,6 +2,7 @@
 -- Cauldron utility functions

 function Cauldron:IsVendorItem(item)
+self:debug("is vendor item? item="..tostring(item));

 	if (not item) or (type(item) ~= "number") then
 		return false;
@@ -9,10 +10,12 @@ function Cauldron:IsVendorItem(item)

 	for _,num in ipairs(Cauldron.vars.vendoritems) do
 		if num == item then
+self:debug("found it");
 			return true;
 		end
 	end
-
+
+self:debug("not found");
 	return false;
 end