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.StartGymBattleResponse.Types.Result)input.ReadEnum();
                    break;
                }

                case 16: {
                    BattleStartTimestampMs = input.ReadInt64();
                    break;
                }

                case 24: {
                    BattleEndTimestampMs = input.ReadInt64();
                    break;
                }

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

                case 42: {
                    if (defender_ == null)
                    {
                        defender_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant();
                    }
                    input.ReadMessage(defender_);
                    break;
                }

                case 50: {
                    if (battleLog_ == null)
                    {
                        battleLog_ = new global::PokemonGoDesktop.API.Proto.BattleLog();
                    }
                    input.ReadMessage(battleLog_);
                    break;
                }
                }
            }
        }
Exemplo n.º 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;
                }
                }
            }
        }
 public void MergeFrom(StartGymBattleResponse other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Result != 0)
     {
         Result = other.Result;
     }
     if (other.BattleStartTimestampMs != 0L)
     {
         BattleStartTimestampMs = other.BattleStartTimestampMs;
     }
     if (other.BattleEndTimestampMs != 0L)
     {
         BattleEndTimestampMs = other.BattleEndTimestampMs;
     }
     if (other.BattleId.Length != 0)
     {
         BattleId = other.BattleId;
     }
     if (other.defender_ != null)
     {
         if (defender_ == null)
         {
             defender_ = new global::PokemonGoDesktop.API.Proto.BattleParticipant();
         }
         Defender.MergeFrom(other.Defender);
     }
     if (other.battleLog_ != null)
     {
         if (battleLog_ == null)
         {
             battleLog_ = new global::PokemonGoDesktop.API.Proto.BattleLog();
         }
         BattleLog.MergeFrom(other.BattleLog);
     }
 }
Exemplo n.º 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);
     }
 }