Ejemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    CreationTimestampMs = input.ReadInt64();
                    break;
                }

                case 18: {
                    Username = input.ReadString();
                    break;
                }

                case 40: {
                    team_ = (global::PokemonGoDesktop.API.Proto.TeamColor)input.ReadEnum();
                    break;
                }

                case 58:
                case 56: {
                    tutorialState_.AddEntriesFrom(input, _repeated_tutorialState_codec);
                    break;
                }

                case 66: {
                    if (avatar_ == null)
                    {
                        avatar_ = new global::PokemonGoDesktop.API.Proto.PlayerAvatar();
                    }
                    input.ReadMessage(avatar_);
                    break;
                }

                case 72: {
                    MaxPokemonStorage = input.ReadInt32();
                    break;
                }

                case 80: {
                    MaxItemStorage = input.ReadInt32();
                    break;
                }

                case 90: {
                    if (dailyBonus_ == null)
                    {
                        dailyBonus_ = new global::PokemonGoDesktop.API.Proto.DailyBonus();
                    }
                    input.ReadMessage(dailyBonus_);
                    break;
                }

                case 98: {
                    if (equippedBadge_ == null)
                    {
                        equippedBadge_ = new global::PokemonGoDesktop.API.Proto.EquippedBadge();
                    }
                    input.ReadMessage(equippedBadge_);
                    break;
                }

                case 106: {
                    if (contactSettings_ == null)
                    {
                        contactSettings_ = new global::PokemonGoDesktop.API.Proto.ContactSettings();
                    }
                    input.ReadMessage(contactSettings_);
                    break;
                }

                case 114: {
                    currencies_.AddEntriesFrom(input, _repeated_currencies_codec);
                    break;
                }
                }
            }
        }
Ejemplo n.º 2
0
 public void MergeFrom(PlayerData other)
 {
     if (other == null)
     {
         return;
     }
     if (other.CreationTimestampMs != 0L)
     {
         CreationTimestampMs = other.CreationTimestampMs;
     }
     if (other.Username.Length != 0)
     {
         Username = other.Username;
     }
     if (other.Team != 0)
     {
         Team = other.Team;
     }
     tutorialState_.Add(other.tutorialState_);
     if (other.avatar_ != null)
     {
         if (avatar_ == null)
         {
             avatar_ = new global::PokemonGoDesktop.API.Proto.PlayerAvatar();
         }
         Avatar.MergeFrom(other.Avatar);
     }
     if (other.MaxPokemonStorage != 0)
     {
         MaxPokemonStorage = other.MaxPokemonStorage;
     }
     if (other.MaxItemStorage != 0)
     {
         MaxItemStorage = other.MaxItemStorage;
     }
     if (other.dailyBonus_ != null)
     {
         if (dailyBonus_ == null)
         {
             dailyBonus_ = new global::PokemonGoDesktop.API.Proto.DailyBonus();
         }
         DailyBonus.MergeFrom(other.DailyBonus);
     }
     if (other.equippedBadge_ != null)
     {
         if (equippedBadge_ == null)
         {
             equippedBadge_ = new global::PokemonGoDesktop.API.Proto.EquippedBadge();
         }
         EquippedBadge.MergeFrom(other.EquippedBadge);
     }
     if (other.contactSettings_ != null)
     {
         if (contactSettings_ == null)
         {
             contactSettings_ = new global::PokemonGoDesktop.API.Proto.ContactSettings();
         }
         ContactSettings.MergeFrom(other.ContactSettings);
     }
     currencies_.Add(other.currencies_);
 }