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

Warband bank #344

Closed GreyFoxGer closed 1 month ago

GreyFoxGer commented 1 month ago

Can you add the support for warband bank please?

WHTJunior commented 1 month ago

I was looking to see if this had been addressed already, but BagSync does not currently show when items are stored in the Warbank. Is this something that is already being investigated?

mariof81 commented 1 month ago

I'd like that too

Xruptor commented 1 month ago

Hey everyone. I didn't even know this was a thing that was implemented. I don't have a subscription so I usually rely on PTR to update my addons.

Honestly, I'd have to take a look at how it was implemented and what to do to properly count it across all the characters. It may be implemented something similar to a guild bank, but I'm not entirely sure. Please be patient as I do code this stuff on my spare time. 💚

Xruptor commented 1 month ago

Is this bank across servers? Or is it restricted to just the server you are on? It said it's account-wide so I'm not sure as I'm restricted to just the PTR. So I can't test it across "multiple" servers.

If it's account-wide across multiple servers that makes things a bit more interesting in terms of implementing. Otherwise, if it's restricted to just the warband server, it shouldn't be that hard to treat as a guild bank sort of.

duraz0rz commented 1 month ago

Yes, the warbank works across servers.

Fun fact: You can also store reagents in it and all of your characters can craft from that pool of reagents.

mariof81 commented 1 month ago

It's across the whole account. You can try it on live, there is a free weekend now: https://www.wowhead.com/news/free-welcome-back-weekend-announced-august-1st-4th-full-access-to-pre-patch-for-345602

Xruptor commented 1 month ago

Hmm interesting, I suppose I can just put it at a higher level tier then the server realms currently implemented in BagSync. This will require a bit of thinking then.

Sluimerstand commented 1 month ago

The number of items in the Warband Bank can be queried with C_Item.GetItemCount luckily. Somewhat recently they added the includeAccountBank argument for this function, so C_Item.GetItemCount(itemInfo, false, false, false, true) returns the amount properly.

I assume BagSync generally works a lot more intelligently than simply querying that info every time the item count needs to be visible, but doing it in that way would circumvent the need to cache the info and somehow figure out which WoW licenses (which would show as separate accounts) belong to the same Battle.net account and thus have their Warband Bank shared.

Also, as an added note for guild banks: guilds have become cross-server (on top of their already being cross-faction) and cross-server guild banking should become available soonâ„¢ as well.

vkbo commented 1 month ago

Thanks for spending the time to work on this addon. It is incredibly useful. Being able to see Warband bank items would be very useful for crafting. But take the time you need. I know how it is to run open source code in your spare time. 😃

Xruptor commented 1 month ago

The number of items in the Warband Bank can be queried with C_Item.GetItemCount luckily. Somewhat recently they added the includeAccountBank argument for this function, so C_Item.GetItemCount(itemInfo, false, false, false, true) returns the amount properly.

I assume BagSync generally works a lot more intelligently than simply querying that info every time the item count needs to be visible, but doing it in that way would circumvent the need to cache the info and somehow figure out which WoW licenses (which would show as separate accounts) belong to the same Battle.net account and thus have their Warband Bank shared.

Also, as an added note for guild banks: guilds have become cross-server (on top of their already being cross-faction) and cross-server guild banking should become available soonâ„¢ as well.

This helps tremendously. I'm still updating the code as I go. I'm trying to do it as quickly as I can, but I'm only doing it in my spare time. I know you all want it quickly, but please be patient.

I've noticed they are shifting a lot of the groundwork in the API to more centralized structure when dealing with the bank. So in the future I may have to overhaul the guildbank as well. Part of the problem I'm currently having is dealing with an account wide bank that BagSync data parser just wasn't built to handle. In the past it used to just iterate through all the appropriate data. With this new WarBank, I'll have to be more direct with the parsing and storing instead of doing an iteration.

Xruptor commented 1 month ago

So I've added the core base DB structure for the Warband Bank into BagSync. I now have to work my way up and incorporate in all the modules. I also fixed an issue with GetItemInfo that Blizzard finally decided to freaking fix, so the Bank counts should be more accurate now.

nanjuekaien1 commented 1 month ago

You have a Battle.net test? I don't know if you can link it for Asia?

Xruptor commented 1 month ago

You have a Battle.net test? I don't know if you can link it for Asia?

I'm not sure I understand what you mean? The changes I've done should technically work even for Asia. I've been adding a lot of error checks to make sure it's compatible across various versions of the game.

mariof81 commented 1 month ago

If you need some sort of testing support before releasing it to the public I can help out.

Xruptor commented 1 month ago

If you need some sort of testing support before releasing it to the public I can help out.

Thanks I appreciate it :) I'm still working on implementing it throughout the modules. Then I need to tackle that currency issue with the new currency exchange.

Xruptor commented 1 month ago

@nanjuekaien1 I pushed the enUS localization for now in case you wanted to update it for CN. You can find it here: https://github.com/Xruptor/BagSync/commit/d2e7af7dfbc3d2553449f0836b9613191db624c1

Xruptor commented 1 month ago

For those wanting to try the updates, please let me know if they work on your end. I have added support for regular Search, Advanced Search, Details and Gold. @mariof81 and any others in this thread that are willing to test.

Use this test version below: BagSync.zip

mariof81 commented 1 month ago

I had a first look - no errors until now, warbank seems to be working. Tomorrow I'll check the numeric values.

vkbo commented 1 month ago

Yeah, Warband bank listing seems to be working just fine here too!

Xruptor commented 1 month ago

Thanks for testing it out. I'll go ahead and push the changes and work on the currency problem.