loldevs/leaguespec

Map rune IDs to runes

Closed this issue · 8 comments

https://github.com/loldevs/leaguespec/wiki/Keyframe-Player-Segment#rune-page contains examples of rune IDs, but we need to figure out how to map these into actual runes.

Parsing the first two bytes of each rune entry as an unsigned integer seems to give rune ID's matching the official API data (see http://ddragon.leagueoflegends.com/tool/euw/en_US for example). Can anyone confirm?

Divi commented

Confirmed, according to the rune.json 👍

I don't know if missing runes (when the player is not level 30) are transformed into padding or just deleted. In this case, the length is variable.

Nice. Since the last two bytes of each entry appear to be 0x00 all the time, we can probably assume that the ID is in fact 4 bytes long, leaving room for future expansion.

Divi commented

If needed, runes are also available with the RTMP API, especially the Spellbook service. The selected spellbook has the key current to true.

I don't think it's a 16-bit integer and 16-bit padding, rather a 32-bit integer.

Divi commented

Good point, I edited the wiki.

Thanks @Divi !

I've created a separate issue for the open question regarding empty rune slots at #26.