Пример #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;
     }
 }
Пример #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (ItemType != 0)
            {
                hash ^= ItemType.GetHashCode();
            }
            if (ReourceId != 0)
            {
                hash ^= ReourceId.GetHashCode();
            }
            if (Reource != 0)
            {
                hash ^= Reource.GetHashCode();
            }
            if (EffectValue != 0)
            {
                hash ^= EffectValue.GetHashCode();
            }
            if (appearInfo_ != null)
            {
                hash ^= AppearInfo.GetHashCode();
            }
            if (Speed != 0)
            {
                hash ^= Speed.GetHashCode();
            }
            return(hash);
        }