Repository navigation
Item stream: set partial-list mask follows the stream version - #8
Merged
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.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.