Beispiel #1
0
 public Player(Server server, int entityId, Client client)
     : base(server, entityId, null)
 {
     _client = client;
     EnsureServer(server);
     Inventory = null;
     DisplayName = client.Username;
     InitializePosition();
     PermHandler = new PermissionHandler(server);
 }
Beispiel #2
0
 public Player(Server server, int sessionId)
     : base(server, sessionId)
 {
     EnsureServer(server);
     Inventory = null;
     DisplayName = Username;
     SessionID = sessionId;
     InitializePosition();
     PermHandler = new PermissionHandler(server);
 }
Beispiel #3
0
 /// <summary>
 /// Instantiates a new Client object.
 /// </summary>
 /// <param name="server">The Server to associate with the entity.</param>
 /// <param name="sessionId">The entity ID for the client.</param>
 /// <param name="tcp">The TCP client to be used for communication.</param>
 internal Client(Server server, int sessionId, TcpClient tcp)
     : base(server, sessionId)
 {
     EnsureServer(server);
     SessionID = sessionId;
     Tcp = tcp;
     PacketHandler = new PacketHandler(Server, tcp);
     Inventory = null;
     Permissions = new PermissionHandler(Server);
     DisplayName = Username;
     InitializePosition();
     InitializeRecv();
 }