fix(inventory): sequence secondary wield blockers

Preserve retail AmmoType from CreateObject and port BlocksUseOfShield so bow, caster, and two-handed switches remove incompatible shields, while mismatched missile ammo is also returned to the pack. Each blocker remains server-confirmed before AutoWield re-enters.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-12 23:12:07 +02:00
parent 17b5712d53
commit 815ce0dec4
14 changed files with 206 additions and 16 deletions

View file

@ -189,6 +189,8 @@ public sealed class ClientObject
public uint PetOwnerId { get; set; }
/// <summary>Retail <c>PublicWeenieDesc._combatUse</c>; null when its header flag was absent.</summary>
public byte? CombatUse { get; set; }
/// <summary>Retail <c>PublicWeenieDesc._ammoType</c>; zero is <c>AMMO_NONE</c>.</summary>
public ushort? AmmoType { get; set; }
/// <summary>Client-side trade state used by ItemHolder legality gates.</summary>
public int TradeState { get; set; }
/// <summary>Resolved membership in SpellComponentTable (retail IsComponentPack).</summary>
@ -255,7 +257,8 @@ public readonly record struct WeenieData(
uint? PublicWeenieBitfield = null,
byte? CombatUse = null,
string? PluralName = null,
uint? PetOwnerId = null);
uint? PetOwnerId = null,
ushort? AmmoType = null);
/// <summary>
/// Retail ITEM_USEABLE helpers (acclient.h:6478, ItemUses::* at 0x004fccd0).