fix: poor tooltip for mailboxframe

This commit is contained in:
Salikh Gurgenidze
2025-12-27 22:59:42 +04:00
parent 0c2954d230
commit 6808a21479
4 changed files with 153 additions and 15 deletions
+6 -6
View File
@@ -101,10 +101,13 @@ scanTooltip:SetOwner(WorldFrame, "ANCHOR_NONE")
-- Get item link from mailbox attachment (WoW 1.12.1 workaround)
function Utils:GetInboxItemLink(index, itemIndex)
-- Try global function first (if it exists on this server/version)
if GetInboxItemLink then
local link = GetInboxItemLink(index)
if link then return link end
end
-- In 1.12.1, GameTooltip:GetHyperlink() does not exist.
-- Actually, in 1.12.1, there's no official API to get the link from a mailbox item
-- if GetInboxItemLink(index) is not available (it's often NOT available in Vanilla).
-- Let's try to use GetItemInfo(name) as the primary way.
local name = GetInboxItem(index, itemIndex)
if name then
@@ -114,9 +117,6 @@ function Utils:GetInboxItemLink(index, itemIndex)
end
end
-- Fallback: If we still don't have it, we might try to scan the tooltip for the name
-- but GetInboxItem already gave us the name.
return nil
end