Fix tooltip on extra bags for bank
This commit is contained in:
+3
-3
@@ -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
|
||||
|
||||
+2
-5
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user