Use the real main bank size instead of a hardcoded one - #23
Open
uga wants to merge 1 commit into
Open
Conversation
The main bank holds 24 slots on Classic Era and 28 from TBC onwards, but four different places assumed a fixed value, and none of them agreed: - bagSizes[MainBankSlots] was "hasVoidBank and 28 or 98". hasVoidBank is only true between 5.3 and 11.2, so every classic version below MoP fell through to 98, the size of an 11.2 bank tab, and the grid never trimmed its last row - the containers pane passed a literal 28 to UpdateBagIndices(), so it laid out three rows of 12 whatever the character actually has - the backpack tooltip said 16 and the bank tooltip said 28, both literals, which is why the tooltip disagreed with the grid next to it - PlayerBank scanned 28 main slots regardless The size is now taken from NUM_BANKGENERIC_SLOTS, and stored per character on scan so an alt scanned on another version of the game keeps its own size rather than borrowing the one of the running client. GetPlayerBankSize() exposes it, and the containers pane routes the bank through it for the grid, the row layout and the tooltip alike. The backpack tooltip now reads the scanned container size, so it matches the 20 slots shown on the right. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
One fix in
DataStore_Containers. Verified in game on Classic Era and TBC Anniversary.Use the real main bank size instead of a hardcoded one
NUM_MAIN_SLOTSwas hardcoded to 28. The main bank holds 24 slots on Classic Era and 28 from TBC onwards, so on Classic Era four slots that do not exist were scanned and drawn.It now reads
NUM_BANKGENERIC_SLOTS, falling back to 28, and stores the size on the character. Storing it matters for an account holding alts scanned on different versions of the game: without it, a Classic Era alt viewed from a TBC client would be drawn with four phantom slots, and the reverse would truncate.GetPlayerBankInfo()answers with the stored size, and a newGetPlayerBankSize()exposes it for the UI.Applicability
The bank panel change is in the
Altoholic_CataPR.Related PRs
This is one change set spread over the repos it touches. Account sharing needs the first two together; the others are independent of each other.