public async Task <CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, double pokemonLat,
                                                              double pokemonLng, MiscEnums.Item pokeball, int?pokemonCP)
        {
            var customRequest = new Request.Types.CatchPokemonRequest
            {
                EncounterId           = encounterId,
                Pokeball              = (int)GetBestBall(pokemonCP).Result,
                SpawnPointGuid        = spawnPointGuid,
                HitPokemon            = 1,
                NormalizedReticleSize = Utils.FloatAsUlong(1.950),
                SpinModifier          = Utils.FloatAsUlong(1),
                NormalizedHitPosition = Utils.FloatAsUlong(1)
            };

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

            return
                (await
                 _httpClient.PostProtoPayload <Request, CatchPokemonResponse>($"https://{_apiUrl}/rpc",
                                                                              catchPokemonRequest));
        }
Esempio n. 2
0
        public async Task<CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, double pokemonLat,
            double pokemonLng, MiscEnums.Item pokeball, int? pokemonCP)
        {
            var customRequest = new Request.Types.CatchPokemonRequest
            {
                EncounterId = encounterId,
                Pokeball = (int)GetBestBall(pokemonCP).Result,
                SpawnPointGuid = spawnPointGuid,
                HitPokemon = 1,
                NormalizedReticleSize = Utils.FloatAsUlong(1.950),
                SpinModifier = Utils.FloatAsUlong(1),
                NormalizedHitPosition = Utils.FloatAsUlong(1)
            };

            var catchPokemonRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
                new Request.Types.Requests
                {
                    Type = (int)RequestType.CATCH_POKEMON,
                    Message = customRequest.ToByteString()
                });
            return
                await
                    _httpClient.PostProtoPayload<Request, CatchPokemonResponse>($"https://{_apiUrl}/rpc",
                        catchPokemonRequest);
        }
Esempio n. 3
0
        public async Task <CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, double pokemonLat,
                                                              double pokemonLng)
        {
            var customRequest = new Request.Types.CatchPokemonRequest()
            {
                EncounterId           = encounterId,
                Pokeball              = (int)MiscEnums.Item.ITEM_POKE_BALL,
                SpawnPointGuid        = spawnPointGuid,
                HitPokemon            = 1,
                NormalizedReticleSize = Utils.FloatAsUlong(1.86440348625),
                SpinModifier          = Utils.FloatAsUlong(0.00655560661107)
            };

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

            return
                (await
                 _httpClient.PostProto <Request, CatchPokemonResponse>($"https://{_apiUrl}/rpc", catchPokemonRequest));
        }
Esempio n. 4
0
        public async Task<CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, double pokemonLat,
            double pokemonLng)
        {
            var customRequest = new Request.Types.CatchPokemonRequest()
            {
                EncounterId = encounterId,
                Pokeball = (int) MiscEnums.Item.ITEM_POKE_BALL,
                SpawnPointGuid = spawnPointGuid,
                HitPokemon = 1,
                NormalizedReticleSize = Utils.FloatAsUlong(1.86440348625),
                SpinModifier = Utils.FloatAsUlong(0.00655560661107)
            };

            var catchPokemonRequest = RequestBuilder.GetRequest(_unknownAuth, _currentLat, _currentLng, 30,
                new Request.Types.Requests()
                {
                    Type = (int) RequestType.CATCH_POKEMON,
                    Message = customRequest.ToByteString()
                });
            return
                await
                    _httpClient.PostProto<Request, CatchPokemonResponse>($"https://{_apiUrl}/rpc", catchPokemonRequest);
        }