Mercurial > wow > reagentmaker
diff data.lua @ 30:fd76c8951b7d
Save the spell link to be able to display the tooltip even when the recipe is hidden
author | contrebasse |
---|---|
date | Thu, 28 Apr 2011 20:31:25 +0200 |
parents | 886be292feec |
children | 22fa64c9b2de |
line wrap: on
line diff
--- a/data.lua Thu Apr 28 19:46:52 2011 +0200 +++ b/data.lua Thu Apr 28 20:31:25 2011 +0200 @@ -279,10 +279,13 @@ -- number of reagent created by the recipe local minMade, maxMade = GetTradeSkillNumMade(i) + + -- recipe link (for tooltips) + local recipeLink = GetTradeSkillRecipeLink(i) -- error checking - if not reagentID or not reagentCount or not skillName or not itemID or not minMade or not maxMade then - print("Erreur de scan :",itemID,skillName,reagentID,reagentCount,minMade,maxMade) + if not reagentID or not reagentCount or not skillName or not itemID or not minMade or not maxMade or not recipeLink then + print("Erreur de scan :",itemID,skillName,reagentID,reagentCount,minMade,maxMade,recipeLink) end -- if -- remove unneeded minMade/maxMade @@ -294,6 +297,7 @@ end -- if -- skillName or...??? + -- There's still a problem when multiple recipes craft the same item if not A.data[itemID] then A.data[itemID] = {} end -- if @@ -305,6 +309,7 @@ end -- if end -- for if newSpell then + A.data[itemID].spellLink = recipeLink tinsert(A.data[itemID],{reagentID,reagentCount,minMade,maxMade,spellName=skillName}) end -- if end -- if