Xruptor / BagSync

BagSync tracks your characters items and displays it within tooltips.
http://www.wowinterface.com/downloads/info15351-BagSync.html
Other
32 stars 21 forks source link

Items held in the Warband bank, when used for crafting, don't update until visiting the bank #381

Open Sluimerstand opened 9 hours ago

Sluimerstand commented 9 hours ago

This is what I was confused with regarding the other issue I made and then closed. Example:

image (This is taken from the regular tradeskill UI, not any crafting order window which does not currently include the Warbank.)

Xruptor commented 8 hours ago

I'd have to check, but what you are referring to is items being used while they are in the Warband bank and you are crafting? Something like that? Warband data isn't actually updated until you visit some sort of warband bank. Please let me know in detail what you mean and I'll try to replicate it. 😄

Sluimerstand commented 8 hours ago

That is what I mean, yes!

So the Echoing Flux for example - as you can see the last time BagSync checked the (War)bank, there were 33 in there. I did some crafting, using up the items in the Warbank, and the number has not updated yet. You are correct in saying this number only updates after visiting the bank, when doing that it works properly.

So I guess to put it in other words, the "bug" I am reporting (which at this point I suppose is more of a limitation) is that the number doesn't update until visiting the bank.

As mentioned in issue #380, C_Item.GetItemCount() has in my experience (since Dragonflight, at least) always returned the proper number of items owned, as it does for my addon (Profession Shopping List) anyway. So I would suggest looking into that as a way to keep these numbers updated. I think for my use cases I've always used BAG_UPDATE_DELAYED to trigger updating these numbers. Whether it's the actual bag contents changing, or crafting an item which would put a new item in there, signalling that items in the bank might have been used.

Xruptor commented 7 hours ago

Interesting enough it looks like they finally fixed GetItemCount(). It has been updated to reflect AccountBank it seems. I'll have to double check on that.

https://warcraft.wiki.gg/wiki/API_C_Item.GetItemCount

Oh and remember that BagSync needs to be compatible with Classic stuff and that's always a pain in the rear to get to balance out. Right now Tooltip stuff is always grabbed for the current Player actively and not by cache. I just need to extend that to the AccountBank if they finally fixed it.

Xruptor commented 7 hours ago

Oh and GetItemCount() wasn't always accurate. Even if you did False on Bank and True on Reagent, it would return the Bank and Reagent combined regardless. It was a known bug and you had to do some math to fix it using local bag count. In addition the Reagent count wasn't always properly returned when crafting. This was fixed sometime after the third patch of Dragonflight I think. It's been awhile but I do recall that being an issue.

Xruptor commented 7 hours ago

Regardless :) I'm committed to getting this working for you! Time to slap BagSync's warband code!

Sluimerstand commented 7 hours ago

Looking forward to it! I adore BagSync since it's just really good at doing what it does. ❤️