Beispiel #1
0
 public void MergeFrom(PBLoginSucc other)
 {
     if (other == null)
     {
         return;
     }
     if (other.UserId != 0)
     {
         UserId = other.UserId;
     }
     if (other.PlayerId != 0L)
     {
         PlayerId = other.PlayerId;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Tili != 0)
     {
         Tili = other.Tili;
     }
     if (other.Jingli != 0)
     {
         Jingli = other.Jingli;
     }
     if (other.BattleScore != 0L)
     {
         BattleScore = other.BattleScore;
     }
     resMap_.Add(other.resMap_);
     heroList_.Add(other.heroList_);
     equipList_.Add(other.equipList_);
     if (other.formation_ != null)
     {
         if (formation_ == null)
         {
             formation_ = new global::Proto.PBFormation();
         }
         Formation.MergeFrom(other.Formation);
     }
 }
Beispiel #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    UserId = input.ReadInt32();
                    break;
                }

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

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

                case 32: {
                    Tili = input.ReadInt32();
                    break;
                }

                case 40: {
                    Jingli = input.ReadInt32();
                    break;
                }

                case 48: {
                    BattleScore = input.ReadInt64();
                    break;
                }

                case 58: {
                    resMap_.AddEntriesFrom(input, _map_resMap_codec);
                    break;
                }

                case 66: {
                    heroList_.AddEntriesFrom(input, _repeated_heroList_codec);
                    break;
                }

                case 74: {
                    equipList_.AddEntriesFrom(input, _repeated_equipList_codec);
                    break;
                }

                case 82: {
                    if (formation_ == null)
                    {
                        formation_ = new global::Proto.PBFormation();
                    }
                    input.ReadMessage(formation_);
                    break;
                }
                }
            }
        }