fix: bank money hover error

This commit is contained in:
Vati
2026-04-08 11:54:16 +04:00
parent 50e1c89fa0
commit ecbfbd1272
4 changed files with 27 additions and 5 deletions
+17 -2
View File
@@ -394,9 +394,10 @@ end
-- Find an item ID and link by name in any character's data -- Find an item ID and link by name in any character's data
function DB:FindItemByName(name) function DB:FindItemByName(name)
if not name or name == "" or not Guda_DB or not Guda_DB.characters then return nil, nil end if not name or name == "" then return nil, nil end
for fullName, char in pairs(Guda_DB.characters) do local function searchChar(char)
if type(char) ~= "table" then return nil, nil end
-- Check bags -- Check bags
if char.bags then if char.bags then
for bagID, bagData in pairs(char.bags) do for bagID, bagData in pairs(char.bags) do
@@ -441,6 +442,20 @@ function DB:FindItemByName(name)
end end
end end
end end
return nil, nil
end
if Guda_DB and Guda_DB.characters then
for fullName, char in pairs(Guda_DB.characters) do
local id, link = searchChar(char)
if id then return id, link end
end
end
if addon.sharedCharacters then
for fullName, char in pairs(addon.sharedCharacters) do
local id, link = searchChar(char)
if id then return id, link end
end
end end
return nil, nil return nil, nil
end end
+7
View File
@@ -66,6 +66,13 @@ function SharedData:Initialize()
if myAccount then break end if myAccount then break end
end end
-- If we couldn't identify our own account (e.g. first login on this character,
-- before Guda_DB.characters has an entry for us), bail out rather than import
-- every character as "shared". The next login will detect correctly.
if myAccount == nil then
return
end
-- Import characters from other accounts into in-memory table -- Import characters from other accounts into in-memory table
local importCount = 0 local importCount = 0
for fullName, charData in pairs(Guda_SharedCharacters) do for fullName, charData in pairs(Guda_SharedCharacters) do
+1 -1
View File
@@ -2,7 +2,7 @@
## Title: Guda ## Title: Guda
## Notes: All-in-one bag and bank addon for World of Warcraft 1.12.1 (Turtle WoW) ## Notes: All-in-one bag and bank addon for World of Warcraft 1.12.1 (Turtle WoW)
## Author: Vati ## Author: Vati
## Version: 2.2.2 ## Version: 2.2.3
## SavedVariables: Guda_DB ## SavedVariables: Guda_DB
## SavedVariablesPerCharacter: Guda_CharDB ## SavedVariablesPerCharacter: Guda_CharDB
## OptionalDeps: pfUI ## OptionalDeps: pfUI
+1 -1
View File
@@ -1557,7 +1557,7 @@ function BankFrame:EnsureMoneyTooltipOverlay()
-- Set tooltip handlers on overlay -- Set tooltip handlers on overlay
overlay:SetScript("OnEnter", function() overlay:SetScript("OnEnter", function()
Guda_BankFrame_MoneyOnEnter(moneyFrame) Guda_MoneyTooltip_Show(moneyFrame)
end) end)
overlay:SetScript("OnLeave", function() overlay:SetScript("OnLeave", function()