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
+12 -6
View File
@@ -982,13 +982,19 @@ function Guda_ItemButton_OnEnter(self)
-- Mailbox tooltip handling
if self.isMail then
local currentPlayerName = addon.Modules.DB:GetPlayerFullName()
if (not self.otherChar or self.otherChar == currentPlayerName) and self.mailIndex then
-- Live mailbox for current character
local isMailboxOpen = addon.Modules.MailboxScanner and addon.Modules.MailboxScanner:IsMailboxOpen()
if (not self.otherChar or self.otherChar == currentPlayerName) and self.mailIndex and isMailboxOpen then
-- Live mailbox for current character (only when mailbox is actually open)
GameTooltip:SetInboxItem(self.mailIndex, self.mailItemIndex or 1)
elseif self.itemData and self.itemData.link then
-- Read-only / other character mailbox
GameTooltip.GudaViewedCharacter = self.otherChar
GameTooltip:SetHyperlink(self.itemData.link)
elseif self.itemData and (self.itemData.link or self.itemData.itemID) then
-- Read-only / other character mailbox OR current character mailbox when closed
GameTooltip.GudaViewedCharacter = self.otherChar or currentPlayerName
if self.itemData.link then
GameTooltip:SetHyperlink(self.itemData.link)
else
GameTooltip:SetHyperlink("item:" .. self.itemData.itemID .. ":0:0:0")
end
elseif self.itemData and self.itemData.name then
-- Money or generic mail
GameTooltip:AddLine(self.itemData.name, 1, 1, 1)