public void MergeFrom(EncounterResponse other)
 {
     if (other == null)
     {
         return;
     }
     if (other.wildPokemon_ != null)
     {
         if (wildPokemon_ == null)
         {
             wildPokemon_ = new global::PokemonGoDesktop.API.Proto.WildPokemon();
         }
         WildPokemon.MergeFrom(other.WildPokemon);
     }
     if (other.Background != 0)
     {
         Background = other.Background;
     }
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     if (other.captureProbability_ != null)
     {
         if (captureProbability_ == null)
         {
             captureProbability_ = new global::PokemonGoDesktop.API.Proto.CaptureProbability();
         }
         CaptureProbability.MergeFrom(other.CaptureProbability);
     }
 }
Esempio n. 2
0
 public void MergeFrom(DiskEncounterResponse other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Result != 0)
     {
         Result = other.Result;
     }
     if (other.pokemonData_ != null)
     {
         if (pokemonData_ == null)
         {
             pokemonData_ = new global::PokemonGoDesktop.API.Proto.PokemonData();
         }
         PokemonData.MergeFrom(other.PokemonData);
     }
     if (other.captureProbability_ != null)
     {
         if (captureProbability_ == null)
         {
             captureProbability_ = new global::PokemonGoDesktop.API.Proto.CaptureProbability();
         }
         CaptureProbability.MergeFrom(other.CaptureProbability);
     }
 }
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    if (wildPokemon_ == null)
                    {
                        wildPokemon_ = new global::PokemonGoDesktop.API.Proto.WildPokemon();
                    }
                    input.ReadMessage(wildPokemon_);
                    break;
                }

                case 16: {
                    background_ = (global::PokemonGoDesktop.API.Proto.EncounterResponse.Types.Background)input.ReadEnum();
                    break;
                }

                case 24: {
                    status_ = (global::PokemonGoDesktop.API.Proto.EncounterResponse.Types.Status)input.ReadEnum();
                    break;
                }

                case 34: {
                    if (captureProbability_ == null)
                    {
                        captureProbability_ = new global::PokemonGoDesktop.API.Proto.CaptureProbability();
                    }
                    input.ReadMessage(captureProbability_);
                    break;
                }
                }
            }
        }
Esempio n. 4
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    result_ = (global::PokemonGoDesktop.API.Proto.DiskEncounterResponse.Types.Result)input.ReadEnum();
                    break;
                }

                case 18: {
                    if (pokemonData_ == null)
                    {
                        pokemonData_ = new global::PokemonGoDesktop.API.Proto.PokemonData();
                    }
                    input.ReadMessage(pokemonData_);
                    break;
                }

                case 26: {
                    if (captureProbability_ == null)
                    {
                        captureProbability_ = new global::PokemonGoDesktop.API.Proto.CaptureProbability();
                    }
                    input.ReadMessage(captureProbability_);
                    break;
                }
                }
            }
        }