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
|
|
@ -48,6 +48,18 @@ public sealed class StackSplitQuantityState
|
|||
|
||||
public void SetValue(uint value) => Set(value, Maximum);
|
||||
|
||||
/// <summary>
|
||||
/// Ports <c>ItemHolder::GetObjectSplitSize @ 0x00586F00</c>: only the
|
||||
/// currently selected object consumes <c>GenItemHolder::splitSize</c>.
|
||||
/// Every other object operation uses that object's full stack size.
|
||||
/// </summary>
|
||||
public uint GetObjectSplitSize(uint objectId, uint selectedObjectId, uint objectStackSize)
|
||||
{
|
||||
if (objectId == selectedObjectId)
|
||||
return Value;
|
||||
return Math.Max(objectStackSize, 1u);
|
||||
}
|
||||
|
||||
private void Set(uint value, uint maximum)
|
||||
{
|
||||
maximum = Math.Max(maximum, 1u);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue