Beispiel #1
0
 public void MergeFrom(GameJumpItemRulePB other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ItemType != 0)
     {
         ItemType = other.ItemType;
     }
     if (other.ReourceId != 0)
     {
         ReourceId = other.ReourceId;
     }
     if (other.Reource != 0)
     {
         Reource = other.Reource;
     }
     if (other.EffectValue != 0)
     {
         EffectValue = other.EffectValue;
     }
     if (other.appearInfo_ != null)
     {
         if (appearInfo_ == null)
         {
             appearInfo_ = new global::Com.Proto.GameJumpAppearInfoPB();
         }
         AppearInfo.MergeFrom(other.AppearInfo);
     }
     if (other.Speed != 0)
     {
         Speed = other.Speed;
     }
 }
Beispiel #2
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

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

                case 8: {
                    itemType_ = (global::Com.Proto.ItemTypeEnum)input.ReadEnum();
                    break;
                }

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

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

                case 32: {
                    EffectValue = input.ReadSInt32();
                    break;
                }

                case 42: {
                    if (appearInfo_ == null)
                    {
                        appearInfo_ = new global::Com.Proto.GameJumpAppearInfoPB();
                    }
                    input.ReadMessage(appearInfo_);
                    break;
                }

                case 48: {
                    Speed = input.ReadSInt32();
                    break;
                }
                }
            }
        }