fix(ui): preserve retail item titles and spacing
Carry PublicWeenieDesc material type into the live object model so examination titles use the DAT-authored material prefix. Preserve retail AddItemInfo empty appends and embedded armor separator, restoring the deliberate blank rows between appraisal sections. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
d78d09cfbc
commit
6718ee45a0
19 changed files with 341 additions and 46 deletions
|
|
@ -223,7 +223,11 @@ public static class CreateObject
|
|||
// Complete immutable PhysicsDesc projection. Kept alongside the
|
||||
// legacy convenience fields while live-entity ownership migrates to
|
||||
// LiveEntityRuntime in Step 2.
|
||||
PhysicsSpawnData? Physics = null);
|
||||
PhysicsSpawnData? Physics = null,
|
||||
// PublicWeenieDesc._material_type, gated by PWD_Packed_MaterialType.
|
||||
// ACCWeenieObject::GetObjectName(NAME_APPROPRIATE) uses this live
|
||||
// spawn field to prefix the authored material name.
|
||||
uint? MaterialType = null);
|
||||
|
||||
/// <summary>
|
||||
/// The relevant subset of the server-sent <c>MovementData</c> /
|
||||
|
|
@ -865,6 +869,13 @@ public static class CreateObject
|
|||
// 0x40000000 IconOverlay PackedDwordKnownType(0x06000000) CAPTURE
|
||||
// weenieFlags2 bit 0x01:
|
||||
// IconUnderlay PackedDwordKnownType(0x06000000) CAPTURE
|
||||
// 0x80000000 MaterialType u32 CAPTURE
|
||||
// weenieFlags2 bit 0x02:
|
||||
// CooldownId u32 CAPTURE
|
||||
// weenieFlags2 bit 0x04:
|
||||
// CooldownDuration f64 CAPTURE
|
||||
// weenieFlags2 bit 0x08:
|
||||
// PetOwner u32 CAPTURE
|
||||
//
|
||||
// The entire walk is inside try/catch. A truncated packet degrades
|
||||
// gracefully: whatever was parsed before the throw is kept, and
|
||||
|
|
@ -885,6 +896,7 @@ public static class CreateObject
|
|||
uint? petOwnerId = null;
|
||||
uint? cooldownId = null;
|
||||
double? cooldownDuration = null;
|
||||
uint? materialType = null;
|
||||
try
|
||||
{
|
||||
// BF_INCLUDES_SECOND_HEADER = 0x04000000 per acclient.h:6458
|
||||
|
|
@ -1092,7 +1104,7 @@ public static class CreateObject
|
|||
if ((weenieFlags & 0x80000000u) != 0) // MaterialType u32
|
||||
{
|
||||
if (body.Length - pos < 4) throw new FormatException("trunc MaterialType");
|
||||
pos += 4;
|
||||
materialType = ReadU32(body, ref pos);
|
||||
}
|
||||
if ((weenieFlags2 & 0x00000002u) != 0) // CooldownId u32
|
||||
{
|
||||
|
|
@ -1145,7 +1157,8 @@ public static class CreateObject
|
|||
SpellId: spellId,
|
||||
CooldownId: cooldownId,
|
||||
CooldownDuration: cooldownDuration,
|
||||
Physics: physics);
|
||||
Physics: physics,
|
||||
MaterialType: materialType);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue