comparison ReagentMaker.lua @ 15:cc56799582f2

Use local references to global functions to speed up scanning
author contrebasse
date Wed, 06 Apr 2011 00:28:13 +0200
parents 5eb02d3e1647
children 5336b3a19d4f
comparison
equal deleted inserted replaced
14:5c8fcfdd1e24 15:cc56799582f2
203 end 203 end
204 btn.label:Show() 204 btn.label:Show()
205 end 205 end
206 206
207 -- Tooltips 207 -- Tooltips
208 A.tooltipRecipe:SetOwner(btn) 208 local reagentIndex = A.findSkillIndex(reagentID)
209 if A.data[reagentID].spell then 209 if reagentIndex then
210 A.tooltipRecipe:SetHyperlink(GetSpellLink(A.data[reagentID].spellID)) 210 A.tooltipRecipe:SetOwner(btn)
211 else 211 if A.data[reagentID].spell then
212 A.tooltipRecipe:SetHyperlink(GetTradeSkillRecipeLink(A.findSkillIndex(reagentID))) 212 A.tooltipRecipe:SetHyperlink(GetSpellLink(A.data[reagentID].spellID))
213 else
214 A.tooltipRecipe:SetHyperlink(GetTradeSkillRecipeLink(reagentIndex))
215 end
216 A.tooltipRecipe:Show()
217 A.tooltipRecipe:ClearAllPoints()
218 --A.tooltipRecipe:SetPoint("TOPLEFT",btn,"TOPRIGHT")
219 A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT")
220
221 --[[
222 if #(A.data[reagentID]) == 1 then
223 A.tooltipReagent:SetOwner(A.tooltipRecipe)
224 local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(A.data[reagentID][1][1])
225 A.tooltipReagent:SetHyperlink(link)
226 A.tooltipReagent:Show()
227 A.tooltipReagent:ClearAllPoints()
228 A.tooltipReagent:SetPoint("BOTTOMLEFT",A.tooltipRecipe,"BOTTOMRIGHT")
229 end
230 --]]
213 end 231 end
214 A.tooltipRecipe:Show()
215 A.tooltipRecipe:ClearAllPoints()
216 --A.tooltipRecipe:SetPoint("TOPLEFT",btn,"TOPRIGHT")
217 A.tooltipRecipe:SetPoint("BOTTOMLEFT",GameTooltip,"BOTTOMRIGHT")
218
219 --[[
220 if #(A.data[reagentID]) == 1 then
221 A.tooltipReagent:SetOwner(A.tooltipRecipe)
222 local name, link, quality, iLevel, reqLevel, class, subclass, maxStack, equipSlot, texture, vendorPrice = GetItemInfo(A.data[reagentID][1][1])
223 A.tooltipReagent:SetHyperlink(link)
224 A.tooltipReagent:Show()
225 A.tooltipReagent:ClearAllPoints()
226 A.tooltipReagent:SetPoint("BOTTOMLEFT",A.tooltipRecipe,"BOTTOMRIGHT")
227 end
228 --]]
229 end 232 end
230 233
231 function A.btnLeft(btn) 234 function A.btnLeft(btn)
232 btn.textureHighlight:Hide() 235 btn.textureHighlight:Hide()
233 btn.label:Hide() 236 btn.label:Hide()