public WodMd20ToMd21(string modelName, string path) { AnimChunk.Clear(); BoneChunk.Clear(); SkinChunk.Clear(); PhysChunk.Clear(); //Lecture des fichiers root du multitool pour peupler les listes. populateAnimChunk(modelName); populateBoneChunk(modelName); populateSkinChunk(modelName); populatePhysChunk(modelName); writeData(modelName, path); }
public void populateSkinChunk(string modelName) { var file = File.ReadAllLines(@"rootFiles\SKIN_Root").Select(s => s.Split(',')).ToArray(); for (int i = 0; i < file.Length; i++) { if ((file[i][0].ToLowerInvariant()).StartsWith(modelName) && (file[i][0].ToLowerInvariant()).EndsWith(".skin")) { string name = (file[i][0].ToLowerInvariant()); name = name.Replace(".skin", ""); name = name.Replace("-", ""); name = name.Replace("_lod", ""); if (name.StartsWith("collections") || name.StartsWith("shoulder") || name.StartsWith("helm") || name.StartsWith("lshoulder") || name.StartsWith("rshoulder")) { name = name.Substring(0, name.Length - 2); } else { //Fix Weapon if (name.Length == modelName.Length + 2) { name = name.Substring(0, name.Length - 2); } } if (name == modelName) { SkinChunk.Add(new SkinChunk() { fileName = file[i][0], rootId = file[i][1], }); } } else if (((file[i][0].ToLowerInvariant()).StartsWith(modelName) && (file[i][0].ToLowerInvariant()).EndsWith(".skin")) == false) { continue; } } }