コード例 #1
0
ファイル: Combo.cs プロジェクト: Toocanzs/OWLib
        public static void SaveEffect(ICLIFlags flags, string path, FindLogic.Combo.ComboInfo info, ulong effect)
        {
            Effect.OWEffectWriter           effectWriter = new Effect.OWEffectWriter();
            FindLogic.Combo.EffectInfoCombo effectInfo   = info.Effects[effect];
            string effectDirectory = Path.Combine(path, "Effects", effectInfo.GetName());
            string effectFile      = Path.Combine(effectDirectory, $"{effectInfo.GetNameIndex()}{effectWriter.Format}");

            CreateDirectoryFromFile(effectFile);

            SaveEffectExtras(flags, effectDirectory, info, effectInfo.Effect, out Dictionary <ulong, HashSet <FindLogic.Combo.VoiceLineInstanceInfo> > svceLines);

            using (Stream effectOutputStream = File.OpenWrite(effectFile)) {
                effectOutputStream.SetLength(0);
                effectWriter.Write(effectOutputStream, effectInfo, info, svceLines);
            }
        }
コード例 #2
0
        public static void SaveEffect(ICLIFlags flags, string path, SaveContext context, ulong effect)
        {
            FindLogic.Combo.EffectInfoCombo effectInfo = context.m_info.m_effects[effect];
            string effectDirectory = Path.Combine(path, "Effects", effectInfo.GetName());

            SaveEffectExtras(flags, effectDirectory, context, effectInfo.Effect, out Dictionary <ulong, HashSet <FindLogic.Combo.VoiceLineInstanceInfo> > svceLines);

            Effect.OverwatchEffect output = new Effect.OverwatchEffect(context.m_info, effectInfo, svceLines);
            string effectFile             = Path.Combine(effectDirectory, $"{effectInfo.GetNameIndex()}.{output.Extension}");

            CreateDirectoryFromFile(effectFile);

            using (Stream effectOutputStream = File.OpenWrite(effectFile)) {
                effectOutputStream.SetLength(0);
                output.Write(effectOutputStream);
            }
        }