Example #1
0
 public static bool Equals(QuestItem left, QuestItem right)
 {
     if (left is null && right is null)
     {
         return(true);
     }
     if (left is null ^ right is null)
     {
         return(false);
     }
     return(string.Equals(left.Name, right.Name, StringComparison.OrdinalIgnoreCase) &&
            left.RequiredCount == right.RequiredCount &&
            left.CurrentCount == right.CurrentCount &&
            !left.AvailableLocations.Except(right.AvailableLocations).Any() &&
            !right.AvailableLocations.Except(left.AvailableLocations).Any());
 }
Example #2
0
 /// <summary>Replaces an instance of <see cref="QuestItem"/> with another instance.</summary>
 /// <param name="other">Instance of <see cref="QuestItem"/> to replace this instance</param>
 public QuestItem(QuestItem other) : this(other.Name, other.AvailableLocations, other.RequiredCount, other.CurrentCount)
 {
 }
Example #3
0
 public bool Equals(QuestItem other) => Equals(this, other);