fix(ui): port retail partial stack transfers
Route the selected stack quantity through retail GetObjectSplitSize semantics, send exact split-to-container and split-to-ground actions, and keep the original object in place until the server publishes the newly guided stack. Cover selection scoping, wire bytes, container placement, and world drops with conformance tests. Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
parent
6005c51c4d
commit
ea72c395c9
14 changed files with 280 additions and 19 deletions
|
|
@ -17,4 +17,32 @@ public sealed class WorldSessionInventoryActionTests
|
|||
|
||||
Assert.Equal(InventoryActions.BuildStackableMerge(1, 0xAAu, 0xBBu, 5u), captured);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SendStackableSplitToContainer_UsesNextSequenceAndExactBuilderBytes()
|
||||
{
|
||||
using var session = new WorldSession(
|
||||
new IPEndPoint(IPAddress.Loopback, 65000));
|
||||
byte[]? captured = null;
|
||||
session.GameActionCapture = body => captured = body;
|
||||
|
||||
session.SendStackableSplitToContainer(0xAAu, 0xBBu, 4u, 2u);
|
||||
|
||||
Assert.Equal(
|
||||
InventoryActions.BuildStackableSplitToContainer(1, 0xAAu, 0xBBu, 4u, 2u),
|
||||
captured);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SendStackableSplitTo3D_UsesNextSequenceAndExactBuilderBytes()
|
||||
{
|
||||
using var session = new WorldSession(
|
||||
new IPEndPoint(IPAddress.Loopback, 65000));
|
||||
byte[]? captured = null;
|
||||
session.GameActionCapture = body => captured = body;
|
||||
|
||||
session.SendStackableSplitTo3D(0xAAu, 2u);
|
||||
|
||||
Assert.Equal(InventoryActions.BuildStackableSplitTo3D(1, 0xAAu, 2u), captured);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue