Ejemplo n.º 1
0
 public void MergeFrom(MessageToServer other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ID != 0L)
     {
         ID = other.ID;
     }
     if (other.CommandType != 0)
     {
         CommandType = other.CommandType;
     }
     if (other.MoveDirection != 0)
     {
         MoveDirection = other.MoveDirection;
     }
     if (other.MoveDuration != 0)
     {
         MoveDuration = other.MoveDuration;
     }
     if (other.ThrowDistance != 0D)
     {
         ThrowDistance = other.ThrowDistance;
     }
     if (other.ThrowAngle != 0D)
     {
         ThrowAngle = other.ThrowAngle;
     }
     if (other.IsThrowDish != false)
     {
         IsThrowDish = other.IsThrowDish;
     }
     if (other.UseType != 0)
     {
         UseType = other.UseType;
     }
     if (other.SpeakText.Length != 0)
     {
         SpeakText = other.SpeakText;
     }
     if (other.Parameter1 != 0D)
     {
         Parameter1 = other.Parameter1;
     }
     if (other.Parameter2 != 0D)
     {
         Parameter2 = other.Parameter2;
     }
     if (other.IsSetTalent != false)
     {
         IsSetTalent = other.IsSetTalent;
     }
     if (other.Talent != 0)
     {
         Talent = other.Talent;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 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: {
                    ID = input.ReadInt64();
                    break;
                }

                case 16: {
                    CommandType = (global::Communication.Proto.CommandType)input.ReadEnum();
                    break;
                }

                case 24: {
                    MoveDirection = (global::Communication.Proto.Direction)input.ReadEnum();
                    break;
                }

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

                case 41: {
                    ThrowDistance = input.ReadDouble();
                    break;
                }

                case 49: {
                    ThrowAngle = input.ReadDouble();
                    break;
                }

                case 56: {
                    IsThrowDish = input.ReadBool();
                    break;
                }

                case 64: {
                    UseType = input.ReadInt32();
                    break;
                }

                case 74: {
                    SpeakText = input.ReadString();
                    break;
                }

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

                case 89: {
                    Parameter2 = input.ReadDouble();
                    break;
                }

                case 96: {
                    IsSetTalent = input.ReadBool();
                    break;
                }

                case 104: {
                    IsPickSelfPosition = input.ReadBool();
                    break;
                }

                case 112: {
                    PickType = (global::Communication.Proto.ObjType)input.ReadEnum();
                    break;
                }

                case 120: {
                    PickDishOrToolType = input.ReadInt32();
                    break;
                }

                case 128: {
                    Talent = (global::Communication.Proto.Talent)input.ReadEnum();
                    break;
                }
                }
            }
        }