Beispiel #1
0
        private static int[] Costs_UpgradeRare = new int[] { 25, 50, 50, 50 }; // Deaths Breath | Reusable Parts | Arcane Dust | Veiled Crystal

        public static double Get_AvailableEnchants_UpgradeRare()
        {
            try
            {
                IEnumerable <UXControl> AllControls = UXHelper.Enumerate();

                int Count_RP = 0;
                int Count_AD = 0;
                int Count_VC = 0;
                int Count_DB = 0;

                Tools.GetAllMaterialsUpgrade(AllControls, out Count_DB, out Count_RP, out Count_VC, out Count_AD);

                double Enchants_DB = Count_DB / Costs_UpgradeRare[0];
                double Enchants_RP = Count_RP / Costs_UpgradeRare[1];
                double Enchants_AD = Count_AD / Costs_UpgradeRare[2];
                double Enchants_VC = Count_VC / Costs_UpgradeRare[3];

                double[] x = new[] { Enchants_DB, Enchants_RP, Enchants_AD, Enchants_VC };

                double possibleEnchants = x.OrderBy(y => y).First();

                return(possibleEnchants);
            }
            catch (Exception)
            {
                return(0);
            }
        }
Beispiel #2
0
 private void button_get_ui_elements_Click(object sender, EventArgs e)
 {
     visible_uxcontrols = new List <UXControl>();
     foreach (UXControl uxcontrol in UXHelper.Enumerate())
     {
         try
         {
             if (uxcontrol.IsVisible())
             {
                 visible_uxcontrols.Add(uxcontrol);
                 listBox_ui_elements.Items.Add(uxcontrol.ToString());
             }
         }
         catch (Exception) { }
     }
 }
Beispiel #3
0
        public static double Get_AvailableMaterial_Convert(string inputQuality)
        {
            try
            {
                RefreshMaterialsUI();
                IEnumerable <UXControl> AllControls = UXHelper.Enumerate();

                int ConvertMaterialCost   = 100;
                int ConvertMaterialDBCost = 1;
                int CountMaterial         = 0;

                switch (inputQuality)
                {
                case "normal":
                    CountMaterial = GetMaterial_ReusableParts(AllControls);
                    break;

                case "magic":
                    CountMaterial = GetMaterial_ArcaneDust(AllControls);
                    break;

                case "rare":
                    CountMaterial = GetMaterial_VeiledCrystal(AllControls);
                    break;
                }

                int Count_DB = GetMaterial_DeathBreath(AllControls);

                double   Enchants_DB      = Count_DB / ConvertMaterialDBCost;
                double   Enchants         = CountMaterial / ConvertMaterialCost;
                double[] x                = new[] { Enchants_DB, Enchants };
                double   possibleEnchants = x.OrderBy(y => y).First();

                return(Enchants);
            }
            catch (Exception)
            {
                return(0);
            }
        }