예제 #1
0
        private static void Scan(string prefix)
        {
            foreach (var file in Directory.GetFiles(Path.Combine(Variables.GameFolder, "ImagePacks2"), prefix + "*.NPK", SearchOption.TopDirectoryOnly))
            {
                try
                {
                    var npk = NPKHelper.ReadNPK(file, out NPKHelper.FileMode flag);

                    if (flag != NPKHelper.FileMode.FM_NPK)
                    {
                        // IMG/IMAGE
                        continue;
                    }

                    PackageManager.AppendNPK(npk, file);
                }
                catch (Exception e)
                {
                    Logger.LogError("ScanNPK [{0}] Exception: {1}", file, e.Message);
                }
            }
        }