Example #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ContentId.GetHashCode();
         hashCode = (hashCode * 397) ^ Id.GetHashCode();
         hashCode = (hashCode * 397) ^ (RequisitionPacks?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ Xp;
         return(hashCode);
     }
 }
Example #2
0
        public bool Equals(Reward other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(ContentId.Equals(other.ContentId) &&
                   Id.Equals(other.Id) &&
                   RequisitionPacks.OrderBy(rp => rp.Id).SequenceEqual(other.RequisitionPacks.OrderBy(rp => rp.Id)) &&
                   Xp == other.Xp);
        }