docs(D.5.4): plan — StackSizeMax int? for downstream type consistency

Code-review follow-up from Task 2: align StackSizeMax with the other quantity
fields (int?, ACE PropertyInt convention) in Tasks 3/4/5; drop the (int) cast.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-18 15:51:29 +02:00
parent 91970c4fe9
commit e4dd37a3b8

View file

@ -201,9 +201,9 @@ public void TryParse_FullItemFields_Captured()
var parsed = CreateObject.TryParse(body); var parsed = CreateObject.TryParse(body);
Assert.NotNull(parsed); Assert.NotNull(parsed);
var p = parsed!.Value; var p = parsed!.Value;
Assert.Equal(250u, p.Value); Assert.Equal(250, p.Value);
Assert.Equal(7, p.StackSize); Assert.Equal(7, p.StackSize);
Assert.Equal(100u, p.StackSizeMax); Assert.Equal(100, p.StackSizeMax);
Assert.Equal(42, p.Burden); Assert.Equal(42, p.Burden);
Assert.Equal(24, p.ItemsCapacity); Assert.Equal(24, p.ItemsCapacity);
Assert.Equal(7, p.ContainersCapacity); Assert.Equal(7, p.ContainersCapacity);
@ -255,7 +255,7 @@ In `CreateObject.cs`, append these parameters to the `Parsed` record (after `UiE
uint WeenieClassId = 0, uint WeenieClassId = 0,
int? Value = null, int? Value = null,
int? StackSize = null, int? StackSize = null,
uint? StackSizeMax = null, int? StackSizeMax = null,
int? Burden = null, int? Burden = null,
int? ItemsCapacity = null, int? ItemsCapacity = null,
int? ContainersCapacity = null, int? ContainersCapacity = null,
@ -415,7 +415,7 @@ Append to the `EntitySpawn` record (after `uint UiEffects = 0`, change it to `,`
uint WeenieClassId = 0, uint WeenieClassId = 0,
int? Value = null, int? Value = null,
int? StackSize = null, int? StackSize = null,
uint? StackSizeMax = null, int? StackSizeMax = null,
int? Burden = null, int? Burden = null,
int? ItemsCapacity = null, int? ItemsCapacity = null,
int? ContainersCapacity = null, int? ContainersCapacity = null,
@ -557,7 +557,7 @@ public readonly record struct WeenieData(
uint Effects, uint Effects,
int? Value, int? Value,
int? StackSize, int? StackSize,
uint? StackSizeMax, int? StackSizeMax,
int? Burden, int? Burden,
uint? ContainerId, uint? ContainerId,
uint? WielderId, uint? WielderId,
@ -714,7 +714,7 @@ In `ClientObjectTable.cs`, rename the backing field `_items` → `_objects` (and
obj.Effects = d.Effects; // D.5.2 contract obj.Effects = d.Effects; // D.5.2 contract
if (d.Value is { } v) obj.Value = v; if (d.Value is { } v) obj.Value = v;
if (d.StackSize is { } s) obj.StackSize = s; if (d.StackSize is { } s) obj.StackSize = s;
if (d.StackSizeMax is { } sm) obj.StackSizeMax = (int)sm; if (d.StackSizeMax is { } sm) obj.StackSizeMax = sm;
if (d.Burden is { } b) obj.Burden = b; if (d.Burden is { } b) obj.Burden = b;
if (d.ContainerId is { } c) obj.ContainerId = c; if (d.ContainerId is { } c) obj.ContainerId = c;
if (d.WielderId is { } w) obj.WielderId = w; if (d.WielderId is { } w) obj.WielderId = w;