Skip to content

Fix misleading bag capacity and add slot count display options - #2074

Open
andybergon wants to merge 4 commits into
EllesmereGaming:mainfrom
andybergon:t3code/fix-reagent-bag-item-count
Open

Fix misleading bag capacity and add slot count display options#2074
andybergon wants to merge 4 commits into
EllesmereGaming:mainfrom
andybergon:t3code/fix-reagent-bag-item-count

Conversation

@andybergon

Copy link
Copy Markdown
Contributor

What does this PR do?

Fixes the inventory header counting reagent-only space as ordinary bag capacity. A combined count such as 110/150 suggests room for 40 more item stacks, even when only two regular bag slots are free and the rest of the space only accepts reagents. This can make a player think they have enough room for loot when their regular bags are almost full.

Regular bag and reagent bag slots are shown separately by default. The header says "slots" because a stack occupies one slot, regardless of how many items it contains.

  • Slot count format: Used/total, Free/total, or Free only. Used/total remains the default; remaining-space formats are opt-in.
  • Separate reagent slots: enabled by default to fix the misleading capacity display. Turning it off restores a combined count.
  • Both settings update the header immediately and apply across inventory views. The existing bag-icon hover already provides individual bag details.

How was it tested?

  • Applied to a live EllesmereUI 9.1.8 installation. The screenshots below show used/total, free/total, and the new settings in game.
  • Lua compilation passed for all three changed files.
  • A focused Lua harness passed 11 display scenarios, including all formats with separate and combined counts, full regular bags with free reagent space, no reagent bag, and default/fallback behavior. Both settings callbacks and immediate refresh were checked.
  • A trial merge against current upstream main completed without conflicts.

Screenshots

Before: one combined count hides the distinction between regular and reagent-only capacity.

Before: combined inventory capacity

After: used and total slots shown separately.

After: separate used and total slot counts

After: free and total slots shown separately.

After: separate free and total slot counts

Settings: choose the count format and whether to separate reagent slots.

Slot count format and separate reagent slots settings

Checklist

  • New settings default OFF: bug-fix exception requested for separate reagent slots, which defaults on to avoid misleading capacity. Used/total remains the default format.
  • Zero cost while disabled: no new events, polling, hooks, or runtime frames. Counting uses the existing inventory scan and header refresh; options use the existing options page.
  • Cheap while enabled: uses the existing event-driven refresh, with no new polling or timer-based logic.
  • No writes onto Blizzard-owned frames: updates only the addon's own inventory header.
  • Tested in-game on live as shown above; no version gates or pre-Midnight APIs added. Broader gameplay testing is not claimed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant