Exemplo n.º 1
0
        private static async Task <StatTranslator> InitializeAsync()
        {
            var translations = await RePoEUtils
                               .LoadAsync <List <JsonStatTranslation> >("stat_translations");

            return(new StatTranslator(translations));
        }
Exemplo n.º 2
0
        private async Task InitializeAsync()
        {
            _mods = await RePoEUtils.LoadAsync <Dictionary <string, JsonMod> >("mods");

            _benchOptions = await RePoEUtils.LoadAsync <JsonCraftingBenchOption[]>("crafting_bench_options");

            _npcMasters = await RePoEUtils.LoadAsync <Dictionary <string, JsonNpcMaster> >("npc_master");

            _modDatabase = new ModDatabase(_mods, _benchOptions, _npcMasters);
        }
Exemplo n.º 3
0
        private async Task InitializeAsync()
        {
            var modsTask             = RePoEUtils.LoadAsync <Dictionary <string, JsonMod> >("mods");
            var benchOptionsTask     = RePoEUtils.LoadAsync <JsonCraftingBenchOption[]>("crafting_bench_options");
            var npcMastersTask       = RePoEUtils.LoadAsync <Dictionary <string, JsonNpcMaster> >("npc_master");
            var statTranslationsTask = RePoEUtils.LoadAsync <List <JsonStatTranslation> >("stat_translations");

            ModDatabase    = new ModDatabase(await modsTask, await benchOptionsTask, await npcMastersTask);
            StatTranslator = new StatTranslator(await statTranslationsTask);

            ItemBases   = (await LoadBases()).ToList();
            UniqueBases = (await LoadUniques()).ToList();

            ItemBaseDictionary   = ItemBases.DistinctBy(b => b.Name).ToDictionary(b => b.Name);
            UniqueBaseDictionary = UniqueBases.DistinctBy(b => b.UniqueName).ToDictionary(b => b.UniqueName);

            _root = new WordSetTreeNode(ItemBases.Select(m => m.Name));
        }