From 12ad30cf00ddbcfd4964489554d1ce5bce0e39ad Mon Sep 17 00:00:00 2001 From: Salikh Gurgenidze Date: Fri, 21 Nov 2025 23:35:02 +0400 Subject: [PATCH] Fix tooltip on extra bags for bank --- Core/Tooltip.lua | 6 +++--- UI/ItemButton.lua | 7 ++----- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Core/Tooltip.lua b/Core/Tooltip.lua index a0704d4..dacd4ec 100644 --- a/Core/Tooltip.lua +++ b/Core/Tooltip.lua @@ -320,12 +320,12 @@ function Tooltip:Initialize() end else -- Bank is closed or readonly mode - try to get cached link - if bag == -1 then + if bag == -1 or (bag >=5 and bag <=10) then -- Get cached link from database for main bank bag local playerName = addon.Modules.DB:GetPlayerFullName() local bankData = addon.Modules.DB:GetCharacterBank(playerName) - if bankData and bankData[-1] and bankData[-1].slots and bankData[-1].slots[slot] then - local itemData = bankData[-1].slots[slot] + if bankData and bankData[bag] and bankData[bag].slots and bankData[bag].slots[slot] then + local itemData = bankData[bag].slots[slot] if itemData.link and string.find(itemData.link, "|H") then -- Extract hyperlink from full colored string: |cFFFFFFFF|Hitem:...|h[Name]|h|r -- SetHyperlink needs just the item:... part diff --git a/UI/ItemButton.lua b/UI/ItemButton.lua index 0bbc51d..283470f 100644 --- a/UI/ItemButton.lua +++ b/UI/ItemButton.lua @@ -575,11 +575,8 @@ function Guda_ItemButton_OnEnter(self) -- For other characters or read-only mode, use cached item link if self.otherChar or self.isReadOnly then - if self.bagID == -1 then - GameTooltip:SetBagItem(self.bagID, self.slotID) - elseif self.itemData and self.itemData.link then - GameTooltip:SetHyperlink(self.itemData.link) - end + addon:Print('ATLAS_LOOT_ERROR') + GameTooltip:SetBagItem(self.bagID, self.slotID) -- Special handling for bank main bag when bank might be closed elseif self.isBank and self.bagID == -1 then local bankFrame = getglobal("BankFrame")