From bd59b6f4422df881ffdf96ce1ecb26e479bc4436 Mon Sep 17 00:00:00 2001 From: pschifferer Date: Sun, 25 Jan 2009 22:07:38 +0000 Subject: [PATCH] Added a mapping step for skills like mining where the sub-skill is called by a different name. A possible fix for the "empty" items in the queue. --- CauldronTradeskill.lua | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/CauldronTradeskill.lua b/CauldronTradeskill.lua index d5debb5..b8404e8 100644 --- a/CauldronTradeskill.lua +++ b/CauldronTradeskill.lua @@ -460,9 +460,21 @@ function Cauldron:GetReagentsForSkill(skillInfo) local reagents = {}; local itemId = self:GetIdFromLink(skillInfo.itemLink); - + + -- check the standard skill local reagentStr = self.libs.PT:ItemInSet(itemId, "TradeskillResultMats.Forward."..skillInfo.tradeskill); if not reagentStr then + -- lookup the mapped skill + local skillMap = { + ['Mining'] = 'Smelting', +-- ['Inscription'] = 'Milling', +-- ['Jewelcrafting'] = 'Prospecting', + }; + if skillMap[skillInfo.tradeskill] then + reagentStr = self.libs.PT:ItemInSet(itemId, "TradeskillResultMats.Forward."..skillMap[skillInfo.tradeskill]); + end + end + if not reagentStr then self:error("No reagents found for skill: "..skillInfo.name); return {}; end -- 1.7.9.5