WoWInterface SVN zz_itemsdb

Compare Revisions

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

Rev 50 → Rev 51

zz_itemsdb/zz_itemsdb.lua
207,25 → 207,29
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
print("tsicon")
itemId = GetTradeSkillItemLink(TradeSkillFrame.selectedSkill):match("item:(%d+):") or nil
-- itemID = GetTradeSkillItemLink(TradeSkillFrame.selectedSkill):match("item:(%d+):") or nil
else
print("hum")
for i = 1, 8 do
print(GetMouseFocus():GetName())
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
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)
return tonumber(itemID),tooltip
end
local function GameTooltip_OnTooltipSetItem(tooltip)
local _, link = tooltip:GetItem()
234,10 → 238,11
end
local id = addon['getItemId'](link)
if(not id) then
local spellId = strmatch(link, "enchant:(%d+)")
local spell = GetSpellInfo(spellId)
print(spellId,spell)
id = checkID(id)
local tip
id,tip = checkID(id)
if(id and tip) then
tooltip = tip
end
end
if(id)then
tooltip:AddLine()