public bool DeepEquals(DestinyNodeStepDefinition?other)
 {
     return(other is not null &&
            (DisplayProperties is not null ? DisplayProperties.DeepEquals(other.DisplayProperties) : other.DisplayProperties is null) &&
            StepIndex == other.StepIndex &&
            NodeStepHash == other.NodeStepHash &&
            InteractionDescription == other.InteractionDescription &&
            DamageType == other.DamageType &&
            DamageTypeHash == other.DamageTypeHash &&
            (ActivationRequirement is not null ? ActivationRequirement.DeepEquals(other.ActivationRequirement) : other.ActivationRequirement is null) &&
            CanActivateNextStep == other.CanActivateNextStep &&
            NextStepIndex == other.NextStepIndex &&
            IsNextStepRandom == other.IsNextStepRandom &&
            PerkHashes.DeepEqualsListNaive(other.PerkHashes) &&
            StartProgressionBarAtProgress == other.StartProgressionBarAtProgress &&
            StatHashes.DeepEqualsListNaive(other.StatHashes) &&
            AffectsQuality == other.AffectsQuality &&
            (StepGroups is not null ? StepGroups.DeepEquals(other.StepGroups) : other.StepGroups is null) &&
            AffectsLevel == other.AffectsLevel &&
            SocketReplacements.DeepEqualsList(other.SocketReplacements));
 }
 public bool DeepEquals(TalentGridNodeStep other)
 {
     return(other != null &&
            DisplayProperties.DeepEquals(other.DisplayProperties) &&
            StepIndex == other.StepIndex &&
            NodeStepHash == other.NodeStepHash &&
            InteractionDescription == other.InteractionDescription &&
            DamageTypeEnumValue == other.DamageTypeEnumValue &&
            DamageType.DeepEquals(other.DamageType) &&
            ActivationRequirement.DeepEquals(other.ActivationRequirement) &&
            CanActivateNextStep == other.CanActivateNextStep &&
            NextStepIndex == other.NextStepIndex &&
            IsNextStepRandom == other.IsNextStepRandom &&
            Perks.DeepEqualsReadOnlyCollections(other.Perks) &&
            StartProgressionBarAtProgress == other.StartProgressionBarAtProgress &&
            Stats.DeepEqualsReadOnlyCollections(other.Stats) &&
            AffectsQuality == other.AffectsQuality &&
            StepGroups.DeepEquals(other.StepGroups) &&
            AffectsLevel == other.AffectsLevel &&
            SocketReplacements.DeepEqualsReadOnlyCollections(other.SocketReplacements) &&
            TruePropertyIndex == other.TruePropertyIndex &&
            TrueStepIndex == other.TrueStepIndex);
 }
Exemplo n.º 3
0
        protected virtual void ManageActivationState(SDK_BaseController.ControllerHand hand, ActivationRequirement activationRequirement, bool pressedState, ref bool leftActivationState, ref bool rightActivationState, ref bool activated)
        {
            switch (hand)
            {
            case SDK_BaseController.ControllerHand.Left:
                leftActivationState = pressedState;;
                break;

            case SDK_BaseController.ControllerHand.Right:
                rightActivationState = pressedState;;
                break;
            }

            switch (activationRequirement)
            {
            case ActivationRequirement.LeftControllerOnly:
                activated = (rightActivationState ? false : leftActivationState);
                break;

            case ActivationRequirement.RightControllerOnly:
                activated = (leftActivationState ? false : rightActivationState);
                break;

            case ActivationRequirement.LeftController:
                activated = leftActivationState;
                break;

            case ActivationRequirement.RightController:
                activated = rightActivationState;
                break;

            case ActivationRequirement.EitherController:
                activated = (leftActivationState || rightActivationState);
                break;

            case ActivationRequirement.BothControllers:
                activated = (leftActivationState && rightActivationState);
                break;
            }
        }
Exemplo n.º 4
0
        public bool Equals(DestinyNodeStepDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DisplayProperties == input.DisplayProperties ||
                     (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties))
                     ) &&
                 (
                     StepIndex == input.StepIndex ||
                     (StepIndex.Equals(input.StepIndex))
                 ) &&
                 (
                     NodeStepHash == input.NodeStepHash ||
                     (NodeStepHash.Equals(input.NodeStepHash))
                 ) &&
                 (
                     InteractionDescription == input.InteractionDescription ||
                     (InteractionDescription != null && InteractionDescription.Equals(input.InteractionDescription))
                 ) &&
                 (
                     DamageType == input.DamageType ||
                     (DamageType != null && DamageType.Equals(input.DamageType))
                 ) &&
                 (
                     DamageTypeHash == input.DamageTypeHash ||
                     (DamageTypeHash.Equals(input.DamageTypeHash))
                 ) &&
                 (
                     ActivationRequirement == input.ActivationRequirement ||
                     (ActivationRequirement != null && ActivationRequirement.Equals(input.ActivationRequirement))
                 ) &&
                 (
                     CanActivateNextStep == input.CanActivateNextStep ||
                     (CanActivateNextStep != null && CanActivateNextStep.Equals(input.CanActivateNextStep))
                 ) &&
                 (
                     NextStepIndex == input.NextStepIndex ||
                     (NextStepIndex.Equals(input.NextStepIndex))
                 ) &&
                 (
                     IsNextStepRandom == input.IsNextStepRandom ||
                     (IsNextStepRandom != null && IsNextStepRandom.Equals(input.IsNextStepRandom))
                 ) &&
                 (
                     PerkHashes == input.PerkHashes ||
                     (PerkHashes != null && PerkHashes.SequenceEqual(input.PerkHashes))
                 ) &&
                 (
                     StartProgressionBarAtProgress == input.StartProgressionBarAtProgress ||
                     (StartProgressionBarAtProgress.Equals(input.StartProgressionBarAtProgress))
                 ) &&
                 (
                     StatHashes == input.StatHashes ||
                     (StatHashes != null && StatHashes.SequenceEqual(input.StatHashes))
                 ) &&
                 (
                     AffectsQuality == input.AffectsQuality ||
                     (AffectsQuality != null && AffectsQuality.Equals(input.AffectsQuality))
                 ) &&
                 (
                     StepGroups == input.StepGroups ||
                     (StepGroups != null && StepGroups.Equals(input.StepGroups))
                 ) &&
                 (
                     AffectsLevel == input.AffectsLevel ||
                     (AffectsLevel != null && AffectsLevel.Equals(input.AffectsLevel))
                 ) &&
                 (
                     SocketReplacements == input.SocketReplacements ||
                     (SocketReplacements != null && SocketReplacements.SequenceEqual(input.SocketReplacements))
                 ));
        }
 public void Update(DestinyNodeStepDefinition?other)
 {
     if (other is null)
     {
         return;
     }
     if (!DisplayProperties.DeepEquals(other.DisplayProperties))
     {
         DisplayProperties.Update(other.DisplayProperties);
         OnPropertyChanged(nameof(DisplayProperties));
     }
     if (StepIndex != other.StepIndex)
     {
         StepIndex = other.StepIndex;
         OnPropertyChanged(nameof(StepIndex));
     }
     if (NodeStepHash != other.NodeStepHash)
     {
         NodeStepHash = other.NodeStepHash;
         OnPropertyChanged(nameof(NodeStepHash));
     }
     if (InteractionDescription != other.InteractionDescription)
     {
         InteractionDescription = other.InteractionDescription;
         OnPropertyChanged(nameof(InteractionDescription));
     }
     if (DamageType != other.DamageType)
     {
         DamageType = other.DamageType;
         OnPropertyChanged(nameof(DamageType));
     }
     if (DamageTypeHash != other.DamageTypeHash)
     {
         DamageTypeHash = other.DamageTypeHash;
         OnPropertyChanged(nameof(DamageTypeHash));
     }
     if (!ActivationRequirement.DeepEquals(other.ActivationRequirement))
     {
         ActivationRequirement.Update(other.ActivationRequirement);
         OnPropertyChanged(nameof(ActivationRequirement));
     }
     if (CanActivateNextStep != other.CanActivateNextStep)
     {
         CanActivateNextStep = other.CanActivateNextStep;
         OnPropertyChanged(nameof(CanActivateNextStep));
     }
     if (NextStepIndex != other.NextStepIndex)
     {
         NextStepIndex = other.NextStepIndex;
         OnPropertyChanged(nameof(NextStepIndex));
     }
     if (IsNextStepRandom != other.IsNextStepRandom)
     {
         IsNextStepRandom = other.IsNextStepRandom;
         OnPropertyChanged(nameof(IsNextStepRandom));
     }
     if (!PerkHashes.DeepEqualsListNaive(other.PerkHashes))
     {
         PerkHashes = other.PerkHashes;
         OnPropertyChanged(nameof(PerkHashes));
     }
     if (StartProgressionBarAtProgress != other.StartProgressionBarAtProgress)
     {
         StartProgressionBarAtProgress = other.StartProgressionBarAtProgress;
         OnPropertyChanged(nameof(StartProgressionBarAtProgress));
     }
     if (!StatHashes.DeepEqualsListNaive(other.StatHashes))
     {
         StatHashes = other.StatHashes;
         OnPropertyChanged(nameof(StatHashes));
     }
     if (AffectsQuality != other.AffectsQuality)
     {
         AffectsQuality = other.AffectsQuality;
         OnPropertyChanged(nameof(AffectsQuality));
     }
     if (!StepGroups.DeepEquals(other.StepGroups))
     {
         StepGroups.Update(other.StepGroups);
         OnPropertyChanged(nameof(StepGroups));
     }
     if (AffectsLevel != other.AffectsLevel)
     {
         AffectsLevel = other.AffectsLevel;
         OnPropertyChanged(nameof(AffectsLevel));
     }
     if (!SocketReplacements.DeepEqualsList(other.SocketReplacements))
     {
         SocketReplacements = other.SocketReplacements;
         OnPropertyChanged(nameof(SocketReplacements));
     }
 }