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
|
|
@ -59,4 +59,17 @@ public sealed class GameEventsInventoryTests
|
|||
Assert.Equal(3u, p.Value.Placement);
|
||||
Assert.Equal(1u, p.Value.ContainerType);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void ParseInventoryServerSaveFailed_readsGuidAndError()
|
||||
{
|
||||
var b = new byte[8];
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(b.AsSpan(0), 0x50000A01u); // itemGuid
|
||||
BinaryPrimitives.WriteUInt32LittleEndian(b.AsSpan(4), 0x0Au); // weenieError
|
||||
|
||||
var p = GameEvents.ParseInventoryServerSaveFailed(b);
|
||||
Assert.NotNull(p);
|
||||
Assert.Equal(0x50000A01u, p!.Value.ItemGuid);
|
||||
Assert.Equal(0x0Au, p.Value.WeenieError);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue