fix(items): finish corpse pickup and combat switching

Port retail's first-slot ShowPendingInPlayer path for double-click loot and carry the current owned-container destination through deferred pickup. Retire the previous ground-container view as soon as a replacement is requested so its range close cannot cancel ACE's active MoveTo chain.

Preserve active-combat weapon intent across ACE's authoritative wand-to-missile stance tail while leaving peace-mode switches unchanged.

Release build succeeds and all 5,885 tests pass with five intentional skips.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-17 18:35:29 +02:00
parent d51a0fc825
commit 0392c6d721
17 changed files with 631 additions and 81 deletions

View file

@ -111,7 +111,7 @@ public sealed class ExternalContainerControllerTests
sendWield: null,
sendDrop: null,
groundObjectId: () => State.CurrentContainerId,
placeInBackpack: Pickups.Add,
placeInBackpack: (item, _, _) => Pickups.Add(item),
sendPutItemInContainer: (item, container, placement) =>
Puts.Add((item, container, placement)),
sendSplitToContainer: (item, container, placement, amount) =>
@ -213,6 +213,35 @@ public sealed class ExternalContainerControllerTests
Assert.True(h.Window.IsVisible);
}
[Fact]
public void ReplacementRequest_HidesOldViewWithoutSendingRangeCloseUse()
{
using var h = new Harness();
const uint replacement = 0x70000002u;
h.Open(Chest);
h.Objects.AddOrUpdate(new ClientObject
{
ObjectId = replacement,
Type = ItemType.Container,
ItemsCapacity = 24,
Useability = ItemUseability.Remote,
});
h.State.RequestOpen(replacement);
h.InRange = false;
h.Controller.Tick();
Assert.Equal(0u, h.State.CurrentContainerId);
Assert.Equal(replacement, h.State.RequestedContainerId);
Assert.False(h.Window.IsVisible);
Assert.Empty(h.Uses);
Assert.Equal(new uint[] { Chest }, h.NoLonger);
h.State.ApplyViewContents(replacement);
Assert.Equal(replacement, h.State.CurrentContainerId);
Assert.True(h.Window.IsVisible);
}
[Fact]
public void DropOwnedPartialStackIntoChest_UsesSplitRequestWithoutLocalMove()
{