feat(combat): port retail held weapon parenting

Select the default combat mode from ordered equipped objects so bows request missile stance. Parse CreateObject parent metadata and ParentEvent, then render held objects as separate children composed from setup holding locations and placement frames each animation tick.
This commit is contained in:
Erik 2026-07-11 13:02:26 +02:00
parent 564d39dfea
commit ab6d96d113
18 changed files with 1152 additions and 17 deletions

View file

@ -65,6 +65,15 @@ public sealed class ClientObjectTable
/// </summary>
public event Action<ClientObject, uint, uint>? ObjectMoved;
/// <summary>
/// Fires after an optimistic inventory/equipment move is rejected and
/// <see cref="RollbackMove"/> has restored the exact pre-move state.
/// Consumers with projections outside the item grid (for example a
/// parented 3-D weapon) can restore their prior projection without
/// treating every ordinary equip as a rollback.
/// </summary>
public event Action<ClientObject>? MoveRolledBack;
/// <summary>Fires when an object is removed from the session.</summary>
public event Action<ClientObject>? ObjectRemoved;
@ -239,7 +248,10 @@ public sealed class ClientObjectTable
{
if (!_pendingMoves.TryGetValue(itemId, out var pre)) return false;
_pendingMoves.Remove(itemId);
return MoveItem(itemId, pre.container, pre.slot, pre.equip);
if (!MoveItem(itemId, pre.container, pre.slot, pre.equip))
return false;
MoveRolledBack?.Invoke(_objects[itemId]);
return true;
}
/// <summary>