private static void ConvertNpcToXml(STRUCT_MOB NPC, string path) { path = path.Replace("mobs", @"mobs_XML"); if (!Directory.Exists(path)) { Directory.CreateDirectory(path); } if (path.EndsWith(@"\") == false) { path = path + @"\"; } if (NPC.name.EndsWith(".") == true) { NPC.name = NPC.name.Substring(0, NPC.name.Length - 1); } try { ExportarToXml.ExportaToXml(convertMobBinToXml(NPC), path + NPC.name + ".xml"); } catch (Exception e) { throw; } }
public static void createNpcGeneratorToXml(string path, string fileName) { ExportarToXml.ExportaToXml(convertNpcGeneratorToXml(path + fileName), path + @"\NPCGenerator.xml"); }