feat(D.5.4): add item fields to ClientObject + WeenieData ingest DTO

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Erik 2026-06-18 15:57:12 +02:00
parent b00a373c5a
commit b83f17a927
2 changed files with 73 additions and 1 deletions

View file

@ -198,4 +198,36 @@ public sealed class ClientObjectTableTests
Assert.True(ok);
Assert.Equal(0u, repo.Get(0x500000ADu)!.Effects);
}
[Fact]
public void ClientObject_NewFields_DefaultAndSettable()
{
var o = new ClientObject
{
ObjectId = 1, WielderId = 0x42u, ItemsCapacity = 24, ContainersCapacity = 7,
Priority = 8u, Structure = 5, MaxStructure = 10, Workmanship = 7.5f,
};
o.WeenieClassId = 0xABCDu; // now settable
Assert.Equal(0x42u, o.WielderId);
Assert.Equal(24, o.ItemsCapacity);
Assert.Equal(7, o.ContainersCapacity);
Assert.Equal(8u, o.Priority);
Assert.Equal(5, o.Structure);
Assert.Equal(10, o.MaxStructure);
Assert.Equal(7.5f, o.Workmanship);
Assert.Equal(0xABCDu, o.WeenieClassId);
}
[Fact]
public void WeenieData_Construct()
{
var d = new WeenieData(Guid: 1, Name: "x", Type: ItemType.Misc, WeenieClassId: 2,
IconId: 0x06001234u, IconOverlayId: 0, IconUnderlayId: 0, Effects: 0,
Value: 5, StackSize: 1, StackSizeMax: 1, Burden: 10,
ContainerId: 0x99u, WielderId: null, ValidLocations: null,
CurrentWieldedLocation: null, Priority: null,
ItemsCapacity: null, ContainersCapacity: null,
Structure: null, MaxStructure: null, Workmanship: null);
Assert.Equal(0x99u, d.ContainerId);
}
}