Mercurial > wow > reagentmaker
diff ReagentMaker.lua @ 6:43e21c6513e0
Manage the tooltips in the case of a spell instead of a tradeskill (milling, prospecting...)
author | contrebasse |
---|---|
date | Sat, 02 Apr 2011 21:43:25 +0200 |
parents | cea9633a6d4e |
children | 28d5f1fbd33f |
line wrap: on
line diff
--- 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)