Пример #1
0
 private void Mods_Filter(object sender, TextChangedEventArgs e)
 {
     if (EnchantmentsView.IsVisible)
     {
         RefreshEnchantmentsView();
     }
     WeightedModsDisplay.RefreshListViews();
     CraftedModsDisplay.RefreshListViews();
     SpecialModsDisplay.RefreshListViews();
 }
Пример #2
0
        public void UpdateCrafts()
        {
            if (Bench == null || Bench.BenchItem == null)
            {
                CraftedModsDisplay.UpdateData(new Dictionary <PoEModData, object>());
                SpecialModsDisplay.UpdateData(new Dictionary <PoEModData, object>());
                return;
            }
            PoEBaseItemData itemtemplate = CraftingDatabase.AllBaseItems[Bench.BenchItem.SourceData];
            IDictionary <PoEModData, IDictionary <string, int> > results = ModLogic.FindValidBenchMods(itemtemplate, CraftingDatabase.BenchOptions, CraftingDatabase.AllMods);
            Dictionary <PoEModData, object> mods = new Dictionary <PoEModData, object>();

            foreach (PoEModData d in results.Keys)
            {
                mods.Add(d, results[d]);
            }
            CraftedModsDisplay.UpdateData(mods);
            IDictionary <PoEModData, object> specresults = new Dictionary <PoEModData, object>();

            if (CraftingDatabase.DelveDroponlyMods.ContainsKey(itemtemplate.item_class))
            {
                foreach (string modid in CraftingDatabase.DelveDroponlyMods[itemtemplate.item_class])
                {
                    if (CraftingDatabase.AllMods.ContainsKey(modid))
                    {
                        specresults.Add(CraftingDatabase.AllMods[modid], "Drop-only: Delve");
                    }
                }
            }
            if (CraftingDatabase.IncursionDroponlyMods.ContainsKey(itemtemplate.item_class))
            {
                foreach (string modid in CraftingDatabase.IncursionDroponlyMods[itemtemplate.item_class])
                {
                    if (CraftingDatabase.AllMods.ContainsKey(modid))
                    {
                        specresults.Add(CraftingDatabase.AllMods[modid], "Drop-only: Incursion");
                    }
                }
            }
            SpecialModsDisplay.UpdateData(specresults);
        }