Пример #1
0
 public bool DeepEquals(DestinyItemPlugDefinition?other)
 {
     return(other is not null &&
            InsertionRules.DeepEqualsList(other.InsertionRules) &&
            PlugCategoryIdentifier == other.PlugCategoryIdentifier &&
            PlugCategoryHash == other.PlugCategoryHash &&
            OnActionRecreateSelf == other.OnActionRecreateSelf &&
            InsertionMaterialRequirementHash == other.InsertionMaterialRequirementHash &&
            PreviewItemOverrideHash == other.PreviewItemOverrideHash &&
            EnabledMaterialRequirementHash == other.EnabledMaterialRequirementHash &&
            EnabledRules.DeepEqualsList(other.EnabledRules) &&
            UiPlugLabel == other.UiPlugLabel &&
            PlugStyle == other.PlugStyle &&
            PlugAvailability == other.PlugAvailability &&
            AlternateUiPlugLabel == other.AlternateUiPlugLabel &&
            AlternatePlugStyle == other.AlternatePlugStyle &&
            IsDummyPlug == other.IsDummyPlug &&
            (ParentItemOverride is not null ? ParentItemOverride.DeepEquals(other.ParentItemOverride) : other.ParentItemOverride is null) &&
            (EnergyCapacity is not null ? EnergyCapacity.DeepEquals(other.EnergyCapacity) : other.EnergyCapacity is null) &&
            (EnergyCost is not null ? EnergyCost.DeepEquals(other.EnergyCost) : other.EnergyCost is null));
 }
 public bool DeepEquals(InventoryItemPlugBlock other)
 {
     return(other != null &&
            ActionRewardItemOverrideHash == other.ActionRewardItemOverrideHash &&
            ActionRewardSiteHash == other.ActionRewardSiteHash &&
            AlternatePlugStyle == other.AlternatePlugStyle &&
            AlternateUiPlugLabel == other.AlternateUiPlugLabel &&
            ApplyStatsToSocketOwnerItem == other.ApplyStatsToSocketOwnerItem &&
            EnabledMaterialRequirement.DeepEquals(other.EnabledMaterialRequirement) &&
            EnabledRules.DeepEqualsReadOnlyCollections(other.EnabledRules) &&
            InsertionMaterialRequirement.DeepEquals(other.InsertionMaterialRequirement) &&
            InsertionRules.DeepEqualsReadOnlyCollections(other.InsertionRules) &&
            IsDummyPlug == other.IsDummyPlug &&
            OnActionRecreateSelf == other.OnActionRecreateSelf &&
            PlugAvailability == other.PlugAvailability &&
            PlugCategory.DeepEquals(other.PlugCategory) &&
            PlugCategoryIdentifier == other.PlugCategoryIdentifier &&
            PlugStyle == other.PlugStyle &&
            PreviewItemOverride.DeepEquals(other.PreviewItemOverride) &&
            UiPlugLabel == other.UiPlugLabel &&
            (ParentItemOverride != null ? ParentItemOverride.DeepEquals(other.ParentItemOverride) : other.ParentItemOverride == null) &&
            (EnergyCapacity != null ? EnergyCapacity.DeepEquals(other.EnergyCapacity) : other.EnergyCapacity == null) &&
            (EnergyCost != null ? EnergyCost.DeepEquals(other.EnergyCost) : other.EnergyCost == null));
 }
Пример #3
0
 public void Update(DestinyItemPlugDefinition?other)
 {
     if (other is null)
     {
         return;
     }
     if (!InsertionRules.DeepEqualsList(other.InsertionRules))
     {
         InsertionRules = other.InsertionRules;
         OnPropertyChanged(nameof(InsertionRules));
     }
     if (PlugCategoryIdentifier != other.PlugCategoryIdentifier)
     {
         PlugCategoryIdentifier = other.PlugCategoryIdentifier;
         OnPropertyChanged(nameof(PlugCategoryIdentifier));
     }
     if (PlugCategoryHash != other.PlugCategoryHash)
     {
         PlugCategoryHash = other.PlugCategoryHash;
         OnPropertyChanged(nameof(PlugCategoryHash));
     }
     if (OnActionRecreateSelf != other.OnActionRecreateSelf)
     {
         OnActionRecreateSelf = other.OnActionRecreateSelf;
         OnPropertyChanged(nameof(OnActionRecreateSelf));
     }
     if (InsertionMaterialRequirementHash != other.InsertionMaterialRequirementHash)
     {
         InsertionMaterialRequirementHash = other.InsertionMaterialRequirementHash;
         OnPropertyChanged(nameof(InsertionMaterialRequirementHash));
     }
     if (PreviewItemOverrideHash != other.PreviewItemOverrideHash)
     {
         PreviewItemOverrideHash = other.PreviewItemOverrideHash;
         OnPropertyChanged(nameof(PreviewItemOverrideHash));
     }
     if (EnabledMaterialRequirementHash != other.EnabledMaterialRequirementHash)
     {
         EnabledMaterialRequirementHash = other.EnabledMaterialRequirementHash;
         OnPropertyChanged(nameof(EnabledMaterialRequirementHash));
     }
     if (!EnabledRules.DeepEqualsList(other.EnabledRules))
     {
         EnabledRules = other.EnabledRules;
         OnPropertyChanged(nameof(EnabledRules));
     }
     if (UiPlugLabel != other.UiPlugLabel)
     {
         UiPlugLabel = other.UiPlugLabel;
         OnPropertyChanged(nameof(UiPlugLabel));
     }
     if (PlugStyle != other.PlugStyle)
     {
         PlugStyle = other.PlugStyle;
         OnPropertyChanged(nameof(PlugStyle));
     }
     if (PlugAvailability != other.PlugAvailability)
     {
         PlugAvailability = other.PlugAvailability;
         OnPropertyChanged(nameof(PlugAvailability));
     }
     if (AlternateUiPlugLabel != other.AlternateUiPlugLabel)
     {
         AlternateUiPlugLabel = other.AlternateUiPlugLabel;
         OnPropertyChanged(nameof(AlternateUiPlugLabel));
     }
     if (AlternatePlugStyle != other.AlternatePlugStyle)
     {
         AlternatePlugStyle = other.AlternatePlugStyle;
         OnPropertyChanged(nameof(AlternatePlugStyle));
     }
     if (IsDummyPlug != other.IsDummyPlug)
     {
         IsDummyPlug = other.IsDummyPlug;
         OnPropertyChanged(nameof(IsDummyPlug));
     }
     if (!ParentItemOverride.DeepEquals(other.ParentItemOverride))
     {
         ParentItemOverride.Update(other.ParentItemOverride);
         OnPropertyChanged(nameof(ParentItemOverride));
     }
     if (!EnergyCapacity.DeepEquals(other.EnergyCapacity))
     {
         EnergyCapacity.Update(other.EnergyCapacity);
         OnPropertyChanged(nameof(EnergyCapacity));
     }
     if (!EnergyCost.DeepEquals(other.EnergyCost))
     {
         EnergyCost.Update(other.EnergyCost);
         OnPropertyChanged(nameof(EnergyCost));
     }
 }
Пример #4
0
        public bool Equals(DestinyItemPlugDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     InsertionRules == input.InsertionRules ||
                     (InsertionRules != null && InsertionRules.SequenceEqual(input.InsertionRules))
                     ) &&
                 (
                     PlugCategoryIdentifier == input.PlugCategoryIdentifier ||
                     (PlugCategoryIdentifier != null && PlugCategoryIdentifier.Equals(input.PlugCategoryIdentifier))
                 ) &&
                 (
                     PlugCategoryHash == input.PlugCategoryHash ||
                     (PlugCategoryHash.Equals(input.PlugCategoryHash))
                 ) &&
                 (
                     OnActionRecreateSelf == input.OnActionRecreateSelf ||
                     (OnActionRecreateSelf != null && OnActionRecreateSelf.Equals(input.OnActionRecreateSelf))
                 ) &&
                 (
                     InsertionMaterialRequirementHash == input.InsertionMaterialRequirementHash ||
                     (InsertionMaterialRequirementHash.Equals(input.InsertionMaterialRequirementHash))
                 ) &&
                 (
                     PreviewItemOverrideHash == input.PreviewItemOverrideHash ||
                     (PreviewItemOverrideHash.Equals(input.PreviewItemOverrideHash))
                 ) &&
                 (
                     EnabledMaterialRequirementHash == input.EnabledMaterialRequirementHash ||
                     (EnabledMaterialRequirementHash.Equals(input.EnabledMaterialRequirementHash))
                 ) &&
                 (
                     EnabledRules == input.EnabledRules ||
                     (EnabledRules != null && EnabledRules.SequenceEqual(input.EnabledRules))
                 ) &&
                 (
                     UiPlugLabel == input.UiPlugLabel ||
                     (UiPlugLabel != null && UiPlugLabel.Equals(input.UiPlugLabel))
                 ) &&
                 (
                     PlugStyle == input.PlugStyle ||
                     (PlugStyle != null && PlugStyle.Equals(input.PlugStyle))
                 ) &&
                 (
                     PlugAvailability == input.PlugAvailability ||
                     (PlugAvailability != null && PlugAvailability.Equals(input.PlugAvailability))
                 ) &&
                 (
                     AlternateUiPlugLabel == input.AlternateUiPlugLabel ||
                     (AlternateUiPlugLabel != null && AlternateUiPlugLabel.Equals(input.AlternateUiPlugLabel))
                 ) &&
                 (
                     AlternatePlugStyle == input.AlternatePlugStyle ||
                     (AlternatePlugStyle != null && AlternatePlugStyle.Equals(input.AlternatePlugStyle))
                 ) &&
                 (
                     IsDummyPlug == input.IsDummyPlug ||
                     (IsDummyPlug != null && IsDummyPlug.Equals(input.IsDummyPlug))
                 ) &&
                 (
                     ParentItemOverride == input.ParentItemOverride ||
                     (ParentItemOverride != null && ParentItemOverride.Equals(input.ParentItemOverride))
                 ) &&
                 (
                     EnergyCapacity == input.EnergyCapacity ||
                     (EnergyCapacity != null && EnergyCapacity.Equals(input.EnergyCapacity))
                 ) &&
                 (
                     EnergyCost == input.EnergyCost ||
                     (EnergyCost != null && EnergyCost.Equals(input.EnergyCost))
                 ));
        }