예제 #1
0
파일: Client.cs 프로젝트: LibezFeed/GO-Bot
        public async Task <EvolvePokemonOut> EvolvePokemon(ulong pokemonId)
        {
            var customRequest = new EvolvePokemon
            {
                PokemonId = pokemonId
            };

            var releasePokemonRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude,
                                                                  new Request.Types.Requests()
            {
                Type    = (int)RequestType.EVOLVE_POKEMON,
                Message = customRequest.ToByteString()
            });

            return
                (await
                 _httpClient.PostProtoPayload <Request, EvolvePokemonOut>($"https://{_apiUrl}/rpc", releasePokemonRequest));
        }
예제 #2
0
        public async Task <EvolvePokemonOut> EvolvePokemon(HttpClient client, string _apiUrl, ulong pokemonId, Request.Types.UnknownAuth _unknownAuth, double _currentLat, double _currentLng)
        {
            var customRequest = new EvolvePokemon
            {
                PokemonId = pokemonId
            };

            var releasePokemonRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
                                                                  new Request.Types.Requests
            {
                Type    = (int)RequestType.EVOLVE_POKEMON,
                Message = customRequest.ToByteString()
            });

            return
                (await
                 client.PostProtoPayload <Request, EvolvePokemonOut>($"https://{_apiUrl}/rpc",
                                                                     releasePokemonRequest));
        }
예제 #3
0
        public async Task<EvolvePokemonOut> EvolvePokemon(ulong pokemonId)
        {
            var customRequest = new EvolvePokemon
            {
                PokemonId = pokemonId
            };

            var releasePokemonRequest = RequestBuilder.GetRequest(_unknownAuth, CurrentLat, CurrentLng, CurrentAltitude,
                new Request.Types.Requests
                {
                    Type = (int)RequestType.EVOLVE_POKEMON,
                    Message = customRequest.ToByteString()
                });
            return
                await
                    _httpClient.PostProtoPayload<Request, EvolvePokemonOut>($"https://{_apiUrl}/rpc", releasePokemonRequest);
        }
예제 #4
0
        public async Task<EvolvePokemonOut> EvolvePokemon(ulong pokemonId)
        {
            while (isEvolve)
                await Task.Delay(30);
            isEvolve = true;
            var customRequest = new EvolvePokemon
            {
                PokemonId = pokemonId
            };

            var releasePokemonRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
                new Request.Types.Requests
                {
                    Type = (int)RequestType.EVOLVE_POKEMON,
                    Message = customRequest.ToByteString()
                });
            isEvolve = false;
            return
                await
                    _httpClient.PostProtoPayload<Request, EvolvePokemonOut>($"https://{_apiUrl}/rpc",
                        releasePokemonRequest);
        }