Ejemplo n.º 1
0
        public static List <Part> getParts()
        {
            List <Part> parts = new List <Part>();

            Console.WriteLine("!!! Debugger looks for the files in: " + Environment.CurrentDirectory);
            List <PrimitivePart> allPrimParts   = new JSONToCSharpParser <PrimitivePart>().parse(PARTS_PATH);
            List <PrimitivePart> primitiveParts = new List <PrimitivePart>();

            var essences = allPrimParts.FindAll(part => part.ii_name_time.Contains("Unlimited"))
                           .GroupBy(part => part.ii_name);

            foreach (var essence in essences)
            {
                primitiveParts.Add(essence.First());
            }
            primitiveParts.ForEach(p => figureOutPart(p, parts));
            parts.ForEach(part =>
            {
                Console.Write(part.Name + " " + setPrint(part.CharacterEquip));
                if (part.GetType() == typeof(Part))
                {
                    Console.Write(" | " + setPrint(((Part)part).PartEquip));
                }
                Console.WriteLine();
            });
            Console.WriteLine(parts.Count + " distinct parts were found");
            return(parts);
        }
Ejemplo n.º 2
0
        public static List <PrimitiveIcon> getPrimIcons(string iconsPath)
        {
            Console.WriteLine("!!! Debugger looks for the files in: " + Environment.CurrentDirectory);
            List <PrimitiveIcon> icons = new JSONToCSharpParser <PrimitiveIcon>().parse(iconsPath);

            return(icons);
        }
Ejemplo n.º 3
0
        public static List <Weapon> getWeapons()
        {
            Console.OutputEncoding  = Encoding.Unicode;
            Console.ForegroundColor = Color.Yellow;
            Console.WriteLine("!!! Debugger looks for the files in: " + Environment.CurrentDirectory);
            Console.ForegroundColor = Color.WhiteSmoke;

            consoleFormat(styleSheet);
            List <PrimitiveWeapon>          weapons_mv     = new JSONToCSharpParser <PrimitiveWeapon>().parse(WEAPON_INFO_PATH);
            List <PrimitiveIteamWeaponInfo> weaponInfos_mv = new JSONToCSharpParser <PrimitiveIteamWeaponInfo>().parse(ITEM_WEAPON_INFO_PATH);

            List <PrimitiveWeapon>          weapons_tw     = new JSONToCSharpParser <PrimitiveWeapon>().parse(WEAPON_INFO_PATH_TW);
            List <PrimitiveIteamWeaponInfo> weaponInfos_tw = new JSONToCSharpParser <PrimitiveIteamWeaponInfo>().parse(ITEM_WEAPON_INFO_PATH_TW);

            weapons_mv     = weapons_mv.FindAll(w_mv => lastTwoDigitsAreGood(w_mv.wi_id));
            weaponInfos_mv = weaponInfos_mv.FindAll(info_mv => lastTwoDigitsAreGood(info_mv.ii_weaponinfo));

            weapons_tw     = weapons_tw.FindAll(w_tw => lastTwoDigitsAreGood(w_tw.wi_id));
            weaponInfos_tw = weaponInfos_tw.FindAll(info_tw => lastTwoDigitsAreGood(info_tw.ii_weaponinfo));

            List <int> missingIDS = new List <int>();


            List <Weapon> weapons = new List <Weapon>();

            getMVWeapons(weapons_mv, weaponInfos_mv, missingIDS, weapons);
            getTWWeaponsAndCompare(weapons_tw, weaponInfos_tw, weapons, missingIDS);

            int missing = missingIDS.Count;

            Console.WriteLine(missing + " items are missing in database");
            Console.WriteLine("Still " + missingIDS.Count + " items are missing in database");

            //   WebClient web = new WebClient();
            //  foreach (Weapon wep in weapons)
            //  {
            //     ProcessQuery(getWeaponInfo(wep), web);
            //    System.Threading.Thread.Sleep(50);
            // }


            Console.WriteLine("File in: " + Environment.CurrentDirectory);
            return(weapons);
        }