WoWInterface SVN Exonumist

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 34 to Rev 35
    Reverse comparison

Rev 34 → Rev 35

Exonumist.lua
160,54 → 160,71
AddTooltipInfo(tooltip, nameToID[name], not TokenFrame:IsMouseOver())
end)
 
hooksecurefunc(GameTooltip, "SetQuestCurrency", function(tooltip, type, id)
local name = GetQuestCurrencyInfo(type, id)
--print("SetQuestCurrency", type, id, name)
if name then
AddTooltipInfo(tooltip, nameToID[name], true)
hooksecurefunc(GameTooltip, "SetHyperlink", function(tooltip, link)
--print("SetHyperlink", link)
local id = strmatch(link, "currency:(%d+)")
if id then
AddTooltipInfo(tooltip, tonumber(id), true)
end
end)
hooksecurefunc(GameTooltip, "SetQuestLogCurrency", function(tooltip, type, id)
--print("SetQuestLogCurrency", type, id)
local name = GetQuestLogRewardCurrencyInfo(id)
if name then
AddTooltipInfo(tooltip, nameToID[name], true)
 
hooksecurefunc(ItemRefTooltip, "SetHyperlink", function(tooltip, link)
--print("SetHyperlink", link)
local id = strmatch(link, "currency:(%d+)")
if id then
AddTooltipInfo(tooltip, tonumber(id), true)
end
end)
 
----------------------
-- Merchant costs
----------------------
 
hooksecurefunc(GameTooltip, "SetMerchantCostItem", function(tooltip, item, currency)
--print("SetMerchantCostItem", item, currency)
local icon, _, _, name = GetMerchantItemCostItem(item, currency)
AddTooltipInfo(tooltip, nameToID[name], true)
end)
 
------------------------------
-- Dungeon finder rewards
------------------------------
 
hooksecurefunc(GameTooltip, "SetLFGDungeonReward", function(tooltip, dungeonID, rewardIndex)
--print("SetLFGDungeonReward", dungeonID, rewardIndex)
local name = GetLFGDungeonRewardInfo(dungeonID, rewardIndex)
if name then
AddTooltipInfo(tooltip, nameToID[name], true)
end
end)
hooksecurefunc(GameTooltip, "SetLFGDungeonReward", function(tooltip, dungeonID, shortageIndex, rewardIndex)
 
hooksecurefunc(GameTooltip, "SetLFGDungeonShortageReward", function(tooltip, dungeonID, shortageIndex, rewardIndex)
--print("SetLFGDungeonShortageReward", dungeonID, shortageIndex, rewardIndex)
local name = GetLFGDungeonShortageRewardInfo(dungeonID, shortageIndex, rewardIndex)
if name then
AddTooltipInfo(tooltip, nameToID[name], true)
end
end)
 
hooksecurefunc(GameTooltip, "SetHyperlink", function(tooltip, link)
--print("SetHyperlink", link)
local id = strmatch(link, "currency:(%d+)")
if id then
AddTooltipInfo(tooltip, tonumber(id), true)
---------------------
-- Quest rewards
---------------------
 
hooksecurefunc(GameTooltip, "SetQuestCurrency", function(tooltip, type, id)
local name = GetQuestCurrencyInfo(type, id)
--print("SetQuestCurrency", type, id, name)
if name then
AddTooltipInfo(tooltip, nameToID[name], true)
end
end)
hooksecurefunc(ItemRefTooltip, "SetHyperlink", function(tooltip, link)
--print("SetHyperlink", link)
local id = strmatch(link, "currency:(%d+)")
if id then
AddTooltipInfo(tooltip, tonumber(id), true)
 
hooksecurefunc(GameTooltip, "SetQuestLogCurrency", function(tooltip, type, id)
--print("SetQuestLogCurrency", type, id)
local name = GetQuestLogRewardCurrencyInfo(id)
if name then
AddTooltipInfo(tooltip, nameToID[name], true)
end
end)
 
hooksecurefunc(GameTooltip, "SetMerchantCostItem", function(tooltip, item, currency)
--print("SetMerchantCostItem", item, currency)
local icon, _, _, name = GetMerchantItemCostItem(item, currency)
AddTooltipInfo(tooltip, nameToID[name], true)
end)
elseif event == "PLAYER_LOGOUT" then
UpdateData()
end