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
|
|
@ -177,6 +177,15 @@ public sealed class ClientObject
|
|||
public uint WielderId { get; set; } // PropertyInstanceId.Wielder; 0 = not wielded
|
||||
public int ItemsCapacity { get; set; } // main-pack slots (containers)
|
||||
public int ContainersCapacity{ get; set; } // side-pack slots (containers)
|
||||
/// <summary>Retail <c>PublicWeenieDesc._hook_item_types</c>.</summary>
|
||||
public uint HookItemTypes { get; set; }
|
||||
/// <summary>Retail <c>PublicWeenieDesc._hook_type</c>.</summary>
|
||||
public uint HookType { get; set; }
|
||||
/// <summary>
|
||||
/// Port of <c>ACCWeenieObject::IsHook @ 0x0058C660</c>.
|
||||
/// A hook must publish both a hook type and an accepted item-type mask.
|
||||
/// </summary>
|
||||
public bool IsHook => HookType != 0u && HookItemTypes != 0u;
|
||||
public uint Priority { get; set; } // ClothingPriority / CoverageMask layer order
|
||||
public uint? Useability { get; set; } // ITEM_USEABLE from PublicWeenieDesc
|
||||
public uint? TargetType { get; set; } // ITEM_TYPE mask for targeted-use compatibility
|
||||
|
|
@ -274,7 +283,9 @@ public readonly record struct WeenieData(
|
|||
ushort? AmmoType = null,
|
||||
uint? SpellId = null,
|
||||
uint? CooldownId = null,
|
||||
double? CooldownDuration = null);
|
||||
double? CooldownDuration = null,
|
||||
uint? HookItemTypes = null,
|
||||
uint? HookType = null);
|
||||
|
||||
/// <summary>
|
||||
/// Retail ITEM_USEABLE helpers (acclient.h:6478, ItemUses::* at 0x004fccd0).
|
||||
|
|
|
|||
|
|
@ -194,6 +194,8 @@ public sealed class ClientObjectTable
|
|||
/// <see cref="ClientObject.Effects"/>.</summary>
|
||||
public const uint UiEffectsPropertyId = 18u;
|
||||
public const uint CurrentWieldedLocationPropertyId = 10u;
|
||||
public const uint HookTypePropertyId = 151u;
|
||||
public const uint HookItemTypesPropertyId = 152u;
|
||||
public const uint SharedCooldownPropertyId = 280u;
|
||||
public const uint CooldownDurationPropertyId = 167u;
|
||||
|
||||
|
|
@ -663,6 +665,8 @@ public sealed class ClientObjectTable
|
|||
if (propertyId == SharedCooldownPropertyId) item.CooldownId = (uint)value;
|
||||
if (propertyId == CurrentWieldedLocationPropertyId)
|
||||
item.CurrentlyEquippedLocation = (EquipMask)(uint)value;
|
||||
if (propertyId == HookTypePropertyId) item.HookType = (uint)value;
|
||||
if (propertyId == HookItemTypesPropertyId) item.HookItemTypes = (uint)value;
|
||||
if (propertyId == CurrentWieldedLocationPropertyId)
|
||||
UpdateEquipmentIndex(itemId, previous, ClientObjectPlacement.From(item));
|
||||
ObjectUpdated?.Invoke(item);
|
||||
|
|
@ -764,6 +768,8 @@ public sealed class ClientObjectTable
|
|||
if (d.RadarBehavior is { } radarBehavior) obj.RadarBehavior = radarBehavior;
|
||||
if (d.ItemsCapacity is { } ic) obj.ItemsCapacity = ic;
|
||||
if (d.ContainersCapacity is { } cc) obj.ContainersCapacity = cc;
|
||||
if (d.HookItemTypes is { } hookItemTypes) obj.HookItemTypes = hookItemTypes;
|
||||
if (d.HookType is { } hookType) obj.HookType = hookType;
|
||||
if (d.Structure is { } st) obj.Structure = st;
|
||||
if (d.MaxStructure is { } ms) obj.MaxStructure = ms;
|
||||
if (d.Workmanship is { } wm) obj.Workmanship = wm;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue