Skip to content

Item stream: set partial-list mask follows the stream version - #8

Merged
jaenster merged 1 commit into
mainfrom
item-stream-version
Oct 6, 2026
Merged

jaenster merged 1 commit into
mainfrom
item-stream-version

Conversation

@jaenster

@jaenster jaenster commented Oct 2, 2026

Copy link
Copy Markdown
Owner

The game gates the set item's partial-list mask on the version of the item stream it reads (0x60 for 1.14d), never on the item's own 10-bit version field. A Classic (version 2) or legacy (version 0) set item therefore carries the mask exactly like an Expansion (101) one.

The decoder and writer gated on the item's own field, so Classic and legacy set items were misread (and the rest of the item list could fall out of step after them).

Changes:

  • wire/item.zig: decode and encode gate the mask on the stream version.
  • Tests: a rare decodes identically at every item version; a set item whose version field is rewritten in its bytes decodes the same.

Found while building d2up's Classic "pre-patch rares" (rares rolled at item version 0), whose items are read by d2up-server through this decoder.

…t the item's own version

The game gates the mask on the version of the stream it reads (0x60 for 1.14d) and never on the item's own
10-bit version field, so a Classic (2) or legacy (0) set item has the mask like an Expansion (101) one. The
decoder and writer gated on the item's field and misread Classic set items. Tests: a rare reads the same at
every item version, and a set item whose version field is rewritten in its bytes reads the same.
@jaenster
jaenster merged commit 5434074 into main Oct 6, 2026
5 checks passed
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