Commit bacdb64b authored by Robin Schoonover's avatar Robin Schoonover

Work around Item ID not getting set properly in trade skill window.

This appears to be a bug that was introduced in 6.2, and it seems likely the Toybox item
id not getting set properly might be related.
parent 46402281
Pipeline #218 passed with stages
......@@ -168,6 +168,7 @@ addon:HookTip("SetQuestLogItem", function(self, ...)
end
end)
-- 6.2 BUG?
addon:HookTip("SetToyByItemID", function(tip, itemid)
-- This won't cause the OnTooltipSetItem to be called, and the tooltip
-- won't actually be filled in during the same call either, so we need
......@@ -176,6 +177,25 @@ addon:HookTip("SetToyByItemID", function(tip, itemid)
tip._alltheid_id = itemid
end)
-- 6.2 BUG
addon:HookTip("SetTradeSkillItem", function(tip, itemIdx, reagentIdx)
local link
if reagentIdx ~= nil then
link = GetTradeSkillReagentItemLink(itemIdx, reagentIdx)
else
link = GetTradeSkillItemLink(itemIdx)
end
if link then
local _, _, name, id = strfind(link, "|H(%w+):(%d+)")
if id ~= "0" then
tip._alltheid_type = name
tip._alltheid_id = id
addon:AddIDLine(tip, "Item", id)
end
end
end)
addon:HookTip("SetUnitAura", function(self, unit, index, filter)
local _,_,_,_,_,_,_,_,_,_, spellID = UnitAura(unit, index, filter)
addon:AddIDLine(self, "Spell", spellID)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment