changeset 93:c369a2e16ab6

Added prospecting and common data
author contrebasse
date Thu, 19 May 2011 20:25:41 +0200
parents c1214d48fa1c
children e1484cc77f01
files CommonData.lua ProspectingData.lua ReagentMaker.lua ReagentMaker.toc SecureMenu.lua data.lua
diffstat 6 files changed, 382 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/CommonData.lua	Thu May 19 20:25:41 2011 +0200
@@ -0,0 +1,56 @@
+local addonName, A = ...
+
+A.CommonData = {
+	[10939] = {{10938, 3, 1,spellID=13361}}, -- Lesser to Greater Magic Essence
+	[11082] = {{10998, 3, 1,spellID=13497}}, -- Lesser to Greater Astral Essence
+	[11135] = {{11134, 3, 1,spellID=13632}}, -- Lesser to Greater Mystic Essence
+	[11175] = {{11174, 3, 1,spellID=13739}}, -- Lesser to Greater Nether Essence
+	[16203] = {{16202, 3, 1,spellID=20039}}, -- Lesser to Greater Eternal Essence
+	[22446] = {{22447, 3, 1,spellID=32977}}, -- Lesser to Greater Planar Essence
+	[34055] = {{34056, 3, 1,spellID=44123}}, -- Lesser to Greater Cosmic Essence
+	[52719] = {{52718, 3, 1,spellID=74186}}, -- Lesser to Greater Celestial Essence
+
+	[10938] = {{10939, 1, 3,spellID=13362}}, -- Greater to Lesser Magic Essence
+	[10998] = {{11082, 1, 3,spellID=13498}}, -- Greater to Lesser Astral Essence
+	[11134] = {{11135, 1, 3,spellID=13633}}, -- Greater to Lesser Mystic Essence
+	[11174] = {{11175, 1, 3,spellID=13740}}, -- Greater to Lesser Nether Essence
+	[16202] = {{16203, 1, 3,spellID=20040}}, -- Greater to Lesser Eternal Essence
+	[22447] = {{22446, 1, 3,spellID=32978}}, -- Greater to Lesser Planar Essence
+	[34056] = {{34055, 1, 3,spellID=44122}}, -- Greater to Lesser Cosmic Essence
+	[52718] = {{52719, 1, 3,spellID=74187}}, -- Greater to Lesser Celestial Essence
+
+	[52721] = {{52720, 3, 1,spellID=74188}}, -- Small Heavenly Shard to Heavenly Shard
+	[34052] = {{34053, 3, 1,spellID=61755}}, -- Small Dream Shard to Dream Shard
+
+	[33568] = {{33567, 5, 1,spellID=59926}}, -- Borean Leather Scraps to Borean Leather
+	[52976] = {{52977, 5, 1,spellID=74493}}, -- Savage Leather Scraps to Savage Leather
+
+	[22451] = {{22572,10, 1,spellID=28100}}, -- Mote of Air to Primal Air
+	[22452] = {{22573,10, 1,spellID=28101}}, -- Mote of Earth to Primal Earth
+	[21884] = {{22574,10, 1,spellID=28102}}, -- Mote of Fire to Primal Fire
+	[21886] = {{22575,10, 1,spellID=28106}}, -- Mote of Life to Primal Life
+	[22457] = {{22576,10, 1,spellID=28105}}, -- Mote of Mana to Primal Mana
+	[22456] = {{22577,10, 1,spellID=28104}}, -- Mote of Shadow to Primal Shadow
+	[21885] = {{22578,10, 1,spellID=28103}}, -- Mote of Water to Primal Water
+
+	[35623] = {{37700,10, 1,spellID=49234}}, -- Crystallized to Eternal Air
+	[35624] = {{37701,10, 1,spellID=49248}}, -- Crystallized to Eternal Earth
+	[36860] = {{37702,10, 1,spellID=49244}}, -- Crystallized to Eternal Fire
+	[35625] = {{37704,10, 1,spellID=49247}}, -- Crystallized to Eternal Life
+	[35627] = {{37703,10, 1,spellID=49246}}, -- Crystallized to Eternal Shadow
+	[35622] = {{37705,10, 1,spellID=49245}}, -- Crystallized to Eternal Water
+
+	[37700] = {{35623, 1,10,spellID=56045}}, -- Eternal to Crystallized Air
+	[37701] = {{35624, 1,10,spellID=56041}}, -- Eternal to Crystallized Earth
+	[37702] = {{36860, 1,10,spellID=56042}}, -- Eternal to Crystallized Fire
+	[37704] = {{35625, 1,10,spellID=56043}}, -- Eternal to Crystallized Life
+	[37703] = {{35627, 1,10,spellID=56044}}, -- Eternal to Crystallized Shadow
+	[37705] = {{35622, 1,10,spellID=56040}}, -- Eternal to Crystallized Water
+}
+
+-- Add "Tradeskill" data to each "recipe"
+for itemID,t in pairs(A.CommonData) do
+	t[1].macro = "/use %s"
+	--t[1].spellName = GetSpellInfo(t[1].spellID)
+	t[1].spellLink = GetSpellLink(t[1].spellID)
+end
--- a/ProspectingData.lua	Tue May 17 18:35:24 2011 +0200
+++ b/ProspectingData.lua	Thu May 19 20:25:41 2011 +0200
@@ -1,71 +1,306 @@
-local addonName, A = ...
-
--- @todo: complete prospecting items
-
--- "Recipe" data
--- [itemID] = {
---     {reagentID, numberNeeded}
---     {reagentID, numberNeeded, minProduced, maxProduced}
---     {reagentID, numberNeeded, chanceToHaveOne}}
-A.ProspectingData = {
-	-- Prospect
-	[774] = { -- Malachite
-		{2770,5,0.5}}, -- Copper Ore
-	[818] = { -- Tigerseye
-		{2770,5,0.5}}, -- Copper Ore
-	[1210] = { -- Shadowgem
-		{2771,5,0.38}, -- Tin Ore
-		{2770,5,0.1}}, -- Copper Ore
-	[1705] = { -- Lesser Moonstone
-		{2771,5,0.38}, -- Tin Ore
-		{2772,5,0.35}}, -- Iron Ore
-	[1206] = { -- Moss Agate
-		{2771,5,0.37}}, -- Tin Ore
-	[1529] = { -- Jade
-		{2772,5,0.35}, -- Iron Ore
-		{2771,5,0.03}}, -- Tin Ore
-	[7909] = { -- Aquamarine
-		{3858,5,0.35}, -- Mithril Ore
-		{2772,5,0.05}, -- Iron Ore
-		{2771,5,0.03}}, -- Tin Ore
-	[3864] = { -- Citrine
-		{2772,5,0.36}, -- Iron Ore
-		{3858,5,0.35}, -- Mithril Ore
-		{2771,5,0.03}}, -- Tin Ore
-	[7910] = { -- Star Ruby
-		{3858,5,0.36}, -- Mithril Ore
-		{10620,5,0.15}, -- Thorium Ore
-		{2772,5,0.05}}, -- Iron Ore
-	[12799] = { -- Large Opal
-		{10620,5,0.31}, -- Thorium Ore
-		{3858,5,0.03}}, -- Mithril Ore
-	[12361] = { -- Blue Sapphire
-		{10620,5,0.31}, -- Thorium Ore
-		{3858,5,0.02}}, -- Mithril Ore
-	[12800] = { -- Azerothian Diamond
-		{10620,5,0.31}, -- Thorium Ore
-		{3858,5,0.02}}, -- Mithril Ore
-	[12364] = { -- Huge Emerald
-		{10620,5,0.31}, -- Thorium Ore
-		{3858,5,0.02}}, -- Mithril Ore
-	[23112] = { -- Golden Draenite
-		{23424,5,0.19}, -- Fel Iron Ore
-		{23425,5,0.18}}, -- Adamantite Ore
-	-- To be continued...
-}
-
--- "Tradeskill" data
-local ProspectID = 31252
-local ProspectName = GetSpellInfo(ProspectID)
-local macroProspect = "/cast "..ProspectName.."\n/use %s"
-local ProspectLink = GetSpellLink(ProspectID)
-
--- Add "Tradeskill" data to each "recipe"
-for itemID,t in pairs(A.ProspectingData) do
-	for i,v in ipairs(t) do
-		v.macro = macroProspect
-		v.spellID = ProspectID
-		v.spellName = ProspectName
-		v.spellLink = ProspectLink
-	end
-end
+local addonName, A = ...
+
+-- Thanks to Enchantrix for the data
+
+local COPPER_ORE = 2770
+local TIN_ORE = 2771
+local IRON_ORE = 2772
+local MITHRIL_ORE = 3858
+local THORIUM_ORE = 10620
+local FEL_IRON_ORE = 23424
+local ADAMANTITE_ORE = 23425
+local COBALT_ORE = 36909
+local SARONITE_ORE = 36912
+local TITANIUM_ORE = 36910
+local OBSIDIUM_ORE = 53038
+local ELEMENTIUM_ORE = 52185
+local PYRITE_ORE = 52183
+
+local ADAMANTITEPOWDER = 24243
+local TITANIUMPOWDER = 46849
+local VOLATILE_EARTH = 52327
+
+local TIGERSEYE = 818
+local MALACHITE = 774
+local SHADOWGEM = 1210
+local LESSERMOONSTONE = 1705
+local MOSSAGATE = 1206
+local CITRINE = 3864
+local JADE = 1529
+local AQUAMARINE = 7909
+local STARRUBY = 7910
+local AZEROTHIANDIAMOND = 12800
+local BLUESAPPHIRE = 12361
+local LARGEOPAL = 12799
+local HUGEEMERALD = 12364
+local BLOODGARNET = 23077
+local FLAMESPESSARITE = 21929
+local GOLDENDRAENITE = 23112
+local DEEPPERIDOT = 23079
+local AZUREMOONSTONE = 23117
+local SHADOWDRAENITE = 23107
+local LIVINGRUBY = 23436
+local NOBLETOPAZ = 23439
+local DAWNSTONE = 23440
+local TALASITE = 23437
+local STAROFELUNE = 23438
+local NIGHTSEYE = 23441
+
+-- new for WOTLK
+local CHALCEDONY = 36923
+local SHADOWCRYSTAL = 36926
+local TWILIGHTOPAL = 36927
+local HUGECITRINE = 36929
+local BLOODSTONE = 36917
+local SUNCRYSTAL = 36920
+local DARKJADE = 36932
+local FORESTEMERALD = 36933
+local SCARLETRUBY = 36918
+local MONARCHTOPAZ = 36930
+local SKYSAPPHIRE = 36924
+local AUTMNSGLOW = 36921
+
+local MAJESTICZIRCON = 36925
+local AMETRINE = 36931
+local KINGSAMBER = 36922
+local DREADSTONE = 36928
+local CARDINALRUBY = 36919
+local EYEOFZUL = 36934
+
+-- new for Cataclysm
+local CARNELIAN = 52177
+local ZEPHYRITE = 52178
+local ALICITE = 52179
+local NIGHTSTONE = 52180
+local HESSONITE = 52181
+local JASPER = 52182
+
+local INFERNORUBY = 52190
+local OCEANSAPPHIRE = 52191
+local DREAMEMERALD = 52192
+local EMBERTOPAZ = 52193
+local DEMONSEYE = 52194
+local AMBERJEWEL = 52195
+
+-- "Recipe" data
+-- [itemID] = {
+--     {reagentID, numberNeeded}
+--     {reagentID, numberNeeded, minProduced, maxProduced}
+--     {reagentID, numberNeeded, chanceToHaveOne}}
+A.ProspectingData = {
+	-- Vanilla
+	[MALACHITE] = {
+		{COPPER_ORE,5,0.5}},
+	[TIGERSEYE] = {
+		{COPPER_ORE,5,0.5}},
+	[SHADOWGEM] = {
+		{TIN_ORE,5,0.375},
+		{COPPER_ORE,5,0.1}},
+	[LESSERMOONSTONE] = {
+		{TIN_ORE,5,0.375},
+		{IRON_ORE,5,0.375}},
+	[MOSSAGATE] = {
+		{TIN_ORE,5,0.375}},
+	[JADE] = {
+		{IRON_ORE,5,0.375},
+		{TIN_ORE,5,0.04}},
+	[AQUAMARINE] = {
+		{MITHRIL_ORE,5,0.375},
+		{IRON_ORE,5,0.05},
+		{TIN_ORE,5,0.04}},
+	[CITRINE] = {
+		{MITHRIL_ORE,5,0.375},
+		{IRON_ORE,5,0.375},
+		{TIN_ORE,5,0.04}},
+	[STARRUBY] = {
+		{MITHRIL_ORE,5,0.375},
+		{THORIUM_ORE,5,0.15},
+		{IRON_ORE,5,0.05}},
+	[LARGEOPAL] = {
+		{THORIUM_ORE,5,0.3},
+		{MITHRIL_ORE,5,0.03}},
+	[BLUESAPPHIRE] = {
+		{THORIUM_ORE,5,0.3},
+		{MITHRIL_ORE,5,0.03}},
+	[AZEROTHIANDIAMOND] = {
+		{THORIUM_ORE,5,0.30},
+		{MITHRIL_ORE,5,0.03}},
+	[HUGEEMERALD] = {
+		{THORIUM_ORE,5,0.3},
+		{MITHRIL_ORE,5,0.03}},
+
+	-- BC
+	[BLOODGARNET] = {
+		{FEL_IRON_ORE,5,0.19},
+		{ADAMANTITE_ORE,5,0.19}},
+	[FLAMESPESSARITE] = {
+		{FEL_IRON_ORE,5,0.19},
+		{ADAMANTITE_ORE,5,0.19}},
+	[GOLDENDRAENITE] = {
+		{FEL_IRON_ORE,5,0.19},
+		{ADAMANTITE_ORE,5,0.19}},
+	[DEEPPERIDOT] = {
+		{FEL_IRON_ORE,5,0.19},
+		{ADAMANTITE_ORE,5,0.19}},
+	[AZUREMOONSTONE] = {
+		{FEL_IRON_ORE,5,0.19},
+		{ADAMANTITE_ORE,5,0.19}},
+	[SHADOWDRAENITE] = {
+		{FEL_IRON_ORE,5,0.19},
+		{ADAMANTITE_ORE,5,0.19}},
+
+	[LIVINGRUBY] = {
+		{ADAMANTITE_ORE,5,0.03},
+		{FEL_IRON_ORE,5,0.011}},
+	[NOBLETOPAZ] = {
+		{ADAMANTITE_ORE,5,0.03},
+		{FEL_IRON_ORE,5,0.011}},
+	[DAWNSTONE] = {
+		{ADAMANTITE_ORE,5,0.03},
+		{FEL_IRON_ORE,5,0.011}},
+	[TALASITE] = {
+		{ADAMANTITE_ORE,5,0.03},
+		{FEL_IRON_ORE,5,0.011}},
+	[STAROFELUNE] = {
+		{ADAMANTITE_ORE,5,0.03},
+		{FEL_IRON_ORE,5,0.011}},
+	[NIGHTSEYE] = {
+		{ADAMANTITE_ORE,5,0.03},
+		{FEL_IRON_ORE,5,0.011}},
+
+	[ADAMANTITEPOWDER] = {
+		{ADAMANTITE_ORE,5,1}},
+
+	-- WotLK
+	[CHALCEDONY] = {
+		{COBALT_ORE,5,0.25},
+		{TITANIUM_ORE,5,0.25},
+		{SARONITE_ORE,5,0.2}},
+	[HUGECITRINE] = {
+		{COBALT_ORE,5,0.25},
+		{TITANIUM_ORE,5,0.25},
+		{SARONITE_ORE,5,0.2}},
+	[BLOODSTONE] = {
+		{COBALT_ORE,5,0.25},
+		{TITANIUM_ORE,5,0.25},
+		{SARONITE_ORE,5,0.2}},
+	[SHADOWCRYSTAL] = {
+		{COBALT_ORE,5,0.25},
+		{TITANIUM_ORE,5,0.25},
+		{SARONITE_ORE,5,0.2}},
+	[SUNCRYSTAL] = {
+		{COBALT_ORE,5,0.25},
+		{TITANIUM_ORE,5,0.25},
+		{SARONITE_ORE,5,0.2}},
+	[DARKJADE] = {
+		{COBALT_ORE,5,0.25},
+		{TITANIUM_ORE,5,0.25},
+		{SARONITE_ORE,5,0.2}},
+
+	[TWILIGHTOPAL] = {
+		{TITANIUM_ORE,5,0.04},
+		{SARONITE_ORE,5,0.04},
+		{COBALT_ORE,5,0.013}},
+	[FORESTEMERALD] = {
+		{TITANIUM_ORE,5,0.04},
+		{SARONITE_ORE,5,0.04},
+		{COBALT_ORE,5,0.013}},
+	[SCARLETRUBY] = {
+		{TITANIUM_ORE,5,0.04},
+		{SARONITE_ORE,5,0.04},
+		{COBALT_ORE,5,0.013}},
+	[MONARCHTOPAZ] = {
+		{TITANIUM_ORE,5,0.04},
+		{SARONITE_ORE,5,0.04},
+		{COBALT_ORE,5,0.013}},
+	[SKYSAPPHIRE] = {
+		{TITANIUM_ORE,5,0.04},
+		{SARONITE_ORE,5,0.04},
+		{COBALT_ORE,5,0.013}},
+	[AUTMNSGLOW] = {
+		{TITANIUM_ORE,5,0.04},
+		{SARONITE_ORE,5,0.04},
+		{COBALT_ORE,5,0.013}},
+
+	[MAJESTICZIRCON] = {
+		{TITANIUM_ORE,5,0.04}},
+	[AMETRINE] = {
+		{TITANIUM_ORE,5,0.04}},
+	[KINGSAMBER] = {
+		{TITANIUM_ORE,5,0.04}},
+	[DREADSTONE] = {
+		{TITANIUM_ORE,5,0.04}},
+	[CARDINALRUBY] = {
+		{TITANIUM_ORE,5,0.04}},
+	[EYEOFZUL] = {
+		{TITANIUM_ORE,5,0.04}},
+
+	-- Cata
+	[CARNELIAN] = {
+		{OBSIDIUM_ORE,5,0.25},
+		{ELEMENTIUM_ORE,5,0.18},
+		{PYRITE_ORE,5,0.17}},
+	[ZEPHYRITE] = {
+		{OBSIDIUM_ORE,5,0.25},
+		{ELEMENTIUM_ORE,5,0.18},
+		{PYRITE_ORE,5,0.17}},
+	[ALICITE] = {
+		{OBSIDIUM_ORE,5,0.25},
+		{ELEMENTIUM_ORE,5,0.18},
+		{PYRITE_ORE,5,0.17}},
+	[NIGHTSTONE] = {
+		{OBSIDIUM_ORE,5,0.25},
+		{ELEMENTIUM_ORE,5,0.18},
+		{PYRITE_ORE,5,0.17}},
+	[HESSONITE] = {
+		{OBSIDIUM_ORE,5,0.25},
+		{ELEMENTIUM_ORE,5,0.18},
+		{PYRITE_ORE,5,0.17}},
+	[JASPER] = {
+		{OBSIDIUM_ORE,5,0.25},
+		{ELEMENTIUM_ORE,5,0.18},
+		{PYRITE_ORE,5,0.17}},
+
+	[INFERNORUBY] = {
+		{PYRITE_ORE,5,0.07},
+		{ELEMENTIUM_ORE,5,0.04},
+		{OBSIDIUM_ORE,5,0.013}},
+	[OCEANSAPPHIRE] = {
+		{PYRITE_ORE,5,0.07},
+		{ELEMENTIUM_ORE,5,0.04},
+		{OBSIDIUM_ORE,5,0.013}},
+	[DREAMEMERALD] = {
+		{PYRITE_ORE,5,0.07},
+		{ELEMENTIUM_ORE,5,0.04},
+		{OBSIDIUM_ORE,5,0.013}},
+	[EMBERTOPAZ] = {
+		{PYRITE_ORE,5,0.07},
+		{ELEMENTIUM_ORE,5,0.04},
+		{OBSIDIUM_ORE,5,0.013}},
+	[DEMONSEYE] = {
+		{PYRITE_ORE,5,0.07},
+		{ELEMENTIUM_ORE,5,0.04},
+		{OBSIDIUM_ORE,5,0.013}},
+	[AMBERJEWEL] = {
+		{PYRITE_ORE,5,0.07},
+		{ELEMENTIUM_ORE,5,0.04},
+		{OBSIDIUM_ORE,5,0.013}},
+
+	[VOLATILE_EARTH] = {
+		{PYRITE_ORE,5,2}},
+}
+
+-- "Tradeskill" data
+local ProspectID = 31252
+local ProspectName = GetSpellInfo(ProspectID)
+local macroProspect = "/cast "..ProspectName.."\n/use %s"
+local ProspectLink = GetSpellLink(ProspectID)
+
+-- Add "Tradeskill" data to each "recipe"
+for itemID,t in pairs(A.ProspectingData) do
+	for i,v in ipairs(t) do
+		v.macro = macroProspect
+		v.spellID = ProspectID
+		v.spellLink = ProspectLink
+	end
+end
--- a/ReagentMaker.lua	Tue May 17 18:35:24 2011 +0200
+++ b/ReagentMaker.lua	Thu May 19 20:25:41 2011 +0200
@@ -128,14 +128,14 @@
 
 	-- If only one recipe is known for the reagent, use it
 	if #(A.data[reagentID]) == 1 and not A.data[reagentID][1].macro then
-		if A.data[reagentID][1].spellName ~= GetTradeSkillLine() then
+		if A.data[reagentID][1].spellName and A.data[reagentID][1].spellName ~= GetTradeSkillLine() then
 			A.Error(A.L["The recipe to make this reagent is in another tradeskill. Currently ReagentMaker can not manage such a case, sorry."])
 			return
 		end
-	
+
 		local numMakable, reagentIndex = A.numMakable(reagentID)
 
-		-- Try to show the recipe once if it was not found
+		-- Try to show the recipe by removing filters once if it was not found
 		if not reagentIndex then
 			A.SaveActiveFilters(A.data[reagentID][1].header)
 			numMakable, reagentIndex = A.numMakable(reagentID)
@@ -152,7 +152,7 @@
 
 		-- If we can make the item needed to make the reagent, open a window to make it
 		-- one step recursion, enables to mill to create an ink
-		if (not A.data[reagentID][1].manyReagents) and A.data[A.data[reagentID][1][1]] then
+		if A.data[reagentID][1][1] and A.data[A.data[reagentID][1][1]] then
 			if A.externalCraftWindow(A.data[reagentID][1][1],reagentID) ~= false then
 				return
 			end
--- a/ReagentMaker.toc	Tue May 17 18:35:24 2011 +0200
+++ b/ReagentMaker.toc	Thu May 19 20:25:41 2011 +0200
@@ -6,6 +6,7 @@
 
 localization.lua
 
+CommonData.lua
 ProspectingData.lua
 MillingData.lua
 
--- a/SecureMenu.lua	Tue May 17 18:35:24 2011 +0200
+++ b/SecureMenu.lua	Thu May 19 20:25:41 2011 +0200
@@ -264,13 +264,17 @@
 	btn.icon:SetTexture(texture)
 
 	-- Set chance to have the item or the number of items created
+	btn.resultNumber:Hide()
 	if reagent[3] then
 		if reagent[3]<1 then
 			btn.resultNumber:SetText((reagent[3]*100).."%")
+			btn.resultNumber:Show()
 		elseif reagent[4] and reagent[3]~=reagent[4] then
 			btn.resultNumber:SetText(math.min(reagent[3],reagent[4]).."-"..math.max(reagent[3],reagent[4]))
+			btn.resultNumber:Show()
 		elseif reagent[3]>1 then
 			btn.resultNumber:SetText(reagent[3])
+			btn.resultNumber:Show()
 		end
 	end
 
@@ -339,7 +343,7 @@
 			noSkipped = menuAddItem(reagent.macro,itemID,reagent) and noSkipped
 		else
 			-- Standard tradeskill spell
-			if reagent.spellName == A.currentTradeSkill then
+			if not reagent.spellName or reagent.spellName == A.currentTradeSkill then
 				existsValidEntries = true
 				noSkipped = menuAddItem(A.craft,itemID,reagent) and noSkipped
 			end
--- a/data.lua	Tue May 17 18:35:24 2011 +0200
+++ b/data.lua	Thu May 19 20:25:41 2011 +0200
@@ -3,7 +3,7 @@
 -- @todo: enchants, elementals, prospecting
 -- @todo improve scanning
 
-A.data = {}
+A.data = A.CommonData
 
 do
 	-- lua functions
@@ -70,11 +70,15 @@
 				-- item ID
 				local itemID = A.link2ID(GetTradeSkillItemLink(i))
 
-				-- reagent ID, valid only if there's only one reagent as we take only the first one
-				local reagentID = A.link2ID(GetTradeSkillReagentItemLink(i, 1))
+				local numReagents = GetTradeSkillNumReagents(i)
+				local reagentID, reagentCount
+				if numReagents==1 then
+					-- reagent ID
+					reagentID = A.link2ID(GetTradeSkillReagentItemLink(i, 1))
 
-				-- reagent number needed
-				local _, _, reagentCount, _ = GetTradeSkillReagentInfo(i, 1)
+					-- reagent number needed
+					reagentCount = select(3,GetTradeSkillReagentInfo(i, 1))
+				end
 
 				-- number of reagent created by the recipe
 				local minMade, maxMade = GetTradeSkillNumMade(i)
@@ -83,7 +87,7 @@
 				local recipeLink = GetTradeSkillRecipeLink(i)
 
 				-- error checking
-				if itemID and reagentID and reagentCount and minMade and maxMade and recipeLink then
+				if itemID and (numReagents ~= 1 or (reagentID and reagentCount)) and minMade and maxMade and recipeLink then
 					-- remove unneeded minMade/maxMade
 					if maxMade==minMade then
 						maxMade = nil
@@ -111,7 +115,6 @@
 						spell.spellName = tradeskillName
 						spell.spellLink = recipeLink
 						spell.header = lastHeader
-						spell.manyReagents = GetTradeSkillNumReagents(i)>1
 						tinsert(A.data[itemID],spell)
 					end