示例#1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 10: {
                    FortId = input.ReadString();
                    break;
                }

                case 16: {
                    gymBadgeType_ = (global::POGOProtos.Enums.GymBadgeType)input.ReadEnum();
                    break;
                }

                case 24: {
                    Score = input.ReadUInt32();
                    break;
                }

                case 34: {
                    if (gymBadgeStats_ == null)
                    {
                        gymBadgeStats_ = new global::POGOProtos.Data.Badge.GymBadgeStats();
                    }
                    input.ReadMessage(gymBadgeStats_);
                    break;
                }

                case 40: {
                    LastUpdateTimestampMs = input.ReadUInt64();
                    break;
                }

                case 50: {
                    Name = input.ReadString();
                    break;
                }

                case 58: {
                    ImageUrl = input.ReadString();
                    break;
                }

                case 66: {
                    Description = input.ReadString();
                    break;
                }

                case 73: {
                    Latitude = input.ReadDouble();
                    break;
                }

                case 81: {
                    Longitude = input.ReadDouble();
                    break;
                }

                case 88: {
                    LastCheckTimestampMs = input.ReadUInt64();
                    break;
                }

                case 96: {
                    EarnedPoints = input.ReadUInt32();
                    break;
                }

                case 109: {
                    Progress = input.ReadFloat();
                    break;
                }

                case 112: {
                    LevelUp = input.ReadBool();
                    break;
                }

                case 122: {
                    if (raids_ == null)
                    {
                        raids_ = new global::POGOProtos.Data.Raid.PlayerRaidInfo();
                    }
                    input.ReadMessage(raids_);
                    break;
                }
                }
            }
        }
示例#2
0
 public void MergeFrom(AwardedGymBadge other)
 {
     if (other == null)
     {
         return;
     }
     if (other.FortId.Length != 0)
     {
         FortId = other.FortId;
     }
     if (other.GymBadgeType != 0)
     {
         GymBadgeType = other.GymBadgeType;
     }
     if (other.Score != 0)
     {
         Score = other.Score;
     }
     if (other.gymBadgeStats_ != null)
     {
         if (gymBadgeStats_ == null)
         {
             gymBadgeStats_ = new global::POGOProtos.Data.Badge.GymBadgeStats();
         }
         GymBadgeStats.MergeFrom(other.GymBadgeStats);
     }
     if (other.LastUpdateTimestampMs != 0UL)
     {
         LastUpdateTimestampMs = other.LastUpdateTimestampMs;
     }
     if (other.LastCheckTimestampMs != 0UL)
     {
         LastCheckTimestampMs = other.LastCheckTimestampMs;
     }
     if (other.EarnedPoints != 0)
     {
         EarnedPoints = other.EarnedPoints;
     }
     if (other.Progress != 0F)
     {
         Progress = other.Progress;
     }
     if (other.LevelUp != false)
     {
         LevelUp = other.LevelUp;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.ImageUrl.Length != 0)
     {
         ImageUrl = other.ImageUrl;
     }
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
     if (other.Latitude != 0D)
     {
         Latitude = other.Latitude;
     }
     if (other.Longitude != 0D)
     {
         Longitude = other.Longitude;
     }
     if (other.raids_ != null)
     {
         if (raids_ == null)
         {
             raids_ = new global::POGOProtos.Data.Raid.PlayerRaidInfo();
         }
         Raids.MergeFrom(other.Raids);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }