Skip to content

Remove the unreachable reagent bank move and dead bank read branches (#1358) - #1371

Merged
Cidan merged 1 commit into
mainfrom
fix/1358-unreachable-reagent-flow
Nov 19, 2026
Merged

Cidan merged 1 commit into
mainfrom
fix/1358-unreachable-reagent-flow

Conversation

@Cidan

@Cidan Cidan commented Nov 19, 2026

Copy link
Copy Markdown
Owner

Closes #1358.

Summary

No bank view on any client can reach MovementFlow:GetMovementFlow's REAGENT branch, and no supported client has a reagent bank.

  • Retail and WoW: Forever: addon.isRetail is true, so reagentBank was nil.
  • Classic Era, The Burning Crusade Anniversary and Mists of Pandaria Classic: Enum.BagIndex.Reagentbank is -3, but every bankTab writer on these clients sets -1 or 99. Blizzard's source for each client has no reagent bank frame or API, and the Classic bank has one panel.

Changes

  • util/movementflow.lua, core/constants.lua: remove the REAGENT branch and MOVEMENT_FLOW.REAGENT.
  • frames/section.lua: MoveItems drops UseContainerItem's fifth argument. The argument was always false, which is its default and what Blizzard's bag code passes on every client.
  • data/items.lua: items:BankBags is reduced to its two live paths. Three branches could never run since Fix bank tab item disappearances and unassigned category leakage #997 widened the first condition to addon.isRetail. The bags read and the bagid marked are unchanged.
  • Docs: patterns-state.md (no reagent bank on any client), help.md (removed from the list of unfixed bugs), util/README.md (the MOVEMENT_FLOW table now matches core/constants.lua).

Tests

Written first:

  • spec/movementflow_spec.lua: a Classic bank on -3 moves to the bank. This failed before the fix.
  • spec/frames/section_spec.lua: UseContainerItem receives four arguments. This failed before the fix (five).
  • spec/items_spec.lua: BankBags on retail with a Warbank tab shown, and on Classic with a Warbank group active. These pass before and after, because the removed branches never ran.

8172 tests pass under Lua 5.1, and luacheck is clean. Not checked in game: the change removes code that never ran.

…1358)

No bank view on any client can reach the REAGENT movement flow, and no
supported client has a reagent bank to move items into.

- Retail and WoW: Forever: addon.isRetail is true, so GetMovementFlow's
  reagentBank was nil and its check never passed.
- Classic Era, The Burning Crusade Anniversary and Mists of Pandaria
  Classic: Enum.BagIndex still lists Reagentbank (-3), but every writer
  of a bank's bankTab on those clients sets the main bank (-1) or 99
  (bags/{classic,era}/bank.lua, bags/bank.lua SwitchToGroup and
  SwitchToBankAndWipe, next/bank.lua, data/refresh.lua). The tab paths
  that set any other value (frames/bankslots.lua, BetterBags Next's
  tab mode) load or run on retail only. Blizzard's source for each of
  the five clients has no reagent bank frame or API (ReagentBankFrame,
  DepositReagentBank, IsReagentBankUnlocked), and the Classic bank has
  a single panel.

Changes:
- util/movementflow.lua: remove the reagentBank local and the branch
  that returned MOVEMENT_FLOW.REAGENT.
- core/constants.lua: remove MOVEMENT_FLOW.REAGENT, which nothing else
  reads.
- frames/section.lua: MoveItems no longer passes UseContainerItem a
  fifth argument. It was always false, which is the argument's default
  and what Blizzard's bag code passes on every client.
- data/items.lua: items:BankBags is reduced to its two live paths
  (retail: every character and Warbank tab; Classic: the bank, its bags
  and -3). The `not addon.isRetail` check inside `if addon.isRetail`,
  the `elseif blizzardTab and addon.isRetail` branch and the Warbank
  group branch inside the non-retail branch could never run: #997
  widened the first condition from `GetShowBankTabs() and isRetail` to
  `isRetail`, and #1171 moved the code into BankBags unchanged. The
  bags read and the bagid marked are the same as before.

Tests, written first:
- spec/movementflow_spec.lua: the made-up REAGENT = 5 / bankTab = 5
  test is replaced with Classic's real values. A bank on Reagentbank
  (-3) moves to the bank (failed before: it returned the reagent flow).
- spec/frames/section_spec.lua: MoveItems calls UseContainerItem with
  four arguments for bank and Warbank moves (failed before: five).
- spec/items_spec.lua: BankBags reads every tab on retail with a
  Warbank tab shown, and the bank, its bags and -3 on Classic with a
  Warbank group active, marking the character bank. These cover the
  removed branches' cases and pass before and after, since those
  branches never ran.

Docs: patterns-state.md records that no supported client has a reagent
bank and why no flow names one. help.md's list of unfixed bugs drops
this one. util/README.md's MOVEMENT_FLOW table now matches
core/constants.lua.

8172 tests pass under Lua 5.1; luacheck is clean. Not checked in game:
the change removes code that never ran.
@Cidan
Cidan merged commit ef3582b into main Nov 19, 2026
4 checks passed
@Cidan
Cidan deleted the fix/1358-unreachable-reagent-flow branch November 19, 2026 05:19
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.

The reagent bank branch in MovementFlow:GetMovementFlow cannot be reached

1 participant