Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mastery padding specification needs an explanation #28

Open
Zero3 opened this issue Aug 6, 2014 · 4 comments
Open

Mastery padding specification needs an explanation #28

Zero3 opened this issue Aug 6, 2014 · 4 comments

Comments

@Zero3
Copy link

Zero3 commented Aug 6, 2014

The section at https://github.com/loldevs/leaguespec/wiki/Keyframe-Player-Segment#padding lacks an explanation. How do we know the amount of padding?

My initial guess would be that there always are 30 mastery slots in the data, even though not all of them are used (for example when several points are allocated towards the same mastery). The mastery IDs for the remaining slots are set to 0 as with runes (see #26). Does anyone know if this is true?

@Zero3
Copy link
Author

Zero3 commented Aug 6, 2014

On a related note, the 03 00 part of the mastery entry appears to be 00 00 for empty slots. I will make a careful guess that the '3' is a mastery "season number". I don't know if we had a new set of masteries every season, but if so, this would make sense.

@Zero3
Copy link
Author

Zero3 commented Aug 6, 2014

Besides what can reasonably be attributed to mastery points per above, there is exactly 250 additional "padding bytes" (all zero) before the item header starts. At least that is how the keyframe I'm currently working on looks.

@avborhanian
Copy link

It's 20 masteries in the offense tree, 19 in the defense tree, and 18 in the utility tree. Dedicating 5 bytes to each [ (20 + 19 + 18) * 5 ] results in 285 bytes total. Add 8 for the header, and we're at 293, which is still a fair bit short of the 404 bytes dedicated to the section in total.

@avborhanian
Copy link

Actually, now thanks to the bitflags work, we know exactly how the padding is done.

Satan6 already posted this in the wiki, but the header for the runes, summoner spells, and masteries is
83
00
12 02 00 00 // [contentlength]
2A // [blocktype]
19 00 00 40 // Entity ID [blockparam]

And 212 is 530 bytes. 120 for the runes, 8 for the summoner spells, and as much as is needed for masteries. Rest is padding until the last byte, which specifies summoner level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants