Ejemplo n.º 1
0
        public async Task <CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, ItemId pokeballItemId, double normalizedRecticleSize = 1.950, double spinModifier = 1, double normalizedHitPos = 1)
        {
            var message = new CatchPokemonMessage
            {
                EncounterId           = encounterId,
                Pokeball              = pokeballItemId,
                SpawnPointId          = spawnPointGuid,
                HitPokemon            = true,
                NormalizedReticleSize = normalizedRecticleSize,
                SpinModifier          = spinModifier,
                NormalizedHitPosition = normalizedHitPos
            };

            return(await PostProtoPayload <Request, CatchPokemonResponse>(RequestType.CatchPokemon, message));
        }
Ejemplo n.º 2
0
        public async Task <CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, ItemId pokeball)
        {
            CatchPokemonMessage catchPokemon = new CatchPokemonMessage()
            {
                EncounterId           = encounterId,
                Pokeball              = pokeball,
                SpawnPointId          = spawnPointGuid,
                HitPokemon            = true,
                NormalizedReticleSize = 1.950,
                SpinModifier          = 1,
                NormalizedHitPosition = 1
            };

            return(await AwaitableOnResponseFor <CatchPokemonMessage, CatchPokemonResponse>(catchPokemon, RequestType.CatchPokemon));
        }
 public async Task<CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, ItemId pokeballItemId, double normalizedRecticleSize = 1.950, double spinModifier = 1, double normalizedHitPos = 1)
 {
     var message = new CatchPokemonMessage
     {
         EncounterId = encounterId,
         Pokeball = pokeballItemId,
         SpawnPointId = spawnPointGuid,
         HitPokemon = true,
         NormalizedReticleSize = normalizedRecticleSize,
         SpinModifier = spinModifier,
         NormalizedHitPosition = normalizedHitPos
     };
     
     return await PostProtoPayload<Request, CatchPokemonResponse>(RequestType.CatchPokemon, message);
 }
Ejemplo n.º 4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="encounterId"></param>
        /// <param name="spawnPointGuid"></param>
        /// <param name="pokeballItemId"></param>
        /// <param name="normalizedRecticleSize"></param>
        /// <param name="spinModifier"></param>
        /// <param name="normalizedHitPos"></param>
        /// <param name="hitPokemon"></param>
        /// <returns></returns>
        public bool QueueCatchPokemonRequest(ulong encounterId, string spawnPointGuid, ItemId pokeballItemId, double normalizedRecticleSize = 1.950,
                                             double spinModifier = 1, double normalizedHitPos = 1, bool hitPokemon = true)
        {
            var message = new CatchPokemonMessage
            {
                EncounterId           = encounterId,
                Pokeball              = pokeballItemId,
                SpawnPointId          = spawnPointGuid,
                HitPokemon            = hitPokemon,
                NormalizedReticleSize = normalizedRecticleSize,
                SpinModifier          = spinModifier,
                NormalizedHitPosition = normalizedHitPos
            };

            return(Client.QueueRequest(RequestType.CatchPokemon, message));
        }
Ejemplo n.º 5
0
        public async Task <CatchPokemonResponse> CatchPokemon(ulong encounterId, string spawnPointGuid, ItemId pokeballItemId, double normalizedRecticleSize = 1.950, double spinModifier = 1, double normalizedHitPos = 1, bool hitPokemon = true)
        {
            var message = new CatchPokemonMessage
            {
                EncounterId           = encounterId,
                Pokeball              = pokeballItemId,
                SpawnPointId          = spawnPointGuid,
                HitPokemon            = true,
                NormalizedReticleSize = normalizedRecticleSize,
                SpinModifier          = spinModifier,
                NormalizedHitPosition = normalizedHitPos
            };

            // when you miss a throw also set NormalizedHitPosition and SpinModifier to 0 (to exclude from message sent) plus set NormalizedReticleSize = 1
            if (!hitPokemon)
            {
                message.HitPokemon            = false;
                message.SpinModifier          = 0;
                message.NormalizedHitPosition = 0;
                message.NormalizedReticleSize = 1;
            }

            return(await PostProtoPayload <Request, CatchPokemonResponse>(RequestType.CatchPokemon, message));
        }