示例#1
0
 public override Actions Evaluate()
 {
     try
     {
         if (BaseItemType.ClassName != "DivinationCard")
         {
             return(Actions.CantDecide);
         }
         var garbage = _divCardsProvider.GetSellDivCardsList();
         return(garbage.Any(name => IsSameName(name, ItemBaseComponent.Name))
             ? Actions.Vendor
             : Actions.Keep);
     }
     catch (Exception)
     {
         return(Actions.Keep);
     }
 }
示例#2
0
        public override void DrawSettings()
        {
            try
            {
                ImGui.Text($"Welcome to EZV {Assembly.GetExecutingAssembly().GetName().Version}");

                try
                {
                    var cheapDivCards = _divCardsProvider?.GetSellDivCardsList()?.Count;
                    var zeroLinks     = _ninja?.GetCheap0LUniques()?.Count();
                    var sixLinks      = _ninja?.GetCheap6LUniques()?.Count();

                    ImGui.Text(cheapDivCards > 0
                        ? $"Loaded {cheapDivCards} div cards to sell"
                        : "CANT LOAD LOOT FILTER");

                    ImGui.Text(zeroLinks > 0
                        ? $"Loaded {zeroLinks} <6L cheap uniques"
                        : "CANT LOAD <6L UNIQUE LIST");

                    ImGui.Text(sixLinks > 0
                        ? $"Loaded {sixLinks} =6L cheap uniques"
                        : "CANT LOAD =6L UNIQUE LIST");
                }
                catch (Exception)
                {
                    ImGui.Text($"EXCEPTION DURING LOADING FILTERS. DO NO USE !!!");
                }

                ImGui.InputText("League name", ref Settings.LeagueNameArchnemesis, 255);
                base.DrawSettings();
                ImGui.InputText("Poe username", ref Settings.LimitedUsername, 255);
                ImGui.InputText("Filter name", ref Settings.FilterName, 255);
                if (ImGui.Button("Delete ninja cache (after you change settings)"))
                {
                    File.Delete(Path.Combine(DirectoryFullName, "ninja0L.json"));
                    File.Delete(Path.Combine(DirectoryFullName, "ninja6L.json"));
                }
            }
            catch
            {
                // ignored
            }
        }