Items held in the reagent bank, when spent at vendors, don't update until visiting the bank
Slackluster opened this issue ยท 4 comments
When spending Artisan's Acuity at the vendor for knowledge books for example, with the Acuity held in the reagent bank, the numbers owned don't update until visiting the bank. A fairly niche issue, I'm aware.
The event PLAYERREAGENTBANKSLOTS_CHANGED
fires when the item spent was in the Reagent Bank and returns the slot that was altered. When this event is fired while not at the bank, or perhaps after seeing MERCHANT_SHOW
fire until MERCHANT_HIDE
has fired, C_Item.GetItemCount()
could be used to update the numbers maybe?
Edit: here are the relevant events that fire when purchasing an item in this scenario:
Nevermind. Maybe I was running an old version, it seems to be working properly now. Apologies!
So in the past Blizzard didn't allow Addon authors to pull up to date info from the reagent bank even when using GetItemCount(). Though PLAYERREAGENTBANKSLOTS_CHANGED would fire, there was no real way to get an actual update unless a person visited a bank. They have slightly altered that for certain situations, but I would need to check to see if indeed they finally fixed that issue. It was bugged for AGES and only recently did they correct a few problems with GetItemCount() when they moved it to the C_Item class object.
I'll take a look regardless. JUST IN CASE lol...
Is that the case? That has not been my experience. I have an addon myself that uses C_Item.GetItemCount()
to check how many of the item a character has and it's always been accurate whenever I call that function, including items in the bags, bank, reagent bank, and warbank. ๐ค
But as said previously, this is working properly - I was confusing the numbers not updating as is the case for issue #381.
Is that the case? That has not been my experience. I have an addon myself that uses
C_Item.GetItemCount()
to check how many of the item a character has and it's always been accurate whenever I call that function, including items in the bags, bank, reagent bank, and warbank. ๐คBut as said previously, this is working properly - I was confusing the numbers not updating as is the case for issue #381.
It was a bug actually as they had combined the bank totals with the reagent totals when returned. They knew about it but never really fixed it. You had to do subtraction to get the real amounts and the reagent totals at times didn't always return true values. It was like this all the way up to Dragonflight until they fixed the issue with it. You couldn't initially pull without the counts being inaccurate, especially during crafting. Thankfully they resolved it and I fixed the issue in BagSync to make it use real time counts for the current player. Originally I had to resort to using a complex algorithm to the do the deductions in the cache.