/// <summary> /// Creates a new <see cref="CharacterHandler"/> instance. /// </summary> /// <param name="logger">Logger.</param> /// <param name="database">Rhisis database.</param> /// <param name="clusterServer">Cluster server instance.</param> /// <param name="gameResources">Game resources.</param> /// <param name="clusterPacketFactory">Cluster server packet factory.</param> public CharacterHandler(ILogger <CharacterHandler> logger, IRhisisDatabase database, IClusterServer clusterServer, IGameResources gameResources, IClusterPacketFactory clusterPacketFactory) { _logger = logger; _database = database; _clusterServer = clusterServer; _gameResources = gameResources; _clusterPacketFactory = clusterPacketFactory; }
/// <summary> /// Initializes the <see cref="ClusterClient"/>. /// </summary> /// <param name="clusterServer">Parent cluster server.</param> /// <param name="logger">Logger.</param> /// <param name="handlerInvoker">Handler invoker.</param> /// <param name="clusterPacketFactory">Cluster packet factory.</param> public void Initialize(IClusterServer clusterServer, ILogger <ClusterClient> logger, IHandlerInvoker handlerInvoker, IClusterPacketFactory clusterPacketFactory) { _clusterServer = clusterServer; _logger = logger; _handlerInvoker = handlerInvoker; clusterPacketFactory.SendWelcome(this); }
/// <summary> /// Creates a new <see cref="CommonClusterHandler"/> instance. /// </summary> /// <param name="clusterPacketFactory">Cluster packet factory.</param> public CommonClusterHandler(IClusterPacketFactory clusterPacketFactory) { _clusterPacketFactory = clusterPacketFactory; }