示例#1
0
 public void MergeFrom(BattleParticipant other)
 {
     if (other == null)
     {
         return;
     }
     if (other.activePokemon_ != null)
     {
         if (activePokemon_ == null)
         {
             activePokemon_ = new global::PokemonGoDesktop.API.Proto.BattlePokemonInfo();
         }
         ActivePokemon.MergeFrom(other.ActivePokemon);
     }
     if (other.trainerPublicProfile_ != null)
     {
         if (trainerPublicProfile_ == null)
         {
             trainerPublicProfile_ = new global::PokemonGoDesktop.API.Proto.PlayerPublicProfile();
         }
         TrainerPublicProfile.MergeFrom(other.TrainerPublicProfile);
     }
     reversePokemon_.Add(other.reversePokemon_);
     defeatedPokemon_.Add(other.defeatedPokemon_);
 }
示例#2
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.AttackGymResponse.Types.Result)input.ReadEnum();
                    break;
                }

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

                case 26: {
                    BattleId = input.ReadString();
                    break;
                }

                case 34: {
                    if (activeDefender_ == null)
                    {
                        activeDefender_ = new global::PokemonGoDesktop.API.Proto.BattlePokemonInfo();
                    }
                    input.ReadMessage(activeDefender_);
                    break;
                }

                case 42: {
                    if (activeAttacker_ == null)
                    {
                        activeAttacker_ = new global::PokemonGoDesktop.API.Proto.BattlePokemonInfo();
                    }
                    input.ReadMessage(activeAttacker_);
                    break;
                }
                }
            }
        }
示例#3
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

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

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

                case 26: {
                    reversePokemon_.AddEntriesFrom(input, _repeated_reversePokemon_codec);
                    break;
                }

                case 34: {
                    defeatedPokemon_.AddEntriesFrom(input, _repeated_defeatedPokemon_codec);
                    break;
                }
                }
            }
        }
示例#4
0
 public void MergeFrom(AttackGymResponse other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Result != 0)
     {
         Result = other.Result;
     }
     if (other.battleLog_ != null)
     {
         if (battleLog_ == null)
         {
             battleLog_ = new global::PokemonGoDesktop.API.Proto.BattleLog();
         }
         BattleLog.MergeFrom(other.BattleLog);
     }
     if (other.BattleId.Length != 0)
     {
         BattleId = other.BattleId;
     }
     if (other.activeDefender_ != null)
     {
         if (activeDefender_ == null)
         {
             activeDefender_ = new global::PokemonGoDesktop.API.Proto.BattlePokemonInfo();
         }
         ActiveDefender.MergeFrom(other.ActiveDefender);
     }
     if (other.activeAttacker_ != null)
     {
         if (activeAttacker_ == null)
         {
             activeAttacker_ = new global::PokemonGoDesktop.API.Proto.BattlePokemonInfo();
         }
         ActiveAttacker.MergeFrom(other.ActiveAttacker);
     }
 }