public void Update(DestinyTalentNode?other)
 {
     if (other is null)
     {
         return;
     }
     if (NodeIndex != other.NodeIndex)
     {
         NodeIndex = other.NodeIndex;
         OnPropertyChanged(nameof(NodeIndex));
     }
     if (NodeHash != other.NodeHash)
     {
         NodeHash = other.NodeHash;
         OnPropertyChanged(nameof(NodeHash));
     }
     if (State != other.State)
     {
         State = other.State;
         OnPropertyChanged(nameof(State));
     }
     if (IsActivated != other.IsActivated)
     {
         IsActivated = other.IsActivated;
         OnPropertyChanged(nameof(IsActivated));
     }
     if (StepIndex != other.StepIndex)
     {
         StepIndex = other.StepIndex;
         OnPropertyChanged(nameof(StepIndex));
     }
     if (!MaterialsToUpgrade.DeepEqualsList(other.MaterialsToUpgrade))
     {
         MaterialsToUpgrade = other.MaterialsToUpgrade;
         OnPropertyChanged(nameof(MaterialsToUpgrade));
     }
     if (ActivationGridLevel != other.ActivationGridLevel)
     {
         ActivationGridLevel = other.ActivationGridLevel;
         OnPropertyChanged(nameof(ActivationGridLevel));
     }
     if (ProgressPercent != other.ProgressPercent)
     {
         ProgressPercent = other.ProgressPercent;
         OnPropertyChanged(nameof(ProgressPercent));
     }
     if (Hidden != other.Hidden)
     {
         Hidden = other.Hidden;
         OnPropertyChanged(nameof(Hidden));
     }
     if (!NodeStatsBlock.DeepEquals(other.NodeStatsBlock))
     {
         NodeStatsBlock.Update(other.NodeStatsBlock);
         OnPropertyChanged(nameof(NodeStatsBlock));
     }
 }
 public bool DeepEquals(DestinyTalentNode?other)
 {
     return(other is not null &&
            NodeIndex == other.NodeIndex &&
            NodeHash == other.NodeHash &&
            State == other.State &&
            IsActivated == other.IsActivated &&
            StepIndex == other.StepIndex &&
            MaterialsToUpgrade.DeepEqualsList(other.MaterialsToUpgrade) &&
            ActivationGridLevel == other.ActivationGridLevel &&
            ProgressPercent == other.ProgressPercent &&
            Hidden == other.Hidden &&
            (NodeStatsBlock is not null ? NodeStatsBlock.DeepEquals(other.NodeStatsBlock) : other.NodeStatsBlock is null));
 }
Beispiel #3
0
        public bool Equals(DestinyTalentNode input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     NodeIndex == input.NodeIndex ||
                     (NodeIndex.Equals(input.NodeIndex))
                     ) &&
                 (
                     NodeHash == input.NodeHash ||
                     (NodeHash.Equals(input.NodeHash))
                 ) &&
                 (
                     State == input.State ||
                     (State != null && State.Equals(input.State))
                 ) &&
                 (
                     IsActivated == input.IsActivated ||
                     (IsActivated != null && IsActivated.Equals(input.IsActivated))
                 ) &&
                 (
                     StepIndex == input.StepIndex ||
                     (StepIndex.Equals(input.StepIndex))
                 ) &&
                 (
                     MaterialsToUpgrade == input.MaterialsToUpgrade ||
                     (MaterialsToUpgrade != null && MaterialsToUpgrade.SequenceEqual(input.MaterialsToUpgrade))
                 ) &&
                 (
                     ActivationGridLevel == input.ActivationGridLevel ||
                     (ActivationGridLevel.Equals(input.ActivationGridLevel))
                 ) &&
                 (
                     ProgressPercent == input.ProgressPercent ||
                     (ProgressPercent.Equals(input.ProgressPercent))
                 ) &&
                 (
                     Hidden == input.Hidden ||
                     (Hidden != null && Hidden.Equals(input.Hidden))
                 ) &&
                 (
                     NodeStatsBlock == input.NodeStatsBlock ||
                     (NodeStatsBlock != null && NodeStatsBlock.Equals(input.NodeStatsBlock))
                 ));
        }