diff utils.lua @ 76:9d487333bf10

Block cross-tradeskill in external window
author contrebasse
date Sat, 14 May 2011 21:30:56 +0200
parents a77fd9d06ba4
children cf1da2654dc6
line wrap: on
line diff
--- a/utils.lua	Sat May 14 21:00:38 2011 +0200
+++ b/utils.lua	Sat May 14 21:30:56 2011 +0200
@@ -235,3 +235,21 @@
 	
 	return unique
 end
+
+--[[
+function A.isTradeskillUnique(itemData)
+	local spellID = itemData[1].spellID
+	
+	-- Check if the item is made by only one recipe. If not, return
+	if #itemData>1 then
+		for _,v in ipairs(itemData) do
+			if v.spellID ~= spellID then
+				spellID = nil
+				break
+			end
+		end
+	end
+	
+	return spellID
+end
+--]]
\ No newline at end of file