Exemplo n.º 1
0
        private async Task InitializeAsync()
        {
            var modsTask           = DataUtils.LoadRePoEAsync <Dictionary <string, JsonMod> >("mods", true);
            var benchOptionsTask   = DataUtils.LoadRePoEAsync <JsonCraftingBenchOption[]>("crafting_bench_options", true);
            var statTranslatorTask = StatTranslators.CreateFromMainFileAsync(true);

            ModDatabase = new ModDatabase(await modsTask, await benchOptionsTask);

            ItemBases = await LoadBases();

            UniqueBases = await LoadUniques();

            StatTranslator = await statTranslatorTask;

            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));
        }
Exemplo n.º 2
0
 public static void OneTimeSetUp()
 {
     _statTranslatorTask    = StatTranslators.CreateFromMainFileAsync();
     _uniqueDefinitionsTask = DataUtils.LoadXmlAsync <XmlUniqueList>("Equipment.Uniques.xml");
     _modDefinitionsTask    = LoadModsAsync();
 }
Exemplo n.º 3
0
 public static async Task CreateTranslatorAsync()
 {
     _translator = await StatTranslators.CreateFromMainFileAsync().ConfigureAwait(false);
 }