Commit 86ff4da1 authored by Robin Schoonover's avatar Robin Schoonover

Show currency ID for LFG reward tooltips.

parent 601c8c4a
......@@ -90,16 +90,30 @@ addon:HookTip("SetHyperlink", function(self, link)
addon:AddIDLine(self, name:gsub("^%l", string.upper), id)
end)
addon:HookTip("SetLFGCompletionReward", function(self)
-- TODO item is handled, currency is not
addon:HookTip("SetLFGCompletionReward", function(tip, rewardID)
local name, icon = GetLFGCompletionReward(rewardID)
local link = addon.currencyCache[name][icon]
if link then
local _, _, name, id = strfind(link, "|H(%w+):(%d+)")
addon:AddIDLine(tip, name:gsub("^%l", string.upper), id)
end
end)
addon:HookTip("SetLFGDungeonReward", function(self)
-- TODO item is handled, currency is not
addon:HookTip("SetLFGDungeonReward", function(tip, dungeonID, rewardID)
local name, icon = GetLFGDungeonRewardInfo(dungeonID, rewardID)
local link = addon.currencyCache[name][icon]
if link then
local _, _, name, id = strfind(link, "|H(%w+):(%d+)")
addon:AddIDLine(tip, name:gsub("^%l", string.upper), id)
end
end)
addon:HookTip("SetLootCurrency", function(self, slot)
-- TODO don't know how to get currency info
local link = GetLootSlotLink(slot)
if link then
local _, _, name, id = strfind(link, "|H(%w+):(%d+)")
addon:AddIDLine(tip, name:gsub("^%l", string.upper), id)
end
end)
addon:HookTip("SetMerchantCostItem", function(self, idx, currency)
......
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