Ejemplo n.º 1
0
        public async Task <IEnumerable <DestinyInventoryItemDefinition> > GetModsFromManifest()
        {
            var manifestMods = await _manifest.LoadInventoryItemsWithCategory(WeaponModsDamageCategoryHash);

            var filteredMods = manifestMods.Where(mod =>
                                                  !mod.ItemCategoryHashes.Contains(DummiesCategoryHash) &&    // some mods for weapon damage have this category (?)
                                                  !mod.DisplayProperties.Description.Contains("deprecated")); // year 1 mods

            return(filteredMods);
        }
Ejemplo n.º 2
0
        private async Task <IEnumerable <DestinyInventoryItemDefinition> > LoadArmorMods()
        {
            var armorMods = await _manifest.LoadInventoryItemsWithCategory(ArmorModsCategory);

            armorMods = armorMods.Where(mod =>
            {
                if (_modCategoryHashes.Overlaps(mod.ItemCategoryHashes))
                {
                    return(true);
                }

                // All mods have at least the Mod category and ArmorMod category.
                // Mods with only those categories are the "General Armor Mods".
                // Return those only.
                return(mod.ItemCategoryHashes.Count() == 2);
            });

            return(armorMods);
        }