mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Fix bank for all expansions: add missing field indices and per-expansion slot counts
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
Some checks are pending
Build / Build (arm64) (push) Waiting to run
Build / Build (x86-64) (push) Waiting to run
Build / Build (macOS arm64) (push) Waiting to run
Build / Build (windows-arm64) (push) Waiting to run
Build / Build (windows-x86-64) (push) Waiting to run
Security / CodeQL (C/C++) (push) Waiting to run
Security / Semgrep (push) Waiting to run
Security / Sanitizer Build (ASan/UBSan) (push) Waiting to run
This commit is contained in:
parent
66bcb0a712
commit
804b947203
7 changed files with 49 additions and 15 deletions
|
|
@ -7765,11 +7765,13 @@ void GameScreen::renderBankWindow(game::GameHandler& gameHandler) {
|
|||
|
||||
auto& inv = gameHandler.getInventory();
|
||||
|
||||
// Main bank slots (28 = 7 columns × 4 rows)
|
||||
// Main bank slots (24 for Classic, 28 for TBC/WotLK)
|
||||
int bankSlotCount = gameHandler.getEffectiveBankSlots();
|
||||
int bankBagCount = gameHandler.getEffectiveBankBagSlots();
|
||||
ImGui::Text("Bank Slots");
|
||||
ImGui::Separator();
|
||||
bool isHolding = inventoryScreen.isHoldingItem();
|
||||
for (int i = 0; i < game::Inventory::BANK_SLOTS; i++) {
|
||||
for (int i = 0; i < bankSlotCount; i++) {
|
||||
if (i % 7 != 0) ImGui::SameLine();
|
||||
const auto& slot = inv.getBankSlot(i);
|
||||
|
||||
|
|
@ -7817,7 +7819,7 @@ void GameScreen::renderBankWindow(game::GameHandler& gameHandler) {
|
|||
ImGui::Separator();
|
||||
ImGui::Text("Bank Bags");
|
||||
uint8_t purchased = inv.getPurchasedBankBagSlots();
|
||||
for (int i = 0; i < game::Inventory::BANK_BAG_SLOTS; i++) {
|
||||
for (int i = 0; i < bankBagCount; i++) {
|
||||
if (i > 0) ImGui::SameLine();
|
||||
ImGui::PushID(i + 2000);
|
||||
|
||||
|
|
@ -7835,7 +7837,7 @@ void GameScreen::renderBankWindow(game::GameHandler& gameHandler) {
|
|||
}
|
||||
|
||||
// Show expanded bank bag contents
|
||||
for (int bagIdx = 0; bagIdx < game::Inventory::BANK_BAG_SLOTS; bagIdx++) {
|
||||
for (int bagIdx = 0; bagIdx < bankBagCount; bagIdx++) {
|
||||
int bagSize = inv.getBankBagSize(bagIdx);
|
||||
if (bagSize <= 0) continue;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue