Added a mapping step for skills like mining where the sub-skill is called by a different name. A
pschifferer [01-25-09 - 22:07]
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.
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