public DialogBoxObservers(UltimaServer server, EventJournalSource eventJournalSource, PacketDefinitionRegistry packetRegistry) { this.server = server; this.eventJournalSource = eventJournalSource; this.packetRegistry = packetRegistry; server.RegisterFilter(FilterServerPackets); }
public PlayerObservers(Player player, UltimaClient client, UltimaServer server, IConsole console, Legacy legacyApi, GameObjectCollection gameObjects, EventJournalSource eventJournalSource, PacketDefinitionRegistry packetRegistry) { this.client = client; this.server = server; this.player = player; this.console = console; this.legacyApi = legacyApi; this.gameObjects = gameObjects; this.eventJournalSource = eventJournalSource; this.packetRegistry = packetRegistry; IClientPacketSubject clientPacketSubject = client; clientPacketSubject.Subscribe(PacketDefinitions.MoveRequest, HandleMoveRequest); clientPacketSubject.RegisterOutputFilter(FilterSentClientPackets); server.RegisterFilter(FilterServerPackets); server.Subscribe(PacketDefinitions.CharacterLocaleAndBody, HandleCharLocaleAndBodyPacket); server.Subscribe(PacketDefinitions.DrawGamePlayer, HandleDrawGamePlayerPacket); server.Subscribe(PacketDefinitions.CharMoveRejection, HandleCharMoveRejectionPacket); server.Subscribe(PacketDefinitions.UpdateCurrentHealth, HandleUpdateCurrentHealthPacket); server.Subscribe(PacketDefinitions.UpdateCurrentStamina, HandleUpdateCurrentStaminaPacket); server.Subscribe(PacketDefinitions.UpdateCurrentMana, HandleUpdateCurrentManaPacket); server.Subscribe(PacketDefinitions.StatusBarInfo, HandleStatusBarInfoPacket); server.Subscribe(PacketDefinitions.SendSkills, HandleSendSkillsPacket); server.Subscribe(PacketDefinitions.DrawObject, HandleDrawObjectPacket); server.Subscribe(PacketDefinitions.AllowRefuseAttack, HandleAllowRefuseAttack); server.Subscribe(PacketDefinitions.UpdatePlayer, HandleUpdatePlayerPacket); server.Subscribe(PacketDefinitions.BoatMoving, HandleBoatMovingPacket); clientPacketSubject.Subscribe(PacketDefinitions.RequestSkills, HandleRequestSkills); }
public ServerObservers(UltimaServer server, IClientPacketSubject client, PacketDefinitionRegistry packetRegistry) { server.Subscribe(PacketDefinitions.ServerListing, HandleServerListing); server.Subscribe(PacketDefinitions.GameServerList, HandleGameServerList); server.RegisterFilter(HandleRunUOProtocolExtension); client.Subscribe(PacketDefinitions.SelectServerRequest, HandleSelectServerRequest); client.Subscribe(PacketDefinitions.LoginCharacter, HandleSelectLoginCharacterRequest); this.packetRegistry = packetRegistry; this.server = server; }
public GumpObservers(UltimaServer server, UltimaClient client, EventJournalSource eventSource, Cancellation cancellation) { this.server = server; this.client = client; this.eventSource = eventSource; this.cancellation = cancellation; server.RegisterFilter(FilterSendGumpMenuDialog); IClientPacketSubject clientPacketSubject = client; clientPacketSubject.RegisterFilter(FilterGumpMenuSelection); clientPacketSubject.Subscribe(PacketDefinitions.GumpMenuSelection, GumpMenuSelectionRequest); }
public GumpObservers(UltimaServer server, UltimaClient client, EventJournalSource eventSource, Cancellation cancellation, PacketDefinitionRegistry packetRegistry) { this.server = server; this.client = client; this.eventSource = eventSource; this.cancellation = cancellation; this.packetRegistry = packetRegistry; server.RegisterFilter(FilterSendGumpMenuDialog); IClientPacketSubject clientPacketSubject = client; clientPacketSubject.RegisterFilter(FilterGumpMenuSelection); clientPacketSubject.Subscribe(PacketDefinitions.GumpMenuSelection, GumpMenuSelectionRequest); IServerPacketSubject serverPacketSubject = server; serverPacketSubject.Subscribe(PacketDefinitions.SendGumpMenuDialog, HandleGump); serverPacketSubject.Subscribe(PacketDefinitions.CompressedGump, HandleGump); }
public DialogBoxObservers(UltimaServer server, EventJournalSource eventJournalSource) { this.server = server; this.eventJournalSource = eventJournalSource; server.RegisterFilter(FilterServerPackets); }