Example #1
0
 public void MapValues()
 {
     Collectible.TryMapValue();
     SummaryItem.TryMapValue();
     foreach (var itemCategory in ItemCategories)
     {
         itemCategory.TryMapValue();
     }
     BreakerType.TryMapValue();
     DefaultDamageType.TryMapValue();
     if (Stats != null)
     {
         Stats.StatGroup.TryMapValue();
         Stats.PrimaryBaseStat.TryMapValue();
         foreach (var stat in Stats.Stats)
         {
             stat.Key.TryMapValue();
             stat.Value.Stat.TryMapValue();
         }
     }
     TalentGrid?.TalentGrid.TryMapValue();
     if (Value != null)
     {
         foreach (var value in Value.ItemValue)
         {
             value.Item.TryMapValue();
         }
     }
     if (SetData != null)
     {
         foreach (var setDataItem in SetData.ItemList)
         {
             setDataItem.Item.TryMapValue();
         }
     }
     if (Plug != null)
     {
         Plug.EnabledMaterialRequirement.TryMapValue();
         Plug.EnergyCapacity?.EnergyType.TryMapValue();
         Plug.EnergyCost?.EnergyType.TryMapValue();
         Plug.InsertionMaterialRequirement.TryMapValue();
         Plug.PlugCategory.TryMapValue();
         Plug.PreviewItemOverride.TryMapValue();
     }
     if (Preview != null)
     {
         Preview.Artifact.TryMapValue();
         Preview.PreviewVendor.TryMapValue();
         foreach (var category in Preview.DerivedItemCategories)
         {
             foreach (var item in category.Items)
             {
                 item.Item.TryMapValue();
             }
         }
     }
     if (Quality != null)
     {
         Quality.ProgressionLevelRequirement.TryMapValue();
         foreach (var version in Quality.Versions)
         {
             version.PowerCap.TryMapValue();
         }
     }
     if (Objectives != null)
     {
         foreach (var activity in Objectives.DisplayActivities)
         {
             activity.TryMapValue();
         }
         foreach (var objective in Objectives.Objectives)
         {
             objective.TryMapValue();
         }
         Objectives.QuestlineItem.TryMapValue();
         foreach (var property in Objectives.PerObjectiveDisplayProperties)
         {
             property.Activity.TryMapValue();
         }
     }
     Inventory.BucketType.TryMapValue();
     Inventory.TierType.TryMapValue();
     Inventory.RecoveryBucketType.TryMapValue();
     if (Action != null)
     {
         foreach (var reward in Action.ProgressionRewards)
         {
             reward.ProgressionMapping.TryMapValue();
         }
         foreach (var item in Action.RequiredItems)
         {
             item.Item.TryMapValue();
         }
         Action.RewardSheet.TryMapValue();
     }
     if (EquippingBlock != null)
     {
         EquippingBlock.EquipmentSlotType.TryMapValue();
         EquippingBlock.GearsetItem.TryMapValue();
     }
     if (Sockets != null)
     {
         foreach (var intrinsicSocket in Sockets.IntrinsicSockets)
         {
             intrinsicSocket.PlugItem.TryMapValue();
             intrinsicSocket.SocketType.TryMapValue();
         }
         foreach (var socketCategory in Sockets.SocketCategories)
         {
             socketCategory.SocketCategory.TryMapValue();
         }
         foreach (var socket in Sockets.SocketEntries)
         {
             socket.RandomizedPlugSet.TryMapValue();
             socket.ReusablePlugSet.TryMapValue();
             socket.SingleInitialItem.TryMapValue();
             socket.SocketType.TryMapValue();
         }
     }
     foreach (var stat in InvestmentStats)
     {
         stat.StatType.TryMapValue();
     }
     foreach (var perk in Perks)
     {
         perk.Perk.TryMapValue();
     }
     if (Gearset != null)
     {
         foreach (var item in Gearset.Items)
         {
             item.TryMapValue();
         }
     }
     EmblemObjective.TryMapValue();
     if (SourceData != null)
     {
         foreach (var rewardSource in SourceData.RewardSources)
         {
             rewardSource.TryMapValue();
         }
         foreach (var source in SourceData.Sources)
         {
             foreach (var sourceSource in source.Sources)
             {
                 sourceSource.TryMapValue();
             }
         }
         foreach (var vendorSource in SourceData.VendorSources)
         {
             vendorSource.Vendor.TryMapValue();
         }
     }
     if (Metrics != null)
     {
         foreach (var node in Metrics.AvailableMetricCategoryNodes)
         {
             node.TryMapValue();
         }
     }
     Lore.TryMapValue();
     foreach (var type in DamageTypes)
     {
         type.TryMapValue();
     }
     Season.TryMapValue();
 }
Example #2
0
 public bool DeepEquals(DestinyInventoryItemDefinition other)
 {
     return(other != null &&
            Collectible.DeepEquals(other.Collectible) &&
            SummaryItem.DeepEquals(other.SummaryItem) &&
            ItemCategories.DeepEqualsReadOnlyCollections(other.ItemCategories) &&
            AcquireRewardSiteHash == other.AcquireRewardSiteHash &&
            AcquireUnlockHash == other.AcquireUnlockHash &&
            AllowActions == other.AllowActions &&
            (BackgroundColor != null ? BackgroundColor.DeepEquals(other.BackgroundColor) : other.BackgroundColor == null) &&
            BreakerTypeEnumValue == other.BreakerTypeEnumValue &&
            BreakerType.DeepEquals(other.BreakerType) &&
            ClassType == other.ClassType &&
            DefaultDamageTypeEnumValue == other.DefaultDamageTypeEnumValue &&
            DefaultDamageType.DeepEquals(other.DefaultDamageType) &&
            ItemSubType == other.ItemSubType &&
            ItemType == other.ItemType &&
            SpecialItemType == other.SpecialItemType &&
            DisplayProperties.DeepEquals(other.DisplayProperties) &&
            DisplaySource == other.DisplaySource &&
            DoesPostmasterPullHaveSideEffects == other.DoesPostmasterPullHaveSideEffects &&
            Equippable == other.Equippable &&
            IconWatermark == other.IconWatermark &&
            IconWatermarkShelved == other.IconWatermarkShelved &&
            IsWrapper == other.IsWrapper &&
            ItemTypeAndTierDisplayName == other.ItemTypeAndTierDisplayName &&
            ItemTypeDisplayName == other.ItemTypeDisplayName &&
            UiItemDisplayStyle == other.UiItemDisplayStyle &&
            NonTransferrable == other.NonTransferrable &&
            SecondaryIcon == other.SecondaryIcon &&
            SecondaryOverlay == other.SecondaryOverlay &&
            SecondarySpecial == other.SecondarySpecial &&
            Screenshot == other.Screenshot &&
            TooltipStyle == other.TooltipStyle &&
            TraitIds.DeepEqualsReadOnlySimpleCollection(other.TraitIds) &&
            (Stats != null ? Stats.DeepEquals(other.Stats) : other.Stats == null) &&
            (TalentGrid != null ? TalentGrid.DeepEquals(other.TalentGrid) : other.TalentGrid == null) &&
            (TranslationBlock != null ? TranslationBlock.DeepEquals(other.TranslationBlock) : other.TranslationBlock == null) &&
            (Value != null ? Value.DeepEquals(other.Value) : other.Value == null) &&
            (SetData != null ? SetData.DeepEquals(other.SetData) : other.SetData == null) &&
            (Plug != null ? Plug.DeepEquals(other.Plug) : other.Plug == null) &&
            (Preview != null ? Preview.DeepEquals(other.Preview) : other.Preview == null) &&
            (Quality != null ? Quality.DeepEquals(other.Quality) : other.Quality == null) &&
            (Objectives != null ? Objectives.DeepEquals(other.Objectives) : other.Objectives == null) &&
            Inventory.DeepEquals(other.Inventory) &&
            (Action != null ? Action.DeepEquals(other.Action) : other.Action == null) &&
            (EquippingBlock != null ? EquippingBlock.DeepEquals(other.EquippingBlock) : other.EquippingBlock == null) &&
            (Sockets != null ? Sockets.DeepEquals(other.Sockets) : other.Sockets == null) &&
            InvestmentStats.DeepEqualsReadOnlyCollections(other.InvestmentStats) &&
            Perks.DeepEqualsReadOnlyCollections(other.Perks) &&
            TooltipNotifications.DeepEqualsReadOnlyCollections(other.TooltipNotifications) &&
            (Sack != null ? Sack.DeepEquals(other.Sack) : other.Sack == null) &&
            (Gearset != null ? Gearset.DeepEquals(other.Gearset) : other.Gearset == null) &&
            EmblemObjective.DeepEquals(other.EmblemObjective) &&
            (SourceData != null ? SourceData.DeepEquals(other.SourceData) : other.SourceData == null) &&
            (Metrics != null ? Metrics.DeepEquals(other.Metrics) : other.Metrics == null) &&
            (Summary != null ? Summary.DeepEquals(other.Summary) : other.Summary == null) &&
            Lore.DeepEquals(other.Lore) &&
            Animations.DeepEqualsReadOnlyCollections(other.Animations) &&
            Links.DeepEqualsReadOnlyCollections(other.Links) &&
            DamageTypes.DeepEqualsReadOnlyCollections(other.DamageTypes) &&
            DamageTypeEnumValues.DeepEqualsReadOnlySimpleCollection(other.DamageTypeEnumValues) &&
            Season.DeepEquals(other.Season) &&
            Blacklisted == other.Blacklisted &&
            Hash == other.Hash &&
            Index == other.Index &&
            Redacted == other.Redacted);
 }