Beispiel #1
0
 public SoundObserver(IServerPacketSubject serverPacketHandler, IEventJournalSource eventJournalSource,
                      PacketDefinitionRegistry packetRegistry)
 {
     this.eventJournalSource = eventJournalSource;
     this.packetRegistry     = packetRegistry;
     serverPacketHandler.RegisterFilter(FilterBlockedSounds);
 }
Beispiel #2
0
 internal LightObserver(IServerPacketSubject serverPacketHandler, UltimaClient client, Player player, Legacy legacy)
 {
     this.client = client;
     this.player = player;
     this.legacy = legacy;
     serverPacketHandler.RegisterFilter(FilterBlockedServerPackets);
     serverPacketHandler.Subscribe(PacketDefinitions.PersonalLightLevel, HandlePersonalLightLevelPacket);
 }
Beispiel #3
0
        public Targeting(UltimaServer server, UltimaClient client, Cancellation cancellation,
                         EventJournalSource eventSource)
        {
            this.server       = server;
            this.client       = client;
            this.cancellation = cancellation;
            this.eventSource  = eventSource;
            server.Subscribe(PacketDefinitions.TargetCursor, HanldeServerTargetCursorPacket);
            eventJournal = new EventJournal(eventSource, cancellation);

            IClientPacketSubject clientPacketSubject = client;

            clientPacketSubject.RegisterFilter(FilterClientTargetCursorPacket);

            IServerPacketSubject serverPacketSubject = server;

            serverPacketSubject.RegisterFilter(FilterSeverTargetCursorPacket);
        }
Beispiel #4
0
 public void RegisterFilter(Func <Packet, Packet?> filter)
 {
     packetSubject.RegisterFilter(filter);
 }
Beispiel #5
0
 public SoundObserver(IServerPacketSubject serverPacketHandler, IEventJournalSource eventJournalSource)
 {
     this.eventJournalSource = eventJournalSource;
     serverPacketHandler.RegisterFilter(FilterBlockedSounds);
 }
Beispiel #6
0
 public WeatherObserver(IServerPacketSubject serverPacketHandler, UltimaClient client, Legacy legacy)
 {
     this.client = client;
     this.legacy = legacy;
     serverPacketHandler.RegisterFilter(FilterBlockedServerPackets);
 }