Beispiel #1
0
        public void Export()
        {
            string headerFile            = VariableDefines.EXPORTED_PATH.Replace(".m2d", ".m2h");
            List <PackFileEntry> files   = FileList.ReadFile(File.OpenRead(headerFile));
            MemoryMappedFile     memFile = MemoryMappedFile.CreateFromFile(VariableDefines.EXPORTED_PATH);

            // Parse and save some item data from xml file
            List <MapEntityMetadata> entities = MapEntityParser.Parse(memFile, files);

            MapEntityParser.Write(entities);
        }
        public static void Export(List <PackFileEntry> files, MemoryMappedFile memFile)
        {
            if (Hash.CheckHash("ms2-map-entity-metadata"))
            {
                Console.WriteLine("\rSkipping map metadata!");
                return;
            }

            // Parse and save some item data from xml file
            List <MapEntityMetadata> entities = MapEntityParser.Parse(memFile, files);

            MapEntityParser.Write(entities);
            Hash.WriteHash("ms2-map-entity-metadata");
        }
Beispiel #3
0
        private static void Main()
        {
            /*string headerFile = XML_PATH.Replace(".m2d", ".m2h");
             * List<PackFileEntry> files = ReadFile(File.OpenRead(headerFile));
             * var memFile = MemoryMappedFile.CreateFromFile(XML_PATH);
             *
             * // Parse and save some item data from xml file
             * List<ItemMetadata> items = ItemParser.Parse(memFile, files);
             * ItemParser.Write(items);*/

            string headerFile          = EXPORTED_PATH.Replace(".m2d", ".m2h");
            List <PackFileEntry> files = ReadFile(File.OpenRead(headerFile));
            var memFile = MemoryMappedFile.CreateFromFile(EXPORTED_PATH);
            List <MapEntityMetadata> entities = MapEntityParser.Parse(memFile, files);

            MapEntityParser.Write(entities);
        }