Пример #1
0
 public bool DeepEquals(DestinyProgression?other)
 {
     return(other is not null &&
            ProgressionHash == other.ProgressionHash &&
            DailyProgress == other.DailyProgress &&
            DailyLimit == other.DailyLimit &&
            WeeklyProgress == other.WeeklyProgress &&
            WeeklyLimit == other.WeeklyLimit &&
            CurrentProgress == other.CurrentProgress &&
            Level == other.Level &&
            LevelCap == other.LevelCap &&
            StepIndex == other.StepIndex &&
            ProgressToNextLevel == other.ProgressToNextLevel &&
            NextLevelAt == other.NextLevelAt &&
            CurrentResetCount == other.CurrentResetCount &&
            SeasonResets.DeepEqualsList(other.SeasonResets) &&
            RewardItemStates.DeepEqualsListNaive(other.RewardItemStates));
 }
        public bool Equals(DestinyFactionProgression input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FactionHash == input.FactionHash ||
                     (FactionHash.Equals(input.FactionHash))
                     ) &&
                 (
                     FactionVendorIndex == input.FactionVendorIndex ||
                     (FactionVendorIndex.Equals(input.FactionVendorIndex))
                 ) &&
                 (
                     ProgressionHash == input.ProgressionHash ||
                     (ProgressionHash.Equals(input.ProgressionHash))
                 ) &&
                 (
                     DailyProgress == input.DailyProgress ||
                     (DailyProgress.Equals(input.DailyProgress))
                 ) &&
                 (
                     DailyLimit == input.DailyLimit ||
                     (DailyLimit.Equals(input.DailyLimit))
                 ) &&
                 (
                     WeeklyProgress == input.WeeklyProgress ||
                     (WeeklyProgress.Equals(input.WeeklyProgress))
                 ) &&
                 (
                     WeeklyLimit == input.WeeklyLimit ||
                     (WeeklyLimit.Equals(input.WeeklyLimit))
                 ) &&
                 (
                     CurrentProgress == input.CurrentProgress ||
                     (CurrentProgress.Equals(input.CurrentProgress))
                 ) &&
                 (
                     Level == input.Level ||
                     (Level.Equals(input.Level))
                 ) &&
                 (
                     LevelCap == input.LevelCap ||
                     (LevelCap.Equals(input.LevelCap))
                 ) &&
                 (
                     StepIndex == input.StepIndex ||
                     (StepIndex.Equals(input.StepIndex))
                 ) &&
                 (
                     ProgressToNextLevel == input.ProgressToNextLevel ||
                     (ProgressToNextLevel.Equals(input.ProgressToNextLevel))
                 ) &&
                 (
                     NextLevelAt == input.NextLevelAt ||
                     (NextLevelAt.Equals(input.NextLevelAt))
                 ) &&
                 (
                     CurrentResetCount == input.CurrentResetCount ||
                     (CurrentResetCount.Equals(input.CurrentResetCount))
                 ) &&
                 (
                     SeasonResets == input.SeasonResets ||
                     (SeasonResets != null && SeasonResets.SequenceEqual(input.SeasonResets))
                 ) &&
                 (
                     RewardItemStates == input.RewardItemStates ||
                     (RewardItemStates != null && RewardItemStates.SequenceEqual(input.RewardItemStates))
                 ));
        }
Пример #3
0
 public void Update(DestinyProgression?other)
 {
     if (other is null)
     {
         return;
     }
     if (ProgressionHash != other.ProgressionHash)
     {
         ProgressionHash = other.ProgressionHash;
         OnPropertyChanged(nameof(ProgressionHash));
     }
     if (DailyProgress != other.DailyProgress)
     {
         DailyProgress = other.DailyProgress;
         OnPropertyChanged(nameof(DailyProgress));
     }
     if (DailyLimit != other.DailyLimit)
     {
         DailyLimit = other.DailyLimit;
         OnPropertyChanged(nameof(DailyLimit));
     }
     if (WeeklyProgress != other.WeeklyProgress)
     {
         WeeklyProgress = other.WeeklyProgress;
         OnPropertyChanged(nameof(WeeklyProgress));
     }
     if (WeeklyLimit != other.WeeklyLimit)
     {
         WeeklyLimit = other.WeeklyLimit;
         OnPropertyChanged(nameof(WeeklyLimit));
     }
     if (CurrentProgress != other.CurrentProgress)
     {
         CurrentProgress = other.CurrentProgress;
         OnPropertyChanged(nameof(CurrentProgress));
     }
     if (Level != other.Level)
     {
         Level = other.Level;
         OnPropertyChanged(nameof(Level));
     }
     if (LevelCap != other.LevelCap)
     {
         LevelCap = other.LevelCap;
         OnPropertyChanged(nameof(LevelCap));
     }
     if (StepIndex != other.StepIndex)
     {
         StepIndex = other.StepIndex;
         OnPropertyChanged(nameof(StepIndex));
     }
     if (ProgressToNextLevel != other.ProgressToNextLevel)
     {
         ProgressToNextLevel = other.ProgressToNextLevel;
         OnPropertyChanged(nameof(ProgressToNextLevel));
     }
     if (NextLevelAt != other.NextLevelAt)
     {
         NextLevelAt = other.NextLevelAt;
         OnPropertyChanged(nameof(NextLevelAt));
     }
     if (CurrentResetCount != other.CurrentResetCount)
     {
         CurrentResetCount = other.CurrentResetCount;
         OnPropertyChanged(nameof(CurrentResetCount));
     }
     if (!SeasonResets.DeepEqualsList(other.SeasonResets))
     {
         SeasonResets = other.SeasonResets;
         OnPropertyChanged(nameof(SeasonResets));
     }
     if (!RewardItemStates.DeepEqualsListNaive(other.RewardItemStates))
     {
         RewardItemStates = other.RewardItemStates;
         OnPropertyChanged(nameof(RewardItemStates));
     }
 }