Inheritance: System.EventArgs
Beispiel #1
0
        public void OnDisconnecte(object sender, ConnectionEventArgs e)
        {
            //      Logger.Trace("Client disconnected: {0}", e.Connection.ToString());
            //   playerHandler.RemovePlayerFromGame((IOClient)e.Connection.Client);
            if (e.Connection.Client.player != null)
            {
                e.Connection.Client.player.loggedIn = false;
                lock (ConnectionLock)
                    Connections.Remove(e.Connection);

                World.SendToAll(new QueDele(e.Connection.Client.player.Map, new DeleteObject(e.Connection.Client.player.Serial).Compile()));
            }
            Console.WriteLine("Connections C: " + Connections.Count);
              //  playerHandler.removePlayerClient(e.Connection.Client);
        }
Beispiel #2
0
 protected virtual void OnClientDisconnect(ConnectionEventArgs e)
 {
     var handler = OnDisconnect;
     if (handler != null) handler(this, e);
 }
Beispiel #3
0
        public void OnConnecte(object sender, ConnectionEventArgs e)
        {
            //      Logger.Trace("Game-Client connected: {0}", e.Connection.ToString());

            var gameClient = new IOClient(e.Connection);
            e.Connection.Client = gameClient;
            e.Connection.Client.keepalive = Server.tickcount.ElapsedMilliseconds;
            gameClient.handler = playerHandler;
            Console.WriteLine("Connections O: " + Connections.Count);
              //  playerHandler.newPlayerClient(gameClient);
        }