Parent: #20 (D-C8).
Current 3.4.3 already commits ordinary item purchases as one transaction after PR #107, but the currency-vendor branch still publishes currency gain/costs into session runtime before awaiting commit_transaction. A cancelled handler or an unknown COMMIT result can therefore leave runtime and durable currency/item-turn-in state inconsistent.
C++ anchors:
src/server/game/Handlers/ItemHandler.cpp::HandleBuyItemOpcode
src/server/game/Entities/Player/Player.cpp::BuyItemFromVendorSlot
_StoreOrEquipNewItem / TakeExtendedCost
Rust targets:
crates/wow-world/src/handlers/character.rs::handle_buy_item
- existing player-money persistence/cancellation fence in
crates/wow-world/src/session.rs
crates/wow-database/src/transaction.rs
Done:
- Plan currency gains, currency costs, item turn-ins and item/gold mutations without publishing runtime state before durable success.
- Commit every purchase-owned mutation atomically.
- Preserve runtime state after a definite rollback.
- Treat cancelled or unknown COMMIT outcomes as indeterminate and require reload without allowing a stale full save to overwrite the transaction.
- Focused positive, rollback, and unknown-outcome tests; C++ refs documented.
- Bot/client capture-diff evidence for a representative vendor purchase before merge.
Closes the D-C8 slice of #20; it does not expand vendor validation/content parity beyond the existing handler.
Parent: #20 (D-C8).
Current
3.4.3already commits ordinary item purchases as one transaction after PR #107, but the currency-vendor branch still publishes currency gain/costs into session runtime before awaitingcommit_transaction. A cancelled handler or an unknown COMMIT result can therefore leave runtime and durable currency/item-turn-in state inconsistent.C++ anchors:
src/server/game/Handlers/ItemHandler.cpp::HandleBuyItemOpcodesrc/server/game/Entities/Player/Player.cpp::BuyItemFromVendorSlot_StoreOrEquipNewItem/TakeExtendedCostRust targets:
crates/wow-world/src/handlers/character.rs::handle_buy_itemcrates/wow-world/src/session.rscrates/wow-database/src/transaction.rsDone:
Closes the D-C8 slice of #20; it does not expand vendor validation/content parity beyond the existing handler.