Inheritance: System.EventArgs
		private static void EventSink_Disconnected( DisconnectedEventArgs e )
		{
			Logout( e.Mobile );
		}
        private static void EventSink_Disconnected( DisconnectedEventArgs e )
        {
            Account acc = e.Mobile.Account as Account;

            if ( acc == null )
                return;

            if ( acc.m_YoungTimer != null )
            {
                acc.m_YoungTimer.Stop();
                acc.m_YoungTimer = null;
            }

            PlayerMobile m = e.Mobile as PlayerMobile;
            if ( m == null )
                return;

            acc.m_TotalGameTime += Core.Now - m.SessionStart;
        }
Exemple #3
0
 public static void VIPHook_Disconnected(DisconnectedEventArgs e)
 {
     CheckModule(e.Mobile);
 }
Exemple #4
0
        public static void OnDisconnected(DisconnectedEventArgs args)
        {
            Mobile mobile = args.Mobile;

            m_LogoutQueue.Enqueue(mobile);

            //new DelayedRemoveMobileTimer(mobile).Start();
        }
        static void EventSink_Disconnected(DisconnectedEventArgs e)
        {
            Mobile from = e.Mobile;

            if (from == null)
                return;

            if (from is PlayerMobile)
            {
                PlayerMobile pm = (PlayerMobile)from;

                PokerGame game = pm.PokerGame;

                if (game != null)
                {
                    PokerPlayer player = game.GetPlayer(from);

                    if (player != null)
                        game.RemovePlayer(player);
                }
            }
        }
Exemple #6
0
		public static void EventSink_Disconnected( DisconnectedEventArgs args )
		{
			m_LastTarget.Remove( args.Mobile );
		}
        private static void EventSink_Disconnected(DisconnectedEventArgs e)
        {
            Mobile from = e.Mobile;
            DesignContext context = DesignContext.Find(from);

            if (context != null)
            {
                /* Client disconnected
                 *  - Remove design context
                 *  - Eject all from house
                 *  - Restore relocated entities
                 */

                // Remove design context
                DesignContext.Remove(from);

                // Eject all from house
                from.RevealingAction();

                foreach (Item item in context.Foundation.GetItems())
                    item.Location = context.Foundation.BanLocation;

                foreach (Mobile mobile in context.Foundation.GetMobiles())
                    mobile.Location = context.Foundation.BanLocation;

                // Restore relocated entities
                context.Foundation.RestoreRelocatedEntities();
            }

            PlayerMobile pm = e.Mobile as PlayerMobile;

            if (pm != null)
            {
                pm.m_GameTime += (DateTime.Now - pm.m_SessionStart);

                if (pm.m_Quest != null)
                    pm.m_Quest.StopTimer();

                #region GeNova: Mondain's Legacy
                QuestHelper.StopTimer(pm);
                #endregion

                pm.m_SpeechLog = null;
                pm.LastOnline = DateTime.Now;
            }
        }
 public static void OnDisconnected( DisconnectedEventArgs args )
 {
     args.Mobile.EndAction( typeof( CraftSystem ) );
 }
Exemple #9
0
        private static void EventSink_Disconnected( DisconnectedEventArgs e )
        {
            Account acc = e.Mobile.Account as Account;

            if ( acc == null )
                return;

            PlayerMobile m = e.Mobile as PlayerMobile;
            if ( m == null )
                return;

            //acc.m_TotalGameTime += DateTime.Now - m.SessionStart;
        }
Exemple #10
0
		private static void EventSink_Disconnected(DisconnectedEventArgs e)
		{
			if (e.Mobile != null && e.Mobile.Account != null)
				try { ClientMon.RemoveAccount(e.Mobile); }
				catch (Exception ex) { LogHelper.LogException(ex); }
		}
Exemple #11
0
 public static void InvokeDisconnected(DisconnectedEventArgs e)
 {
     Disconnected?.Invoke(e);
 }
Exemple #12
0
        public static void OnDisconnected(DisconnectedEventArgs args)
        {
            Mobile mobile = args.Mobile;

            m_LogoutQueue.Enqueue(mobile);
        }
Exemple #13
0
		public static void InvokeDisconnected(DisconnectedEventArgs e)
		{
			if (Disconnected != null)
			{
				foreach (DisconnectedEventHandler currentDelegate in Disconnected.GetInvocationList())
				{
					try
					{
						currentDelegate.Invoke(e);
					}
					catch (Exception ex)
					{
						// Log an exception
						EventSink.InvokeLogException(new LogExceptionEventArgs(ex));
					}
				}
			}
		}
		public static void TSystem_OnDisconnect( DisconnectedEventArgs e )
		{
			if(StaticRef != null && StaticRef.Started)
			{
				if(StaticRef.IsParticipant(e.Mobile))
				{
					if(StaticRef.FindMatch(e.Mobile).MatchStatus == MatchStatus.Fighting)
						e.Mobile.Kill(); //Mobile will later be removed from tournament because netstate is null
				}
			}
		}
		/// <summary>
		/// When player disconnects, remove it from the current users
		/// </summary>
		private void OnPlayerDisconnected(DisconnectedEventArgs e)
		{
			if ( m_Users.Contains( e.Mobile ) )
				m_Users.Remove( e.Mobile );
		}
		private static void EventSink_Disconnected( DisconnectedEventArgs e )
		{
			Mobile from = e.Mobile;
			DesignContext context = DesignContext.Find( from );

			if ( context != null )
			{
				/* Client disconnected
				 *  - Remove design context
				 *  - Eject client from house
				 */

				// Remove design context
				DesignContext.Remove( from );

				// Eject client from house
				from.RevealingAction();

				from.MoveToWorld( context.Foundation.BanLocation, context.Foundation.Map );
			}

			PlayerMobile pm = e.Mobile as PlayerMobile;

			if ( pm != null )
			{
				pm.m_GameTime += (DateTime.Now - pm.m_SessionStart);

				if ( pm.m_Quest != null )
					pm.m_Quest.StopTimer();


				if( pm.IOBEquipped )
				{
					if( pm.m_IOBStartedWearing > DateTime.MinValue )
					{
						pm.m_IOBRankTime += (DateTime.Now - pm.m_IOBStartedWearing);
					}
				}
				pm.m_IOBStartedWearing = DateTime.MinValue; //always set this to minvalue when logged out
			}

			// wea: log the fact that they've disconnected
			Server.Scripts.Commands.CommandLogging.LogChangeClient( e.Mobile, false );

		}
Exemple #17
0
 public static void InvokeDisconnected( DisconnectedEventArgs e )
 {
     if ( Disconnected != null )
         Disconnected( e );
 }
Exemple #18
0
        public static void EventSink_Disconnected(DisconnectedEventArgs e)
        {
            BaseBoat boat = GetPiloting(e.Mobile);

            if (boat != null)
                boat.RemovePilot(e.Mobile);
        }
        private static void EventSink_Disconnected( DisconnectedEventArgs e )
        {
            Mobile from = e.Mobile;
            /*DesignContext context = DesignContext.Find( from );

            if ( context != null )
            {
                // Remove design context
                DesignContext.Remove( from );

                // Eject client from house
                from.RevealingAction();
                from.Map = context.Foundation.Map;
                from.Location = context.Foundation.BanLocation;
            }*/

            PlayerMobile pm = e.Mobile as PlayerMobile;

            if ( pm != null )
            {
                pm.m_GameTime += (DateTime.Now - pm.m_SessionStart);

                MovementController.OnDisconnected( pm );
            }
        }
Exemple #20
0
		private void EventSink_Disconnected(DisconnectedEventArgs e)
		{
			if ( ! m_Updating )
				return;

			if ( e.Mobile == m_User )
				EndUpdateDisconnected();
		}
Exemple #21
0
		/// <summary>
		/// Verify if one of the players disconnects
		/// </summary>
		private void OnPlayerDisconnected(DisconnectedEventArgs e)
		{
			if ( e.Mobile != m_Black && e.Mobile != m_White )
				return;

			if ( m_Status == GameStatus.Setup )
			{
				Cleanup(); // No game to loose, just end.
				return;
			}

			if ( m_Status == GameStatus.Over )
			{
				// If game is over, logging out = confirming game over through the gump
				NotifyGameOver( e.Mobile );
				return;
			}

			// Game in progress

			m_Pending = true;

			if ( m_Black != null && m_Black.NetState != null )
			{
				m_Black.CloseGump( typeof( GameGump ) );
				m_Black.SendGump( new EndGameGump( m_Black, this, false,
					"Your partner has been disconnected", ChessConfig.DisconnectTimeOut.Minutes ) );
			}

			if ( m_White != null && m_White.NetState != null )
			{
					m_White.CloseGump( typeof( GameGump ) );
					m_White.SendGump( new EndGameGump( m_White, this, false,
						"Your partner has been disconnected", ChessConfig.DisconnectTimeOut.Minutes ) );
			}

			if ( m_Timer != null )
				m_Timer.OnPlayerDisconnected();
		}
Exemple #22
0
		/*
		 * When a player disconnects, put their IP and the time at which they will time-out into a hashtable. 
		 *	if someone tries to login, and we are at our MAX allowable IPs, then force them to wait until the other account/character timesout.
		 *	NOTE: This only prevents day-to-day hotswaps if MaxAddresses == 1
		 */
		private static void EventSink_Disconnected(DisconnectedEventArgs e)
		{
			try
			{
				if (e.Mobile != null && e.Mobile.Account != null)
				{
					if ((e.Mobile.Account as Server.Accounting.Account).LoginIPs != null)
					{
						if ((e.Mobile.Account as Server.Accounting.Account).LoginIPs[0] != null)
						{	// delete an old record
							if (m_IPMRU.ContainsKey((e.Mobile.Account as Server.Accounting.Account).LoginIPs[0]))
								m_IPMRU.Remove((e.Mobile.Account as Server.Accounting.Account).LoginIPs[0]);
							// create a new record
							m_IPMRU[(e.Mobile.Account as Server.Accounting.Account).LoginIPs[0]] = new WatchDog(e.Mobile);
						}
					}
				}
			}
			catch (Exception ex) { EventSink.InvokeLogException(new LogExceptionEventArgs(ex)); }
		}