Skip to content

fix: TwkPacket setters + PetskiPacket schema + add QnamliPacket (17.3.0)#451

Merged
erwan-joly merged 1 commit intomasterfrom
fix/schema-bugs-17.3
Apr 24, 2026
Merged

fix: TwkPacket setters + PetskiPacket schema + add QnamliPacket (17.3.0)#451
erwan-joly merged 1 commit intomasterfrom
fix/schema-bugs-17.3

Conversation

@erwan-joly
Copy link
Copy Markdown
Contributor

Targeted schema fixes surfaced by the validator. Non-breaking except for TwkPacket — consumers relying on the old 'throw on set' invariant won't see it anymore; net effect is that deserialization now actually works.

  • TwkPacket: setters parse the RegionType enum instead of throwing, fixing 'Exception has been thrown by the target of an invocation.'
  • PetskiPacket: widen MateTransportId to int (was sbyte — overflowed on 790), add missing FirstSkillVNum / SecondSkillVNum (short). Matches real wire petski <id> <s1> <s2>.
  • QnamliPacket (new): unblocks 'qnamli' showing up as Missing.

Tests: 114/114. Petski serializer test updated to lock in the three-field shape; documentation snapshot updated to include the new QnamliPacket entry.

**TwkPacket** — ClientLanguageString / ServerLanguageString setters were
throwing with "do not set this set the ClientLanguage instead", which
means any deserialisation through these fields raised
"Exception has been thrown by the target of an invocation." Replace
with setters that parse the incoming string into the RegionType enum
(case-insensitive), keeping the invariant the author cared about.

**PetskiPacket** — class declared a single sbyte MateTransportId, but the
wire carries `petski <mateTransportId> <skill1> <skill2>` (three fields,
and the first is regularly > 127 e.g. 790). Widen to int and add
FirstSkillVNum / SecondSkillVNum (short). Existing serializer test
updated to reflect the real three-field trace.

**QnamliPacket** — new class. `qnamli <questId> #<guri> <targetId> <v1>
<v2> <v3>` was being flagged as Missing. Matches the observed wire.

Regression tests: Petski serializer round-trip already covers the new
shape; full suite 114/114 green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erwan-joly erwan-joly merged commit 7de65f9 into master Apr 24, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 24, 2026

Warning

Rate limit exceeded

@erwan-joly has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 9 minutes and 7 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 9 minutes and 7 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2972af0e-1aaa-4d0d-b139-c8a79f267b5f

📥 Commits

Reviewing files that changed from the base of the PR and between 38df3a5 and 160d748.

📒 Files selected for processing (6)
  • documentation/DocumentationTest.PacketsDocumentation.verified.md
  • src/NosCore.Packets/NosCore.Packets.csproj
  • src/NosCore.Packets/ServerPackets/Mates/PetskiPacket.cs
  • src/NosCore.Packets/ServerPackets/Quest/QnamliPacket.cs
  • src/NosCore.Packets/ServerPackets/UI/TwkPacket.cs
  • test/NosCore.Packets.Tests/SerializerTest.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/schema-bugs-17.3

Comment @coderabbitai help to get the list of available commands and usage tips.

@erwan-joly erwan-joly deleted the fix/schema-bugs-17.3 branch April 24, 2026 09:00
erwan-joly added a commit to NosCoreIO/NosCore.DeveloperTools that referenced this pull request Apr 24, 2026
Picks up:
- NosCoreIO/NosCore.Packets#450 (short-subpacket deserialize fix —
  inv/sayi/msgi/msgi2/mlobjlst/infoi/qslot/fish/qstlist/pinit)
- NosCoreIO/NosCore.Packets#451 (TwkPacket setters, PetskiPacket schema,
  QnamliPacket)
- NosCoreIO/NosCore.Packets#452 (direction-pair packets: gidx/npc_req/
  rsfi server-side, mall/npinfo client-side)

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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