fix(net): D.2b-B B-Wire — ParseInventoryServerSaveFailed reads weenieError
0x00A0 InventoryServerSaveFailed carries (itemGuid, weenieError) per ACE GameEventInventoryServerSaveFailed.cs and holtburger events.rs:147. The old parser returned only the itemGuid as uint?, silently dropping the error code. Replaced with a typed InventoryServerSaveFailed record that reads both u32s (8-byte guard). Parser was unwired (no callers in GameEvents.cs or GameEventWiring.cs) so the signature change is safe. 1 new test in GameEventsInventoryTests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
01910e3fab
commit
7013651a90
2 changed files with 23 additions and 4 deletions
|
|
@ -402,11 +402,17 @@ public static class GameEvents
|
|||
return BinaryPrimitives.ReadUInt32LittleEndian(payload);
|
||||
}
|
||||
|
||||
/// <summary>0x00A0 InventoryServerSaveFailed: revert a speculative local inventory op.</summary>
|
||||
public static uint? ParseInventoryServerSaveFailed(ReadOnlySpan<byte> payload)
|
||||
/// <summary>0x00A0 InventoryServerSaveFailed: revert a speculative local inventory op.
|
||||
/// (itemGuid, weenieError) — ACE GameEventInventoryServerSaveFailed.cs; holtburger
|
||||
/// events.rs:147 reads both fields.</summary>
|
||||
public readonly record struct InventoryServerSaveFailed(uint ItemGuid, uint WeenieError);
|
||||
|
||||
public static InventoryServerSaveFailed? ParseInventoryServerSaveFailed(ReadOnlySpan<byte> payload)
|
||||
{
|
||||
if (payload.Length < 4) return null;
|
||||
return BinaryPrimitives.ReadUInt32LittleEndian(payload);
|
||||
if (payload.Length < 8) return null;
|
||||
return new InventoryServerSaveFailed(
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(payload),
|
||||
BinaryPrimitives.ReadUInt32LittleEndian(payload.Slice(4)));
|
||||
}
|
||||
|
||||
/// <summary>0x0052 CloseGroundContainer: server closed a ground container view.</summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue