File Details
0.0.9
- R
- Apr 20, 2026
- 113.05 KB
- 12
- 12.0.1
- Retail
File Name
Wild-0.0.9.zip
Supported Versions
- 12.0.1
tag 1990d071510aab6e9a16065a7e1b6f88f6345c5f 0.0.9
Author: Clawe of the Wild <ClaweOfTheWild@outlook.com>
Date: Mon Apr 20 20:41:46 2026 +0200
New stuffs for Drach
commit c673ed9f13d292d5ade34cd6d0887b1e338f893d
Author: Clawe of the Wild <ClaweOfTheWild@outlook.com>
Date: Mon Apr 20 20:40:58 2026 +0200
🪲 [Fix]: Hold action no longer loops when stack size exceeds keep amount (#9)
Bank "Keep X" rules no longer shuffle items endlessly between bags and
the bank when a stack is larger than the keep amount. The hold action
now splits stacks before moving, depositing or withdrawing only the
exact number of items needed to reach the target count.
- Fixes #8
## Fixed: Hold action no longer loops when stack size exceeds keep
amount
Previously, configuring a hold intent to keep a certain number of a
stackable item (e.g., keep 3 potions) would cause the addon to enter an
infinite loop when the item existed as a single stack larger than the
keep amount. The addon would deposit the entire stack (overshooting to
0), then withdraw it back (overshooting to the full stack), repeating
this cycle up to 50 times.
The deposit and withdraw functions now check whether a partial stack
move is needed. When the remaining amount to move is less than the stack
size,
[`C_Container.SplitContainerItem`](https://warcraft.wiki.gg/wiki/API_C_Container.SplitContainerItem)
is called first to pick up only the required portion before depositing
or withdrawing it. Full-stack moves for non-hold intents (deposit-all,
withdraw-all) continue to work as before.
## Technical Details
Three internal functions in `Bank.lua` were updated:
- **`DepositFromBags`** — now computes `remaining = maxCount -
deposited` and splits when `remaining < stackCount`. Handles both
character bank and warband bank deposit paths (with/without `bankType`).
- **`WithdrawFromCharacterBank`** — now computes `remaining =
neededCount - withdrawn` and splits when `remaining < stackCount`.
- **`WithdrawFromWarbandBank`** — same logic as character bank withdraw,
adapted for warband bank container references (`bankBag`).
The `deposited`/`withdrawn` counters and log entry counts now reflect
the actual moved amount (`moveCount`) rather than the full `stackCount`.
The hold-action logic in `ProcessHoldIntent` and the retry loop in
`ProcessQueueStep` were not changed — they already calculated correct
excess/deficit amounts.
### Implementation plan progress (from #8)
- [x] Update `DepositFromBags` to split stacks when partial move needed
- [x] Update `WithdrawFromCharacterBank` to split stacks when partial
move needed
- [x] Update `WithdrawFromWarbandBank` to split stacks when partial move
needed
- [x] Ensure counters reflect actual moved amount, not full stack count

