Tooltip Item Count broken
NozE8 opened this issue · 20 comments
This comment is correct, reverting to the previous release fixes the issue. Bag brother has not been reset, it is not enabled in the latest release. Not sure of the issue, but none of it's features work, logging into all characters does nothing. Had to reinstall version 8.1.0 of bagnon for bag brother to work.
Can confirm, I am having the same issue. It is not showing the item count at all. Even for multiple stacks of items on one toon.
Just login on the characters again, BagBrother was reset
One of the first things I tried, and it did not make a difference. The invalid label is incorrect.
Open the file: Interface\AddOns\Bagnon\external\Wildpants\libs\LibItemCache-2.0\LibItemCache-2.0.lua
Find the FindRealms() function at Line 13 and replace it with this:
local FindRealms = function()
PLAYER, REALM = UnitFullName('player')
REALM = REALM or GetRealmName()
REALMS = GetAutoCompleteRealms() or {}
if #REALMS == 0 then
REALMS[1] = REALM
end
end
It's because GetAutoCompleteRealms() returns an empty table on a non-connected realm.
I added or {}
because I'm not sure if there's some rare case it could return nil.
@Jaliborc (yeah, this one got fixed before and was re-introduced in 8.1.1 ;) )
@Jaliborc please, check this out, item count still not working
@BobbyThompson what realm?
do you have just 1 character on the server you've logged into since a bagbrother reset?
if so try going to the bottom of this file:
Interface\AddOns\Bagnon\external\Wildpants\features\tooltipCounts.lua
and see
--[[ Startup ]]--
function TooltipCounts:OnEnable()
if Addon:MultipleOwnersFound() and Addon.sets.tipCount then
remove Addon:MultipleOwnersFound() and
i don't know if it's newly added or what but it appears that it will only show counts if more than 1 character is recorded in bagbrother for the realm, which seems counter-productive for checking your bank counts and even a quick check on the total of many stacks of items in your bags on a single toon
once i removed that my character for testing on Blade's Edge realm is working fine for item tooltips
(edit: linked wrong file name)
I am having this issue as well, logging out & in had no effect (nor did exiting & re-entering WoW all together).
Making the FindRealms mod detailed above to LibItemCache-2.0.lua also had no effect (I even logged out & back in after making the mod, which I specifically made while WoW was not running).
I'm currently moving to a different house. I'll be able to look at the issue the day after tomorrow.
Sorry about the delay.
I also found another issue in tooltipsCount.lua
where if you logged into a new character that BagBrother hasn't cached yet, you will get errors regarding ItemCount/ItemText tables not existing for owner.
I believe this is because function TooltipCounts:OnEnable()
is being triggered before the new character is recorded by LibItemCache-2.0, and so it doesn't exist during the first call of Cache:IterateOwners()
My fix was to remove the table creation and owner iteration from TooltipCounts:OnEnable() and just move it into the AddOwners function.
for owner in Cache:IterateOwners() do
if not ItemCount[owner] then
ItemCount[owner] = {}
ItemText[owner] = {}
end
local info = Cache:GetOwnerInfo(owner)
local color = Addon:GetOwnerColorString(info)
local count, countText = ItemCount[owner][itemID], ItemText[owner][itemID]
@NicholasWSmith does it work properly with https://adduono.com/addons/test/Bagnon_8.1.1_tooltip_test1.zip
(copy Bagnon from zip to AddOns folder and overwrite)
this just includes my changes as mentioned in this thread
after overwriting, you should only need to /reload your UI for it to start working again
@jcadduono Had this issue last night, the tooltip when hovering over an item will not show the number of items you have in your bag, or on alts.
@NicholasWSmith does it work properly with https://adduono.com/addons/test/Bagnon_8.1.1_tooltip_test1.zip
(copy Bagnon from zip to AddOns folder and overwrite)
this just includes my changes as mentioned in this thread
after overwriting, you should only need to /reload your UI for it to start working again
Just updated to bagnon 8.1.1 and installed your patch, this has corrected the issue. The tooltips are correctly showing item counts in bank and on alts, as well as gold being track across alts.
Great job finding the issue, Jcadduano.
@Jaliborc, good luck with the move, great addon btw.
@jcadduono 's version solved it for me! 🙇
Open the file:
Interface\AddOns\Bagnon\external\Wildpants\libs\LibItemCache-2.0\LibItemCache-2.0.lua
Find the FindRealms() function at Line 13 and replace it with this:
local FindRealms = function() PLAYER, REALM = UnitFullName('player') REALM = REALM or GetRealmName() REALMS = GetAutoCompleteRealms() or {} if #REALMS == 0 then REALMS[1] = REALM end endIt's because GetAutoCompleteRealms() returns an empty table on a non-connected realm.
I addedor {}
because I'm not sure if there's some rare case it could return nil.
That was indeed the issue.
do you have just 1 character on the server you've logged into since a bagbrother reset?
if so try going to the bottom of this file:
Interface\AddOns\Bagnon\external\Wildpants\features\tooltipCounts.lua
and see--[[ Startup ]]-- function TooltipCounts:OnEnable() if Addon:MultipleOwnersFound() and Addon.sets.tipCount thenremove
Addon:MultipleOwnersFound() and
i don't know if it's newly added or what but it appears that it will only show counts if more than 1 character is recorded in bagbrother for the realm, which seems counter-productive for checking your bank counts and even a quick check on the total of many stacks of items in your bags on a single toon
once i removed that my character for testing on Blade's Edge realm is working fine for item tooltips
(edit: linked wrong file name)
Fair enough. It has always been there, but I'll remove it.
@Jaliborc just updated to 8.1.2, still not working, though @jcadduono 's version works fine