public static void SaveSound(ICLIFlags flags, string path, FindLogic.Combo.ComboInfo info, ulong sound) { FindLogic.Combo.SoundInfoNew soundInfo = info.Sounds[sound]; string soundDir = Path.Combine(path, soundInfo.GetName()); CreateDirectoryFromFile(soundDir + "\\harrypotter.png"); HashSet <ulong> done = new HashSet <ulong>(); if (soundInfo.SoundFiles != null) { foreach (KeyValuePair <uint, ulong> soundPair in soundInfo.SoundFiles) { if (done.Contains(soundPair.Value)) { continue; } SaveSoundFile(flags, soundDir, info, soundPair.Value, false); done.Add(soundPair.Value); } } if (soundInfo.SoundStreams != null) { foreach (KeyValuePair <uint, ulong> soundStream in soundInfo.SoundStreams) { if (done.Contains(soundStream.Value)) { continue; } SaveSoundFile(flags, soundDir, info, soundStream.Value, false); done.Add(soundStream.Value); } } }
public static void SaveSound(ICLIFlags flags, string path, SaveContext context, ulong sound) { if (!context.m_info.m_sounds.ContainsKey(sound)) { return; } FindLogic.Combo.SoundInfoNew soundInfo = context.m_info.m_sounds[sound]; string soundDir = Path.Combine(path, soundInfo.GetName()); CreateDirectorySafe(soundDir); HashSet <ulong> done = new HashSet <ulong>(); if (soundInfo.SoundFiles != null) { foreach (KeyValuePair <uint, ulong> soundPair in soundInfo.SoundFiles) { if (done.Contains(soundPair.Value)) { continue; } SaveSoundFile(flags, soundDir, context, soundPair.Value, false); done.Add(soundPair.Value); } } if (soundInfo.SoundStreams != null) { foreach (KeyValuePair <uint, ulong> soundStream in soundInfo.SoundStreams) { if (done.Contains(soundStream.Value)) { continue; } SaveSoundFile(flags, soundDir, context, soundStream.Value, false); done.Add(soundStream.Value); } } }