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:
parent
815ce0dec4
commit
ea5cf5b842
8 changed files with 115 additions and 9 deletions
|
|
@ -112,7 +112,8 @@ public sealed class ItemInteractionController : IDisposable
|
|||
|
||||
public int BusyCount => _busyCount;
|
||||
|
||||
public bool CanMakeInventoryRequest => _readyForInventoryRequest() && _busyCount == 0;
|
||||
public bool CanMakeInventoryRequest =>
|
||||
_readyForInventoryRequest() && _busyCount == 0 && !_autoWield.IsBusy;
|
||||
|
||||
/// <summary>
|
||||
/// Raised for retail confirmation/auxiliary actions whose retained panel is
|
||||
|
|
@ -246,7 +247,7 @@ public sealed class ItemInteractionController : IDisposable
|
|||
Snapshot(item),
|
||||
_playerGuid(),
|
||||
_groundObjectId(),
|
||||
_readyForInventoryRequest() && _busyCount == 0,
|
||||
CanMakeInventoryRequest,
|
||||
_activeVendorId(),
|
||||
BypassClassification: false,
|
||||
UseCurrentSelection: false,
|
||||
|
|
@ -277,7 +278,7 @@ public sealed class ItemInteractionController : IDisposable
|
|||
if (!compatible)
|
||||
return false;
|
||||
|
||||
if (!_readyForInventoryRequest() || _busyCount != 0)
|
||||
if (!CanMakeInventoryRequest)
|
||||
return false;
|
||||
_sendUseWithTarget?.Invoke(sourceGuid, targetGuid);
|
||||
_busyCount++;
|
||||
|
|
@ -309,7 +310,7 @@ public sealed class ItemInteractionController : IDisposable
|
|||
Snapshot(item),
|
||||
_playerGuid(),
|
||||
_groundObjectId(),
|
||||
_readyForInventoryRequest() && _busyCount == 0,
|
||||
CanMakeInventoryRequest,
|
||||
TargetId: 0,
|
||||
Target: null,
|
||||
AllowGroundFallback: true,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue