Skip to content

fix: Game18NArguments, SayItemtPacket, PinitSubPacket, RcPacket (17.6.0)#454

Merged
erwan-joly merged 1 commit intomasterfrom
fix/game18n-sayitemt-pinit-rc
Apr 24, 2026
Merged

fix: Game18NArguments, SayItemtPacket, PinitSubPacket, RcPacket (17.6.0)#454
erwan-joly merged 1 commit intomasterfrom
fix/game18n-sayitemt-pinit-rc

Conversation

@erwan-joly
Copy link
Copy Markdown
Contributor

Batch of fixes the validator surfaced.

  • Game18NArguments special-case in DeserializeValue — unlocks sayi / msgi / msgi2 at once.
  • SayItemtPacket — four props sharing PacketIndex(3) and PacketIndex(4) caused the character name to be parsed as a Game18NConstString enum. Flattened to sequential indices; typed sub-packet variants replaced with a string SubPacketRaw catch-all (sub-packet polymorphism is a separate task).
  • PinitSubPacket — inserted Unknown2 (int) at index 6 to accommodate the 11-field wire that previously overflowed byte Gender.
  • RcPacket — new class for the rc header.

114/114 tests.

- **Game18NArguments**: the class is a custom non-generic IList<object>,
  so the generic list path crashed with IndexOutOfRange on
  GetGenericArguments()[0] and couldn't assign a List<object> to it
  anyway. Special-case it in DeserializeValue to consume the remaining
  tokens directly. Fixes sayi / msgi / msgi2.
- **SayItemtPacket**: had four properties sharing [PacketIndex(3)] and
  [PacketIndex(4)], so deserialize put the character name into the
  Game18NConstString enum and threw "Requested value '<name>' was not
  found." Flattened to unique sequential indices and replaced the three
  typed sub-packet properties (IconInfo/EInfo/SlInfo) with a single
  string SubPacketRaw that captures the rest of the wire — only one
  of the four sub-packet shapes ever appears per packet so a typed
  poly field would need a real discriminator.
- **PinitSubPacket**: real wire carries 11 tokens
  (2|id|pos|level|name|-1|319|1|0|0|0) but schema had only 10 fields
  and the value 319 was landing on a byte Gender field. Inserted an
  Unknown2 int at index 6 so everything downstream (Gender/Race/Morph/
  HeroLevel) shifts one slot right.
- **RcPacket**: new class for `rc 1 14477871 11468 0`. Fields named
  Unknown1/Unknown2 until their semantics are RE'd.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erwan-joly erwan-joly merged commit 8e581d8 into master Apr 24, 2026
@erwan-joly erwan-joly deleted the fix/game18n-sayitemt-pinit-rc branch April 24, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant