예제 #1
0
        public static Item[]? GetPreset(OrderBotConfig cfg, string itemName, bool nhiOnly = true)
        {
            if (nhiOnly && !itemName.EndsWith(".nhi"))
            {
                itemName += ".nhi";
            }

            var path = Path.Combine(cfg.NHIPresetsDirectory, itemName);

            return(GetPreset(path));
        }
예제 #2
0
        public static string[] GetPresets(OrderBotConfig cfg)
        {
            var files   = Directory.GetFiles(cfg.NHIPresetsDirectory);
            var presets = new string[files.Length];

            for (int i = 0; i < files.Length; ++i)
            {
                presets[i] = Path.GetFileNameWithoutExtension(files[i]);
            }

            return(presets);
        }