loldevs / leaguespec

community crafted knowledge base around Riot Games observer system
Other
149 stars 18 forks source link

Map rune IDs to runes #22

Closed Zero3 closed 10 years ago

Zero3 commented 10 years ago

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.

Zero3 commented 10 years ago

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 10 years ago

Confirmed, according to the rune.json :+1:

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.

Zero3 commented 10 years ago

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 10 years ago

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

Divi commented 10 years ago

Added description in the keyframe page : https://github.com/loldevs/leaguespec/wiki/Keyframe-Player-Segment/_compare/75f68ed11c94b31d2e72990d6e4540124955b94b%5E...75f68ed11c94b31d2e72990d6e4540124955b94b

Can we close this ticket @Zero3 ?

jaagupkymmel commented 10 years ago

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

Divi commented 10 years ago

Good point, I edited the wiki.

Zero3 commented 10 years ago

Thanks @Divi !

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