fix(inventory): await final wield confirmation

Keep the retail inventory transaction busy until authoritative WieldObject confirms the requested weapon. This prevents rapid weapon changes from overlapping on ACE and rejecting otherwise valid items such as spears.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-12 23:27:44 +02:00
parent 815ce0dec4
commit ea5cf5b842
8 changed files with 115 additions and 9 deletions

View file

@ -89,9 +89,15 @@ on server inventory-request failure(item, error):
clear pending
send_wield(item, mask):
pending = (requestedItem = item.id, blockingItem = none)
update the retained inventory/paperdoll projection optimistically
send GetAndWieldItem(item.id, mask)
on server-confirmed WieldObject(item):
if item matches pending.requestedItem
and pending.blockingItem is none:
clear pending
on PrivateUpdatePropertyInt(property = CombatMode, value):
if value is exactly NonCombat, Melee, Missile, or Magic:
CombatState.SetCombatMode(value)
@ -106,6 +112,12 @@ The inventory controller only sequences the two wire requests and waits for
the old weapon's confirmed move; the existing motion and equipped-child
render paths consume the server events.
The request is not complete when `GetAndWieldItem` is merely sent. Retail
`UIAttemptWield` records `prevRequest = IR_WIELD` and leaves the item waiting
until `ServerSaysMoveItem` reconciles it. acdream therefore keeps AutoWield
busy through the final authoritative `WieldObject`; allowing another switch
during the optimistic interval makes ACE reject otherwise valid items.
## Known remaining retail surface
This port covers the primary weapon-ready group plus retail's secondary