Ejemplo n.º 1
0
        public override void EndEffects()
        {
            ColUtility.ForEach(Skulls.Where(i => i != null && !i.Deleted), i => i.Delete());
            ColUtility.Free(Skulls);

            BuffInfo.RemoveBuff(Caster, BuffIcon.Conduit);
        }
Ejemplo n.º 2
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = AllSkullsOn.GetHashCode();
         hashCode = (hashCode * 397) ^ FastestCompletionTime.GetHashCode();
         hashCode = (hashCode * 397) ^ HighestScore;
         hashCode = (hashCode * 397) ^ (Skulls?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ TotalTimesCompleted;
         return(hashCode);
     }
 }
Ejemplo n.º 3
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (int)Difficulty;
         hashCode = (hashCode * 397) ^ MissionCompleted.GetHashCode();
         hashCode = (hashCode * 397) ^ (PlayerStats?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Skulls?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ TotalMissionPlaythroughTime.GetHashCode();
         return(hashCode);
     }
 }
Ejemplo n.º 4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Id;
         hashCode = (hashCode * 397) ^ MaxScore;
         hashCode = (hashCode * 397) ^ (CriticalObjectives?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (BonusObjectives?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (OptionalObjectives?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Skulls?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (AwardedPacks?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (DisplayInfo != null ? DisplayInfo.GetHashCode() : 0);
         return(hashCode);
     }
 }
Ejemplo n.º 5
0
        public bool Equals(DifficultyStat other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(AllSkullsOn == other.AllSkullsOn &&
                   FastestCompletionTime.Equals(other.FastestCompletionTime) &&
                   HighestScore == other.HighestScore &&
                   Skulls.OrderBy(s => s).SequenceEqual(other.Skulls.OrderBy(s => s)) &&
                   TotalTimesCompleted == other.TotalTimesCompleted);
        }
Ejemplo n.º 6
0
        public bool Equals(CampaignMatch other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(base.Equals(other) &&
                   Difficulty == other.Difficulty &&
                   MissionCompleted == other.MissionCompleted &&
                   PlayerStats.OrderBy(ps => ps.Player.Gamertag).SequenceEqual(other.PlayerStats.OrderBy(ps => ps.Player.Gamertag)) &&
                   Skulls.OrderBy(s => s).SequenceEqual(other.Skulls.OrderBy(s => s)) &&
                   TotalMissionPlaythroughTime.Equals(other.TotalMissionPlaythroughTime));
        }
Ejemplo n.º 7
0
        public bool Equals(CampaignLevel other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }

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

            return(Id == other.Id &&
                   MaxScore == other.MaxScore &&
                   CriticalObjectives.OrderBy(o => o.Id).SequenceEqual(other.CriticalObjectives.OrderBy(o => o.Id)) &&
                   BonusObjectives.OrderBy(o => o.Id).SequenceEqual(other.BonusObjectives.OrderBy(o => o.Id)) &&
                   OptionalObjectives.OrderBy(o => o.Id).SequenceEqual(other.OptionalObjectives.OrderBy(o => o.Id)) &&
                   Skulls.OrderBy(s => s.Id).SequenceEqual(other.Skulls.OrderBy(s => s.Id)) &&
                   AwardedPacks.OrderBy(s => s.Id).SequenceEqual(other.AwardedPacks.OrderBy(s => s.Id)) &&
                   Equals(DisplayInfo, other.DisplayInfo));
        }