# HG changeset patch # User contrebasse # Date 1304015485 -7200 # Node ID fd76c8951b7d78467adeee28eba03e9da44772bd # Parent 15123d11fc641779aa08ee77769c226e7098d30a Save the spell link to be able to display the tooltip even when the recipe is hidden diff -r 15123d11fc64 -r fd76c8951b7d ReagentMaker.lua --- a/ReagentMaker.lua Thu Apr 28 19:46:52 2011 +0200 +++ b/ReagentMaker.lua Thu Apr 28 20:31:25 2011 +0200 @@ -204,13 +204,19 @@ -- Tooltips local link - if A.data[reagentID].spell then + if A.data[reagentID].spellLink then + link = A.data[reagentID].spellLink + elseif A.data[reagentID].spellID then link = GetSpellLink(A.data[reagentID].spellID) else + A.DEBUG("Recipe link not found for "..reagentID) + return + --[[ local reagentIndex = A.findSkillIndex(reagentID) if reagentIndex then link = GetTradeSkillRecipeLink(A.findSkillIndex(reagentID)) end + --]] end if link then diff -r 15123d11fc64 -r fd76c8951b7d data.lua --- 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