WoWInterface SVN zz_itemsdb

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 51 to Rev 50
    Reverse comparison

Rev 51 → Rev 50

zz_itemsdb/zz_itemsdb.lua
207,29 → 207,25
end
end
local function checkID(itemID)
--From idTip: http://www.wowinterface.com/downloads/info17033-idTip.html
print(itemID,type(itemID))
if(TradeSkillFrame ~= nil and TradeSkillFrame:IsVisible()) then
print("TradeSkillFrame")
if (GetMouseFocus():GetName()) == "TradeSkillSkillIcon" then
-- itemID = GetTradeSkillItemLink(TradeSkillFrame.selectedSkill):match("item:(%d+):") or nil
print("tsicon")
itemId = GetTradeSkillItemLink(TradeSkillFrame.selectedSkill):match("item:(%d+):") or nil
else
local tab = GetMouseFocus()
local par2 = tab:GetParent()
local par = par2:GetParent()
local recipeID = par.selectedRecipeID
local tooltip = par2.tooltipFrame
for i = 1, C_TradeSkillUI.GetRecipeNumReagents(recipeID) do
if(tab.reagentIndex and i==tab.reagentIndex) then
local recipeItemLink = C_TradeSkillUI.GetRecipeReagentItemLink(recipeID, i)
itemID = addon['getItemId'](recipeItemLink)
break
end
print("hum")
for i = 1, 8 do
print(GetMouseFocus():GetName())
if (GetMouseFocus():GetName()) == "TradeSkillFrame.DetailsFrame.Contents.Reagent"..i then
itemID = GetTradeSkillReagentItemLink(TradeSkillFrame.selectedSkill, i):match("item:(%d+):") or nil
itemId = GetTradeSkillReagentItemLink(TradeSkillFrame.selectedSkill, i):match("item:(%d+):") or nil
break
end
end
end
end
return tonumber(itemID),tooltip
return tonumber(itemID)
end
local function GameTooltip_OnTooltipSetItem(tooltip)
local _, link = tooltip:GetItem()
238,11 → 234,10
end
local id = addon['getItemId'](link)
if(not id) then
local tip
id,tip = checkID(id)
if(id and tip) then
tooltip = tip
end
local spellId = strmatch(link, "enchant:(%d+)")
local spell = GetSpellInfo(spellId)
print(spellId,spell)
id = checkID(id)
end
if(id)then
tooltip:AddLine()