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

Update Currency Count on Currency Transfer #343

Closed F-Lambda closed 1 month ago

F-Lambda commented 1 month ago

When transferring currencies from one character to another, the recipient character updates (because it's the one you're on), but the sender character does not. This causes characters to display as having currency amounts they do not have, possibly not even having the currency at all.

If possible, BagSync should update both recipient and sender currency amounts.

Xruptor commented 1 month ago

This is an inherent limitation of the system. I'm assuming you mean sending currency/GOLD to a character using the Mail system correct and not some sort of trade?

F-Lambda commented 1 month ago

No, I mean using the new Currency transfer system added in TWW, from the character window.

image

Xruptor commented 1 month ago

No, I mean using the new Currency transfer system added in TWW, from the character window.

image

Oh wow.... I didn't even know that was a thing. Well that is going to be a huge issue for me to deal with I think. I'll have to look at the code and determine how to properly implement such a fix. In the meantime the only way to truly keep it accurate is just to login to each toon involved in the transactions (before and after). This may take some time as I don't have a subscription and I update addons casually.

d-schmidt commented 1 month ago

A first simple step would be to show the total for transferable currencies. Be aware. not all of them are.

grafik

Sluimerstand commented 1 month ago

The event CURRENCY_TRANSFER_LOG_UPDATE can probably be used to track successful currency transfers. C_CurrencyInfo.FetchCurrencyDataFromAccountCharacters(currencyID) then shows all currency for the provided currencyID for every character except the current one, for some reason.

There is also C_CurrencyInfo.IsAccountWideCurrency(currencyID) to check if the currency is transferrable at all - maybe helpful if you want to treat these differently. (Some are transferrable at 0 loss, some cost a percentage to transfer.)

Most of this isn't documented yet on Warcraft Wiki, but I got the info from here.

Xruptor commented 1 month ago

The event CURRENCY_TRANSFER_LOG_UPDATE can probably be used to track successful currency transfers. C_CurrencyInfo.FetchCurrencyDataFromAccountCharacters(currencyID) then shows all currency for the provided currencyID for every character except the current one, for some reason.

There is also C_CurrencyInfo.IsAccountWideCurrency(currencyID) to check if the currency is transferrable at all - maybe helpful if you want to treat these differently. (Some are transferrable at 0 loss, some cost a percentage to transfer.)

Most of this isn't documented yet on Warcraft Wiki, but I got the info from here.

While I was going through the code I did notice the CURRENCY_TRANSFER_LOG_UPDATE but not the functions you mentioned. This is actually exactly what I need to be able to decipher if a transaction is in progress and to which target it's going to. I just need to make sure I can pull the category as well. BagSync stores both the currencyID and it's related category to display properly. I have a feeling the API doesn't do this during the transaction in any parameters. So I may have to brute force it.

Sluimerstand commented 1 month ago

I'm far from a seasoned addon developer, but I've always gotten tremendous help from the WoW AddOns discord. There's a lot of very clever people in there who might be able to help out if you're struggling with anything in particular. A small handful of them are very active and hands-on with new/future API changes, so they may have some insight that could be helpful. :D

Xruptor commented 1 month ago

Now that I got Warband Bank implemented, I will be tackling this issue in BagSync.