Пример #1
0
        public static void OnLogin( LoginEventArgs e )
        {
            var house = HousingHelper.FindHouseAt( e.Mobile );

            if ( house != null && !house.Public && !house.IsFriend( e.Mobile ) )
                e.Mobile.Location = house.BanLocation;
        }
Пример #2
0
        private static void OnLogin( LoginEventArgs e )
        {
            Mobile from = e.Mobile;

            if ( HasRequest( from ) )
                from.SendGump( new AdvancedCharacterChoiceGump() );
        }
Пример #3
0
		private static void EventSink_Login( LoginEventArgs args )
		{
			int userCount = GameServer.Instance.ClientCount;
			Mobile m = args.Mobile;

			m.SendMessage( "Welcome to {0}, {1}! There {2} currently {3} user{4} online.",
				String.Format( "{0}{1}", Environment.Config.ServerName, TestCenter.Enabled ? " Test Center" : String.Empty ),
				args.Mobile.Name,
				userCount == 1 ? "is" : "are",
				userCount, userCount == 1 ? "" : "s" );

			if ( TestCenter.Enabled )
				m.SendMessage( "Server Version: X-RunUO {0}.{1}.{2}, Build {3}", Environment.CoreVersion.Major, Environment.CoreVersion.Minor, Environment.CoreVersion.Build, Environment.CoreVersion.Revision );
		}
Пример #4
0
        /// <summary>
        /// Starts pending generators on player re-login
        /// </summary>
        private static void OnLogin( LoginEventArgs args )
        {
            Player p = (Player)args.Mobile;

            if( !EoCTable.ContainsKey(p) )
            {
                EoCTable[p] = new EoCContext(p);
            }

            EoCTable[p].LastLogin = DateTime.Now;

            if( HitsTable.ContainsKey(p) )
            {
                HitsTable[p].Start();
            }
        }
Пример #5
0
 private static void OnLogin( LoginEventArgs e )
 {
     if ( UnderEffect( e.Mobile ) )
         e.Mobile.InvalidateSpeed();
 }
Пример #6
0
        private static void OnLogin( LoginEventArgs e )
        {
            Mobile from = e.Mobile;

            SacrificeVirtue.CheckAtrophy( from );
            JusticeVirtue.CheckAtrophy( from );
            CompassionVirtue.CheckAtrophy( from );
            HonorVirtue.CheckAtrophy( from );
            ValorVirtue.CheckAtrophy( from );

            CheckTitlesAtrophy( from );

            AutoClaim( from );

            if ( AccountHandler.LockdownLevel > AccessLevel.Player )
            {
                string notice;

                Accounting.Account acct = from.Account as Accounting.Account;

                if ( acct == null || !acct.HasAccess( from.Client ) )
                {
                    if ( from.AccessLevel == AccessLevel.Player )
                        notice = "The server is currently under lockdown. No players are allowed to log in at this time.";
                    else
                        notice = "The server is currently under lockdown. You do not have sufficient access level to connect.";

                    Timer.DelayCall( TimeSpan.FromSeconds( 1.0 ), new TimerStateCallback( Disconnect ), from );
                }
                else if ( from.AccessLevel >= AccessLevel.Administrator )
                {
                    notice = "The server is currently under lockdown. As you are an administrator, you may change this from the [Admin gump.";
                }
                else
                {
                    notice = "The server is currently under lockdown. You have sufficient access level to connect.";
                }

                from.SendGump( new NoticeGump( 1060637, 30720, notice, 0xFFC000, 300, 140, null, null ) );
            }

            if ( from is PlayerMobile && from.Race != Race.Gargoyle )
            {
                PlayerMobile pm = (PlayerMobile) from;

                if ( pm.Client != null && pm.Client.Version != null && pm.Client.Version.IsEnhanced )
                {
                    if ( pm.LastLogin == DateTime.MinValue )
                        pm.KRStartingQuestStep++;
                    else if ( pm.KRStartingQuestStep > 0 )
                        KRStartingQuest.DoStep( pm );
                }
                else if ( pm.KRStartingQuestStep > 0 )
                    pm.KRStartingQuestStep = 0;
            }
        }
Пример #7
0
 private static void EventSink_Login( LoginEventArgs e )
 {
     if( e.Mobile != null )
         CheckHeaveTimer(e.Mobile);
 }
Пример #8
0
        private static void OnLogin( LoginEventArgs e )
        {
            Mobile from = e.Mobile;

            if ( HasRequest( from ) )
                from.SendGump( new PromotionMessageGump( false, PromotionalType.None, ( (PlayerMobile) from ).LastPromotionCode ) );
        }