Пример #1
0
 public static void ClientDisconnected(IConnection connection)
 {
     if (connection.Account != null && connection.Player != null)
     {
         Player player = connection.Player;
         new DelayedAction(() => PlayerLogic.PlayerEndGame(player), LogoutTimeout * 1000);
     }
 }
Пример #2
0
        public static void ExitPlayer(IConnection connection)
        {
            AccountService.AbortExitAction(connection);
            FeedbackService.ShowExitWindow(connection, LogoutTimeout);

            connection.Account.ExitAction = new DelayedAction(() =>
            {
                FeedbackService.Exit(connection);
                PlayerLogic.PlayerEndGame(connection.Player);
            }, LogoutTimeout * 1000);
        }