Пример #1
0
        public override void Invoke(MissionRuntime runtime, MissionScript script)
        {
            var dlg    = script.Dialogs[Dialog];
            var netdlg = new NetDlgLine[dlg.Lines.Count];

            for (int i = 0; i < dlg.Lines.Count; i++)
            {
                var    d     = dlg.Lines[i];
                string voice = "trent_voice";
                if (!d.Source.Equals("Player", StringComparison.OrdinalIgnoreCase))
                {
                    var src = script.Ships[d.Source];
                    var npc = script.NPCs[src.NPC];
                    voice = npc.Voice;
                }

                var hash = FLHash.CreateID(d.Line);
                runtime.EnqueueLine(hash, d.Line);
                netdlg[i] = new NetDlgLine()
                {
                    Voice = voice,
                    Hash  = hash
                };
            }
            runtime.Player.PlayDialog(netdlg);
        }
Пример #2
0
        public override void Invoke(MissionRuntime runtime, MissionScript script)
        {
            var hash = FLHash.CreateID(Line);

            runtime.EnqueueLine(hash, Line);
            runtime.Player.PlayDialog(new NetDlgLine[] { new NetDlgLine()
                                                         {
                                                             Voice = Voice,
                                                             Hash  = hash
                                                         } });
        }
Пример #3
0
        public override void Invoke(MissionRuntime runtime, MissionScript script)
        {
            var netdlg = new NetDlgLine[1];
            var src    = script.Ships[Source];
            var npc    = script.NPCs[src.NPC];
            var voice  = npc.Voice;
            var hash   = FLHash.CreateID(Line);

            runtime.EnqueueLine(hash, Line);
            netdlg[0] = new NetDlgLine()
            {
                Voice = voice,
                Hash  = hash
            };
            runtime.Player.PlayDialog(netdlg);
        }