コード例 #1
0
 public void MergeFrom(ActiveBuff other)
 {
     if (other == null)
     {
         return;
     }
     if (other.GmtBuffId.Length != 0)
     {
         GmtBuffId = other.GmtBuffId;
     }
     if (other.expiration_ != null)
     {
         if (expiration_ == null)
         {
             Expiration = new global::WUProtos.Data.Buff.ActiveBuffExpiration();
         }
         Expiration.MergeFrom(other.Expiration);
     }
     if (other.source_ != null)
     {
         if (source_ == null)
         {
             Source = new global::WUProtos.Data.Buff.ActiveBuffSource();
         }
         Source.MergeFrom(other.Source);
     }
     if (other.StartTimeMs != 0L)
     {
         StartTimeMs = other.StartTimeMs;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
コード例 #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 10: {
                    GmtBuffId = input.ReadString();
                    break;
                }

                case 18: {
                    if (expiration_ == null)
                    {
                        Expiration = new global::WUProtos.Data.Buff.ActiveBuffExpiration();
                    }
                    input.ReadMessage(Expiration);
                    break;
                }

                case 26: {
                    if (source_ == null)
                    {
                        Source = new global::WUProtos.Data.Buff.ActiveBuffSource();
                    }
                    input.ReadMessage(Source);
                    break;
                }

                case 40: {
                    StartTimeMs = input.ReadInt64();
                    break;
                }
                }
            }
        }