Exemple #1
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!");
        }
Exemple #2
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!");
        }