fix(ui): match retail item appraisal semantics
Preserve PublicWeenieDesc hook identity from CreateObject through the item model so hook appraisals suppress sentinel capacities exactly. Use appraisal-only Value and Burden presence, retain AddItemInfo paragraph and authored font-color selection, and port retail lock, page, enchantment, and spell-block formatting. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
bc47bc4917
commit
d3c5e06fdd
21 changed files with 982 additions and 145 deletions
|
|
@ -300,12 +300,16 @@ public sealed class ClientObjectTableTests
|
|||
var o = new ClientObject
|
||||
{
|
||||
ObjectId = 1, WielderId = 0x42u, ItemsCapacity = 24, ContainersCapacity = 7,
|
||||
HookItemTypes = (uint)ItemType.Container, HookType = 4u,
|
||||
ContainerTypeHint = 1u, 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((uint)ItemType.Container, o.HookItemTypes);
|
||||
Assert.Equal(4u, o.HookType);
|
||||
Assert.True(o.IsHook);
|
||||
Assert.Equal(1u, o.ContainerTypeHint);
|
||||
Assert.Equal(8u, o.Priority);
|
||||
Assert.Equal(5, o.Structure);
|
||||
|
|
@ -314,6 +318,40 @@ public sealed class ClientObjectTableTests
|
|||
Assert.Equal(0xABCDu, o.WeenieClassId);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IngestAndLiveProperties_PreserveRetailHookIdentity()
|
||||
{
|
||||
const uint guid = 0x500000AEu;
|
||||
var table = new ClientObjectTable();
|
||||
ClientObject obj = table.Ingest(
|
||||
FullWeenie(guid) with
|
||||
{
|
||||
HookItemTypes = (uint)ItemType.Container,
|
||||
HookType = 4u,
|
||||
});
|
||||
|
||||
Assert.True(obj.IsHook);
|
||||
Assert.Equal((uint)ItemType.Container, obj.HookItemTypes);
|
||||
Assert.Equal(4u, obj.HookType);
|
||||
|
||||
Assert.True(table.UpdateIntProperty(
|
||||
guid,
|
||||
ClientObjectTable.HookTypePropertyId,
|
||||
value: 0));
|
||||
Assert.False(obj.IsHook);
|
||||
Assert.True(table.UpdateIntProperty(
|
||||
guid,
|
||||
ClientObjectTable.HookTypePropertyId,
|
||||
value: 2));
|
||||
Assert.True(table.UpdateIntProperty(
|
||||
guid,
|
||||
ClientObjectTable.HookItemTypesPropertyId,
|
||||
value: (int)ItemType.Misc));
|
||||
Assert.True(obj.IsHook);
|
||||
Assert.Equal(2u, obj.HookType);
|
||||
Assert.Equal((uint)ItemType.Misc, obj.HookItemTypes);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void WeenieData_Construct()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue