/
local realmDB, charDB |
local realm = GetRealmName() |
local faction = UnitFactionGroup("player") |
local player = UnitName("player") |
local playerList = {} |
local classColor = {} |
wipe(collapsed) |
end |
hooksecurefunc("BackpackTokenFrame_Update", UpdateData) |
hooksecurefunc("TokenFrame_Update", UpdateData) |
------------------------------------------------------------------------ |
local function AddTooltipInfo(tooltip, currency, includePlayer) |
end |
end |
hooksecurefunc(GameTooltip, "SetCurrencyByID", function(tooltip, id) |
--print("SetCurrencyByID", id) |
AddTooltipInfo(tooltip, id, not MerchantMoneyInset:IsMouseOver()) |
end) |
hooksecurefunc(GameTooltip, "SetCurrencyToken", function(tooltip, i) |
--print("SetCurrencyToken", i) |
local name, isHeader, isExpanded, isUnused, isWatched, count, icon = GetCurrencyListInfo(i) |
AddTooltipInfo(GameTooltip, nameToID[name], not TokenFrame:IsMouseOver()) |
end) |
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, "SetMerchantCostItem", function(tooltip, item, currency) |
--print("SetMerchantCostItem", item, currency) |
local icon, _, _, name = GetMerchantItemCostItem(item, currency) |
AddTooltipInfo(tooltip, nameToID[name], true) |
end) |
------------------------------------------------------------------------ |
local f = CreateFrame("Frame") |
if event == "ADDON_LOADED" then |
if addon ~= "Exonumist" then return end |
local realm = GetRealmName() |
local faction = UnitFactionGroup("player") |
local player = UnitName("player") |
if not ExonumistDB then ExonumistDB = { } end |
if not ExonumistDB[realm] then ExonumistDB[realm] = { } end |
if not ExonumistDB[realm][faction] then ExonumistDB[realm][faction] = { } end |
end |
end |
local now = time() |
realmDB = ExonumistDB[realm][faction] |
if not realmDB then return end -- probably low level Pandaren |
realmDB = ExonumistDB[realm][faction] |
charDB = realmDB[player] |
local now = time() |
charDB.class = select(2, UnitClass("player")) |
charDB.lastSeen = now |
end |
end) |
end |
self:UnregisterEvent("PLAYER_LOGIN") |
hooksecurefunc("BackpackTokenFrame_Update", UpdateData) |
hooksecurefunc("TokenFrame_Update", UpdateData) |
hooksecurefunc(GameTooltip, "SetCurrencyByID", function(tooltip, id) |
--print("SetCurrencyByID", id) |
AddTooltipInfo(tooltip, id, not MerchantMoneyInset:IsMouseOver()) |
end) |
hooksecurefunc(GameTooltip, "SetCurrencyToken", function(tooltip, i) |
--print("SetCurrencyToken", i) |
local name, isHeader, isExpanded, isUnused, isWatched, count, icon = GetCurrencyListInfo(i) |
AddTooltipInfo(GameTooltip, nameToID[name], not TokenFrame:IsMouseOver()) |
end) |
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, "SetMerchantCostItem", function(tooltip, item, currency) |
--print("SetMerchantCostItem", item, currency) |
local icon, _, _, name = GetMerchantItemCostItem(item, currency) |
AddTooltipInfo(tooltip, nameToID[name], true) |
end) |
end |
end) |