コード例 #1
0
        public EssenceFactory(ItemFactory itemFactory, AffixFactory affixFactory)
        {
            _itemFactory  = itemFactory;
            _affixFactory = affixFactory;

            _essenceItems = _itemFactory.Essence.ToDictionary(x => x.Name, x => x);

            Essence = _fetchEssences.Execute()
                      .Where(x => x.Name != "Remnant of Corruption")
                      .Select(CreateEssence)
                      .ToList();
        }
コード例 #2
0
        public ItemFactory(AffixFactory affixFactory)
        {
            this._affixFactory = affixFactory;
            Items = _fetchBaseItems.Execute().Select(CreateBaseItem).ToList();

            Armour = Items.Where(HasTag("armour")).ToList();

            Jewelry = Items.Where(HasTag("ring", "amulet", "belt", "quiver")).ToList();

            Weapons = Items.Where(HasTag("weapon")).ToList();

            Currency = Items.Where(HasTag("currency")).ToList();

            Essence = Currency.Where(HasTag("essence")).ToList();

            Fossil = Currency.Where(x => x.Name.Contains("Fossil")).ToList();

            Jewel = Items.Where(x => x.ItemClass == "AbyssJewel" || x.ItemClass == "Jewel").ToList();
        }
コード例 #3
0
        public MasterModFactory(AffixFactory affixFactory, ItemFactory itemFactory)
        {
            _affixFactory = affixFactory;
            _itemFactory  = itemFactory;

            var masterMods = _fetchMasterMods.Execute();

            Dictionary <CraftingBenchJson, int> modTiers = new Dictionary <CraftingBenchJson, int>();

            var modsByGroup = masterMods.GroupBy(x => x.BenchGroup);

            foreach (var modsInGroup in modsByGroup)
            {
                var orderedGroup = modsInGroup.OrderByDescending(x => x.BenchTier).ToList();

                for (int i = 0; i < orderedGroup.Count; i++)
                {
                    modTiers.Add(orderedGroup[i], i + 1);
                }
            }

            MasterMod = masterMods.Select(x => CreateMasterMod(x, modTiers))
                        .ToList();
        }
コード例 #4
0
        public FossilFactory(AffixFactory affixFactory)
        {
            _affixFactory = affixFactory;

            Fossils = _fetchFossils.Execute().Select(CreateFossil).ToList();
        }