Ejemplo n.º 1
0
        static void ExtractVMaps()
        {
            CreateDirectory(BuildingsDirectory);
            File.Delete(BuildingsDirectory + "dir_bin");

            // Extract models, listed in GameObjectDisplayInfo.dbc
            VmapFile.ExtractGameobjectModels();

            string dirname = BuildingsDirectory + "dir_bin";

            DirBinWriter = new(File.Open(dirname, FileMode.Append, FileAccess.Write));
            VmapFile.ParsMapFiles(CascHandler);
            DirBinWriter.Close();

            Console.WriteLine("Extracting Done!");

            Console.WriteLine("Converting Vmap files...");
            CreateDirectory($"{BaseDirectory}/vmaps");

            TileAssembler ta = new(BuildingsDirectory, $"{BaseDirectory}/vmaps");

            if (!ta.ConvertWorld2())
            {
                return;
            }

            Console.WriteLine("Converting Done!");
        }
Ejemplo n.º 2
0
        static void ExtractVMaps()
        {
            Console.WriteLine("Extracting Vmap files...");

            CreateDirectory(wmoDirectory);
            File.Delete(wmoDirectory + "dir_bin");

            // Extract models, listed in GameObjectDisplayInfo.dbc
            VmapFile.ExtractGameobjectModels();

            Console.WriteLine("Read Map.dbc file... ");
            if (mapStorage == null)
            {
                var stream = cascHandler.ReadFile("DBFilesClient\\Map.db2");
                if (stream == null)
                {
                    Console.WriteLine("Unable to open file DBFilesClient\\Map.db2 in the archive\n");
                    return;
                }
                mapStorage = DB6Reader.Read <MapRecord>(stream, DB6Metas.MapMeta);
            }

            if (mapStorage == null)
            {
                Console.WriteLine("Fatal error: Invalid Map.db2 file format!\n");
                return;
            }

            VmapFile.ParsMapFiles();
            Console.WriteLine("Extracting Done!");

            Console.WriteLine("Converting Vmap files...");
            CreateDirectory("./vmaps");

            TileAssembler ta = new TileAssembler(wmoDirectory, "vmaps");

            if (!ta.convertWorld2())
            {
                return;
            }

            Console.WriteLine("Converting Done!");
        }
Ejemplo n.º 3
0
        static void ExtractVMaps()
        {
            CreateDirectory(WmoDirectory);
            File.Delete(WmoDirectory + "dir_bin");

            // Extract models, listed in GameObjectDisplayInfo.dbc
            VmapFile.ExtractGameobjectModels();

            VmapFile.ParsMapFiles();
            Console.WriteLine("Extracting Done!");

            Console.WriteLine("Converting Vmap files...");
            CreateDirectory("./vmaps");

            TileAssembler ta = new TileAssembler(WmoDirectory, "vmaps");

            if (!ta.convertWorld2())
            {
                return;
            }

            Console.WriteLine("Converting Done!");
        }