private Skin GetSkin(int id, ManifestSearch search) { if (HasSkin(id)) { Skin result = new Skin(); SkinHashes hash = CharacterHashes.Skins[id]; var start = Inibin.FilePath.Substring(0, Inibin.FilePath.LastIndexOf('/')); result.SknFile = search.FindClosestPath((string)Inibin.Content[hash.Skn].Value, start, "Characters"); result.SklFile = search.FindClosestPath((string)Inibin.Content[hash.Skl].Value, start, "Characters"); result.DdsFile = search.FindClosestPath((string)Inibin.Content[hash.Dds].Value, start, "Characters"); result.BlndFile = search.FindClosestPath((string)Inibin.Content[hash.Blnd].Value, start, "Characters"); if (result.BlndFile == null || result.SknFile == null || result.DdsFile == null || result.SklFile == null) { return(null); } result.Id = id; return(result); } return(null); }
public bool HasSkin(int id) { SkinHashes hash = CharacterHashes.Skins[id]; return(Inibin.Content.ContainsKey(hash.Blnd) && Inibin.Content.ContainsKey(hash.Skn) && Inibin.Content.ContainsKey(hash.Skl) && Inibin.Content.ContainsKey(hash.Dds)); }