示例#1
0
 public void MergeFrom(LevelPB other)
 {
     if (other == null)
     {
         return;
     }
     if (other.LevelId != 0)
     {
         LevelId = other.LevelId;
     }
     if (other.BeforeLevelId != 0)
     {
         BeforeLevelId = other.BeforeLevelId;
     }
     if (other.AfterLevelId != 0)
     {
         AfterLevelId = other.AfterLevelId;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     abilities_.Add(other.abilities_);
     itemMax_.Add(other.itemMax_);
     fansMax_.Add(other.fansMax_);
     if (other.Max != 0)
     {
         Max = other.Max;
     }
     eventId_.Add(other.eventId_);
     starSource_.Add(other.starSource_);
     awards_.Add(other.awards_);
     if (other.GameType != 0)
     {
         GameType = other.GameType;
     }
     if (other.LevelInfoId != 0)
     {
         LevelInfoId = other.LevelInfoId;
     }
     if (other.ChapterGroup != 0)
     {
         ChapterGroup = other.ChapterGroup;
     }
     if (other.LevelMark.Length != 0)
     {
         LevelMark = other.LevelMark;
     }
     levelPlot_.Add(other.levelPlot_);
     levelCoordinate_.Add(other.levelCoordinate_);
     levelBackdrop_.Add(other.levelBackdrop_);
     if (other.levelExtra_ != null)
     {
         if (levelExtra_ == null)
         {
             levelExtra_ = new global::Com.Proto.LevelExtraPB();
         }
         LevelExtra.MergeFrom(other.LevelExtra);
     }
 }
示例#2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    LevelId = input.ReadSInt32();
                    break;
                }

                case 16: {
                    BeforeLevelId = input.ReadSInt32();
                    break;
                }

                case 24: {
                    AfterLevelId = input.ReadSInt32();
                    break;
                }

                case 32: {
                    type_ = (global::LevelTypePB)input.ReadEnum();
                    break;
                }

                case 42:
                case 40: {
                    abilities_.AddEntriesFrom(input, _repeated_abilities_codec);
                    break;
                }

                case 50: {
                    itemMax_.AddEntriesFrom(input, _map_itemMax_codec);
                    break;
                }

                case 58: {
                    fansMax_.AddEntriesFrom(input, _map_fansMax_codec);
                    break;
                }

                case 64: {
                    Max = input.ReadSInt32();
                    break;
                }

                case 74:
                case 72: {
                    eventId_.AddEntriesFrom(input, _repeated_eventId_codec);
                    break;
                }

                case 82: {
                    starSource_.AddEntriesFrom(input, _map_starSource_codec);
                    break;
                }

                case 90: {
                    awards_.AddEntriesFrom(input, _repeated_awards_codec);
                    break;
                }

                case 96: {
                    gameType_ = (global::GameTypePB)input.ReadEnum();
                    break;
                }

                case 104: {
                    LevelInfoId = input.ReadSInt32();
                    break;
                }

                case 112: {
                    ChapterGroup = input.ReadSInt32();
                    break;
                }

                case 122: {
                    LevelMark = input.ReadString();
                    break;
                }

                case 130: {
                    levelPlot_.AddEntriesFrom(input, _map_levelPlot_codec);
                    break;
                }

                case 138:
                case 136: {
                    levelCoordinate_.AddEntriesFrom(input, _repeated_levelCoordinate_codec);
                    break;
                }

                case 146: {
                    levelBackdrop_.AddEntriesFrom(input, _repeated_levelBackdrop_codec);
                    break;
                }

                case 154: {
                    if (levelExtra_ == null)
                    {
                        levelExtra_ = new global::Com.Proto.LevelExtraPB();
                    }
                    input.ReadMessage(levelExtra_);
                    break;
                }
                }
            }
        }