Server.Misc.PreventInaccess.OnLogin C# (CSharp) Méthode

OnLogin() public static méthode

public static OnLogin ( LoginEventArgs e ) : void
e LoginEventArgs
Résultat void
		public static void OnLogin( LoginEventArgs e )
		{
			Mobile from = e.Mobile;

			if ( from == null || from.AccessLevel < AccessLevel.Counselor )
				return;

			if ( HasDisconnected( from ) )
			{
				if ( !m_MoveHistory.ContainsKey( from ) )
					m_MoveHistory[from] = new LocationInfo( from.Location, from.Map );

				LocationInfo dest = GetRandomDestination();

				from.Location = dest.Location;
				from.Map = dest.Map;
			}
			else if ( m_MoveHistory.ContainsKey( from ) )
			{
				LocationInfo orig = m_MoveHistory[from];
				from.SendMessage( "Your character was moved from {0} ({1}) due to a detected client crash.", orig.Location, orig.Map );

				m_MoveHistory.Remove( from );
			}
		}