# HG changeset patch # User contrebasse # Date 1301773405 -7200 # Node ID 43e21c6513e04b200fb9f19f88237d047d2a03de # Parent cea9633a6d4e99f8794805ec066ec0c84c046cf5 Manage the tooltips in the case of a spell instead of a tradeskill (milling, prospecting...) diff -r cea9633a6d4e -r 43e21c6513e0 ReagentMaker.lua --- a/ReagentMaker.lua Sat Apr 02 17:13:16 2011 +0200 +++ b/ReagentMaker.lua Sat Apr 02 21:43:25 2011 +0200 @@ -190,18 +190,24 @@ -- Tooltips A.tooltipRecipe:SetOwner(btn) - A.tooltipRecipe:SetHyperlink(GetTradeSkillRecipeLink(A.findSkillIndex(reagentID))) + if A.data[reagentID].spell then + A.tooltipRecipe:SetHyperlink(GetSpellLink(A.data[reagentID].spellID)) + else + A.tooltipRecipe:SetHyperlink(GetTradeSkillRecipeLink(A.findSkillIndex(reagentID))) + end A.tooltipRecipe:Show() A.tooltipRecipe:ClearAllPoints() --A.tooltipRecipe:SetPoint("TOPLEFT",btn,"TOPRIGHT") A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT") - A.tooltipReagent:SetOwner(A.tooltipRecipe) - local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(A.data[reagentID][1][1]) - A.tooltipReagent:SetHyperlink(link) - A.tooltipReagent:Show() - A.tooltipReagent:ClearAllPoints() - A.tooltipReagent:SetPoint("BOTTOMLEFT",A.tooltipRecipe,"BOTTOMRIGHT") + if #(A.data[reagentID]) == 1 then + A.tooltipReagent:SetOwner(A.tooltipRecipe) + local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(A.data[reagentID][1][1]) + A.tooltipReagent:SetHyperlink(link) + A.tooltipReagent:Show() + A.tooltipReagent:ClearAllPoints() + A.tooltipReagent:SetPoint("BOTTOMLEFT",A.tooltipRecipe,"BOTTOMRIGHT") + end end function A.btnLeft(btn)