示例#1
0
 public void MergeFrom(TestTableArraysTemplate other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id != 0)
     {
         Id = other.Id;
     }
     weapons_.Add(other.weapons_);
     if (other.bornPosition_ != null)
     {
         if (bornPosition_ == null)
         {
             BornPosition = new global::Position3d();
         }
         BornPosition.MergeFrom(other.BornPosition);
     }
     testTypes_.Add(other.testTypes_);
     if (other.LinkId != 0)
     {
         LinkId = other.LinkId;
     }
     if (other.Model.Length != 0)
     {
         Model = other.Model;
     }
     if (other.Icon.Length != 0)
     {
         Icon = other.Icon;
     }
     machineTypes_.Add(other.machineTypes_);
     if (other.MapType.Length != 0)
     {
         MapType = other.MapType;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
示例#2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id != 0)
            {
                hash ^= Id.GetHashCode();
            }
            hash ^= weapons_.GetHashCode();
            if (bornPosition_ != null)
            {
                hash ^= BornPosition.GetHashCode();
            }
            hash ^= testTypes_.GetHashCode();
            if (LinkId != 0)
            {
                hash ^= LinkId.GetHashCode();
            }
            if (Model.Length != 0)
            {
                hash ^= Model.GetHashCode();
            }
            if (Icon.Length != 0)
            {
                hash ^= Icon.GetHashCode();
            }
            hash ^= machineTypes_.GetHashCode();
            if (MapType.Length != 0)
            {
                hash ^= MapType.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }