fix: harden charge cache and quest bar snapshot path

This commit is contained in:
Dusk-92
2026-09-06 10:20:15 +02:00
parent 27eebd814e
commit e15eed943d
3 changed files with 60 additions and 17 deletions
+7
View File
@@ -1784,6 +1784,13 @@ function Guda_ItemButton_UpdateCharges(button)
local chargesText = getglobal(button:GetName().."_Charges")
if not chargesText then return end
-- Saved banks / other-character views have no live item instance
-- behind the displayed slot. Never read the current player slot.
if button.isReadOnly or button.otherChar then
chargesText:Hide()
return
end
local charges = nil
if button.hasItem and button.itemData and addon.Modules.ItemDetection then
charges = addon.Modules.ItemDetection:GetCharges(button.itemData, button.bagID, button.slotID)