コード例 #1
0
        public JournalObservers(SpeechJournalSource journalSource, IServerPacketSubject serverPacketSubject, IConsole console,
                                IClilocSource clilocSource)
        {
            this.journalSource = journalSource;
            this.console       = console;
            this.clilocSource  = clilocSource;
            translator         = new ClilocTranslator(clilocSource);

            serverPacketSubject.Subscribe(PacketDefinitions.SpeechMessage, HandleSpeechMessagePacket);
            serverPacketSubject.Subscribe(PacketDefinitions.SendSpeech, HanldeSendSpeechPacket);
            serverPacketSubject.Subscribe(PacketDefinitions.ClilocMessage, HandleClilocMessage);
            serverPacketSubject.Subscribe(PacketDefinitions.ClilocMessageAffix, HandleClilocMessageAffix);
        }
コード例 #2
0
        public InjectionApiBridge(Legacy infusionApi, InjectionHost injectionHost, IConsole console,
                                  PacketDefinitionRegistry packetRegistry, IClilocSource clilocSource, ISoundPlayer soundPlayer)
        {
            this.infusionApi         = infusionApi;
            this.injectionHost       = injectionHost;
            this.console             = console;
            this.packetRegistry      = packetRegistry;
            this.findType            = new FindTypeSubrutine(infusionApi, injectionHost);
            this.journal             = new Journal(1000, () => injectionHost.InjectionApi.Now(), clilocSource);
            this.equipmentSubrutines = new EquipmentSubrutines(infusionApi);
            this.useSubrutines       = new UseSubrutines(infusionApi);
            this.targeting           = new Targeting(infusionApi, injectionHost, infusionApi.Client, infusionApi.Targeting);
            this.grabbing            = new Grabbing(infusionApi, injectionHost);
            this.morphing            = new Morphing(infusionApi, packetRegistry);
            this.wavPlayer           = new WavPlayer(console, soundPlayer);
            this.gumps = new GumpSubrutines(infusionApi, infusionApi.GumpObservers, console);
            this.objectNameReceiver = new ObjectNameReceiver(infusionApi);
            this.walker             = new Walker(infusionApi);
            this.menus = new Menus(infusionApi.DialogBoxObservers);

            infusionApi.JournalSource.NewMessageReceived += (sender, entry) => journal.Add(entry);

            itemObservers = new ItemObservers(infusionApi.Server, infusionApi.Client, packetRegistry);
        }
コード例 #3
0
 public ClilocTranslator(IClilocSource clilocSource)
 {
     this.clilocSource = clilocSource;
 }
コード例 #4
0
ファイル: Journal.cs プロジェクト: uoinfusion/Infusion
 internal Journal(int maxEntries, Func <int> provideNow, IClilocSource clilocSource)
 {
     MaxEntries            = maxEntries;
     this.provideNow       = provideNow;
     this.clilocTranslator = new ClilocTranslator(clilocSource);
 }