Exemple #1
0
 public void MergeFrom(SrvRes other)
 {
     if (other == null)
     {
         return;
     }
     if (other.MethodId != global::Lspb.SrvMsgType.ErrorClientType)
     {
         MethodId = other.MethodId;
     }
     if (other.Result != global::Lspb.Result.Success)
     {
         Result = other.Result;
     }
     if (other.ErrStr.Length != 0)
     {
         ErrStr = other.ErrStr;
     }
     if (other.srvEnterRoom_ != null)
     {
         if (srvEnterRoom_ == null)
         {
             SrvEnterRoom = new global::Lspb.SrvEnterRoom();
         }
         SrvEnterRoom.MergeFrom(other.SrvEnterRoom);
     }
     if (other.srvInitOver_ != null)
     {
         if (srvInitOver_ == null)
         {
             SrvInitOver = new global::Lspb.SrvInitOver();
         }
         SrvInitOver.MergeFrom(other.SrvInitOver);
     }
     if (other.bGameInit_ != null)
     {
         if (bGameInit_ == null)
         {
             BGameInit = new global::Lspb.BGameInit();
         }
         BGameInit.MergeFrom(other.BGameInit);
     }
     if (other.bGameStart_ != null)
     {
         if (bGameStart_ == null)
         {
             BGameStart = new global::Lspb.BGameStart();
         }
         BGameStart.MergeFrom(other.BGameStart);
     }
     if (other.bGameFrame_ != null)
     {
         if (bGameFrame_ == null)
         {
             BGameFrame = new global::Lspb.BGameFrame();
         }
         BGameFrame.MergeFrom(other.BGameFrame);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemple #2
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 8: {
                    MethodId = (global::Lspb.SrvMsgType)input.ReadEnum();
                    break;
                }

                case 16: {
                    Result = (global::Lspb.Result)input.ReadEnum();
                    break;
                }

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

                case 810: {
                    if (srvEnterRoom_ == null)
                    {
                        SrvEnterRoom = new global::Lspb.SrvEnterRoom();
                    }
                    input.ReadMessage(SrvEnterRoom);
                    break;
                }

                case 818: {
                    if (srvInitOver_ == null)
                    {
                        SrvInitOver = new global::Lspb.SrvInitOver();
                    }
                    input.ReadMessage(SrvInitOver);
                    break;
                }

                case 8010: {
                    if (bGameInit_ == null)
                    {
                        BGameInit = new global::Lspb.BGameInit();
                    }
                    input.ReadMessage(BGameInit);
                    break;
                }

                case 8018: {
                    if (bGameStart_ == null)
                    {
                        BGameStart = new global::Lspb.BGameStart();
                    }
                    input.ReadMessage(BGameStart);
                    break;
                }

                case 8026: {
                    if (bGameFrame_ == null)
                    {
                        BGameFrame = new global::Lspb.BGameFrame();
                    }
                    input.ReadMessage(BGameFrame);
                    break;
                }
                }
            }
        }