loldevs / leaguespec

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

How to get the game id of the current game? #32

Closed NitroXenon closed 9 years ago

NitroXenon commented 9 years ago

I'm going to make a replay tool for Korean and Taiwan client. How can I get the game id and the ecryption key of the current game?

strangeglyph commented 9 years ago

You need an RTMP call to gameService.retrieveInProgressSpectatorGameInfo(String summoner). That's how it works on most regions anyway. Garena might be doing their own thing as usual.

NitroXenon commented 9 years ago

lol but how can I do it in C#??

strangeglyph commented 9 years ago

Either look for an RTMP library written in C# or write your own. Existing libs:

If you decide to roll your own, here's some docs to get you started:

NitroXenon commented 9 years ago

Is it need to login using the LoL account first?

strangeglyph commented 9 years ago

Yes. You need to get through the login queue to get an auth token, and use that token to log into the rtmp servers

NitroXenon commented 9 years ago

Oh I see. Thanks~

NitroXenon commented 9 years ago

But there is another problem. I can't login to TW server using RTMP so I can't get any data.

Can I use a UdpClient to track the RTMP messages send form the server and the client? Is it work?

eddy5641 commented 9 years ago

You have to connect with partner credentials, an illogical thing that garena requires for you to login.