fix(interaction): restore retail loot placement and world-drop projection
This commit is contained in:
parent
4d095be286
commit
921712f412
24 changed files with 1581 additions and 34 deletions
|
|
@ -17,6 +17,7 @@ public sealed class SelectionInteractionControllerTests
|
|||
{
|
||||
private const uint Player = 0x5000_0001u;
|
||||
private const uint Target = 0x7000_0001u;
|
||||
private const uint GroundContainer = 0x7000_0010u;
|
||||
|
||||
private sealed class Query : IWorldSelectionQuery
|
||||
{
|
||||
|
|
@ -140,6 +141,7 @@ public sealed class SelectionInteractionControllerTests
|
|||
public readonly List<PendingBackpackPlacement> CancelledPlacements = new();
|
||||
public readonly ItemInteractionController Items;
|
||||
public readonly SelectionInteractionController Controller;
|
||||
public uint GroundObjectId { get; set; }
|
||||
|
||||
public Harness()
|
||||
{
|
||||
|
|
@ -173,6 +175,7 @@ public sealed class SelectionInteractionControllerTests
|
|||
Query.Events.Add("examine");
|
||||
Examines.Add(guid);
|
||||
},
|
||||
groundObjectId: () => GroundObjectId,
|
||||
placeInBackpack: (item, container, placement) =>
|
||||
controller!.SendPickup(item, container, placement),
|
||||
requestUse: (guid, reservation) =>
|
||||
|
|
@ -495,6 +498,32 @@ public sealed class SelectionInteractionControllerTests
|
|||
Assert.Equal(new[] { (Target, Player, 0) }, h.Transport.Pickups);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CorpseChildDoubleClickDispatchesWithoutAWorldProjection()
|
||||
{
|
||||
const uint loot = 0x7000_0011u;
|
||||
var h = new Harness
|
||||
{
|
||||
GroundObjectId = GroundContainer,
|
||||
};
|
||||
h.Objects.AddOrUpdate(new ClientObject
|
||||
{
|
||||
ObjectId = loot,
|
||||
Name = "Corpse loot",
|
||||
Type = ItemType.Misc,
|
||||
ContainerId = GroundContainer,
|
||||
});
|
||||
h.Query.Pickupable = false;
|
||||
h.Query.Approach = null;
|
||||
|
||||
Assert.True(h.Items.ActivateItem(loot));
|
||||
|
||||
Assert.Empty(h.Movement.Approaches);
|
||||
Assert.Equal(new[] { (loot, Player, 0) }, h.Transport.Pickups);
|
||||
Assert.Single(h.PendingPlacements);
|
||||
Assert.Empty(h.CancelledPlacements);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SessionResetClearsQueuedAndDeferredWork()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue