当前位置: 首页>>代码示例>>C#>>正文


C# LoginEventArgs类代码示例

本文整理汇总了C#中LoginEventArgs的典型用法代码示例。如果您正苦于以下问题:C# LoginEventArgs类的具体用法?C# LoginEventArgs怎么用?C# LoginEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


LoginEventArgs类属于命名空间,在下文中一共展示了LoginEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UserInfoControl_UpItem

 void UserInfoControl_UpItem(object sender, LoginEventArgs e)
 {
     if (UpItem != null)
     {
         UpItem(sender , e);
     }
 }
开发者ID:jxdong1013,项目名称:archivems,代码行数:7,代码来源:UserInfoControlHost.cs

示例2: OnLogin

		public static void OnLogin(LoginEventArgs e)
		{
			AnimalFormContext context = AnimalForm.GetContext(e.Mobile);

			if (context != null && context.SpeedBoost)
				e.Mobile.Send(SpeedControl.MountSpeed);
		}
开发者ID:greeduomacro,项目名称:vivre-uo,代码行数:7,代码来源:AnimalForm.cs

示例3: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;

            Mobile m = args.Mobile;

            m.SendMessage( 55, "Khaeros Shard: Welcome to our World");
            m.SendMessage( 55, "There {1} currently {2} player{3} online...",
                args.Mobile.Name,
                userCount == 1 ? "is" : "are",
                userCount, userCount == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s",
                mobileCount, mobileCount == 1 ? "" : "s" );

            string text = "";
            text = text + TimeSystem.Formatting.GetDescriptiveTime(m);

            m.SendMessage(55, text);

            m.SendMessage( 33, "We hope you enjoy your time!");

            //******Edit: Added in********
                        if ( m.AccessLevel >= AccessLevel.Counselor )
                        {
                            Server.Engines.Help.PageQueue.Pages_OnCalled( m );
                        }
            //******************************
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:30,代码来源:LoginStats.cs

示例4: OnLogin

        private static void OnLogin(LoginEventArgs e)
        {
            var pm = e.Mobile as PlayerMobile;
            if (pm == null || !pm.IsYoung() || pm.IsYoung() && pm.Guild != null)
            {
                return;
            }

            if (NewGuildPersistence.Instance == null)
            {
                var NGP = new NewGuildPersistence();
            }

            if (NewGuildPersistence.Instance != null && NewGuildPersistence.JoinedIPs != null)
            {
                var loginIPs = ((Account) e.Mobile.Account).LoginIPs.ToArray();
                if (loginIPs.Any(ip => NewGuildPersistence.JoinedIPs.Contains(ip)))
                {
                    return;
                }
            }

            var g = (Guild) BaseGuild.FindByAbbrev("New");
            if (g != null)
            {
                e.Mobile.SendGump(new NewPlayerGuildJoinGump(g, e.Mobile));
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:28,代码来源:NewGuildJoin.cs

示例5: OnLogin

 private static void OnLogin(LoginEventArgs e)
 {
     if (e != null && e.Mobile != null && e.Mobile is PlayerMobile && UsedGump != null && !UsedGump.Contains(e.Mobile as PlayerMobile))
     {
         e.Mobile.SendGump(new AprilFoolsGump1());
     }
 }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:AprilFoolsLogin.cs

示例6: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;
            int spellCount = Spells.SpellRegistry.Count;

            Mobile m = args.Mobile;

            if ( m.AccessLevel > AccessLevel.Player )
            {
                    m.SendAsciiMessage( "Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.",
                    args.Mobile.Name,
                    userCount == 1 ? "is" : "are",
                    userCount, userCount == 1 ? "" : "s",
                    itemCount, itemCount == 1 ? "" : "s",
                    mobileCount, mobileCount == 1 ? "" : "s" );
            }
            else
            {
                m.SendAsciiMessage( "There {0} currently {1} user{2} online.",
                    userCount == 1 ? "is" : "are",
                    userCount,
                    userCount != 1 ? "s" : "" );
            }
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:26,代码来源:LoginStats.cs

示例7: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;
            int staffCount = 0;

            Mobile m = args.Mobile;

            // By Silver
            if ( m.AccessLevel < AccessLevel.GameMaster )
            {
                foreach ( NetState ns in NetState.Instances )
                {
                    Mobile mob = ns.Mobile;

                    if( mob != null && mob.AccessLevel >= AccessLevel.Counselor )
                        staffCount++;
                }

                userCount -= staffCount;
            }

            m.SendMessage( "Welcome, {0}! There {1} currently {2} player{3} online, with {4} item{5} and {6} mobile{7} in the world.",
                args.Mobile.Name,
                userCount == 1 ? "is" : "are",
                userCount, userCount == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s",
                mobileCount, mobileCount == 1 ? "" : "s" );
        }
开发者ID:kamronbatman,项目名称:Defiance-AOS-Pre-2012,代码行数:30,代码来源:LoginStats.cs

示例8: UserInfoControl_DownItem

 void UserInfoControl_DownItem(object sender, LoginEventArgs e)
 {
     if (DownItem != null)
     {
         DownItem(sender , e);
     }
 }
开发者ID:jxdong1013,项目名称:archivems,代码行数:7,代码来源:UserInfoControlHost.cs

示例9: EventSink_Login

private static void EventSink_Login( LoginEventArgs args ) 
  

{ 
  


Mobile m = args.Mobile; 
  


int userCount = NetState.Instances.Count;
  
  


World.Broadcast( 0x35, true, "{0} has now logged in! There {1} now {2} player{3} online!", args.Mobile.Name,
  


userCount == 1 ? "is" : "are",
  


userCount, userCount == 1 ? "" : "s" );
  

}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:28,代码来源:Announce.cs

示例10: EventSink_Login

		private static void EventSink_Login( LoginEventArgs args )
		{
			int userCount = NetState.Instances.Count;
			int itemCount = World.Items.Count;
			int mobileCount = World.Mobiles.Count;
            int count = 0;

            Mobile owner = args.Mobile;

            List<NetState> states = NetState.Instances;

            for (int i = 0; i < states.Count; ++i)
            {
                Mobile m = states[i].Mobile;

                if (m != null && (m == owner || !m.Hidden || owner.AccessLevel >= m.AccessLevel || (m is PlayerMobile && ((PlayerMobile)m).VisibilityList.Contains(owner))))
                {
                    ++count;
                }
            }

            owner.SendMessage("Welcome {0}! There {1} currently {2} user{3} online and {4} item{5} in the world.",
                args.Mobile.Name,
                count == 1 ? "is" : "are",
                count, count == 1 ? "" : "s",
                itemCount, itemCount == 1 ? "" : "s");
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:27,代码来源:LoginStats.cs

示例11: OnLogin

		private static void OnLogin( LoginEventArgs e )
		{
			Mobile from = e.Mobile;

			if ( from != null )
			{
				Map map = from.Map;

				if ( map == null )
					return;

				Dictionary<Serial, Mobile>.Enumerator mobs = World.Mobiles.GetEnumerator();
				List<Mobile> pets = new List<Mobile>();
				while (mobs.MoveNext()) pets.Add(mobs.Current.Value);
				mobs.Dispose();
				
				for(int i=0;i<pets.Count;i++)
				{
					Mobile pet = pets[i];
					
					if ( pet is BaseCreature )
					{
						BaseCreature bc = (BaseCreature)pet;
						
						if(bc != null && bc.Map == Map.Internal && bc.Controlled && bc.ControlMaster == from && !IsMounted(bc))
						{
							pet.Map = map;
							pet.CantWalk = false;
						}
					}
				}
			}
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:33,代码来源:DisconnectPet.cs

示例12: GetProgress

		protected virtual int GetProgress(ConquestState state, LoginEventArgs args)
		{
            if (state.User == null)
                return 0;

            if (args == null || args.Mobile is PlayerMobile && args.Mobile.Account != state.User.Account)
			{
				return 0;
			}

			if (Map != null && Map != Map.Internal && (args.Mobile.Map == null || args.Mobile.Map != Map))
			{
				if (MapChangeReset)
				{
					return -state.Progress;
				}

				return 0;
			}

			if (!String.IsNullOrWhiteSpace(Region) && (args.Mobile.Region == null || !args.Mobile.Region.IsPartOf(Region)))
			{
				if (RegionChangeReset)
				{
					return -state.Progress;
				}

				return 0;
			}

			return 1;
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:32,代码来源:LoginConquest.cs

示例13: EventSink_Login

        private static void EventSink_Login( LoginEventArgs args )
        {
            int userCount = NetState.Instances.Count;
            int itemCount = World.Items.Count;
            int mobileCount = World.Mobiles.Count;

            Mobile m = args.Mobile;

            m.SkillsCap = 55000;

            for (int i = 0; i < m.Skills.Length; ++i)
            {
                m.Skills[i].Cap = 1000;

                if (m.Skills[i].Base > 100)
                    m.Skills[i].Base = 100;
            }

            //m.SendMessage( "Welcome, {0}! There {1} currently {2} user{3} online, with {4} item{5} and {6} mobile{7} in the world.",
            //    args.Mobile.Name,
            //    userCount == 1 ? "is" : "are",
            //    userCount, userCount == 1 ? "" : "s",
            //    itemCount, itemCount == 1 ? "" : "s",
            //    mobileCount, mobileCount == 1 ? "" : "s" );

            m.SendMessage(365, string.Format("Bem-vindo ao DimensNewAge {0}.", args.Mobile.Name));
            m.SendMessage(365, string.Format("Neste momento existem {0} usuarios online.", userCount >= 2 ? userCount + 1 : userCount));
            m.SendMessage(365, string.Format("Temos '{0}' Itens e '{1}' Mobs pelo mundo.", itemCount, mobileCount));
        }
开发者ID:greeduomacro,项目名称:DimensionsNewAge,代码行数:29,代码来源:LoginStats.cs

示例14: OnLogin

        public static void OnLogin(LoginEventArgs e)
        {
            BaseHouse house = BaseHouse.FindHouseAt(e.Mobile);

            if (house != null && !house.Public && !house.IsFriend(e.Mobile))
                e.Mobile.Location = house.BanLocation;
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:7,代码来源:HouseRegion.cs

示例15: EventSink_Login

		private static void EventSink_Login( LoginEventArgs e )
		{
			Account acct = e.Mobile.Account as Account;

			if ( acct == null )
				return;

			DateTime now = DateTime.Now;

			for ( int i = 0; i < m_Givers.Count; ++i )
			{
				GiftGiver giver = m_Givers[i];

				if ( now < giver.Start || now >= giver.Finish )
					continue; // not in the correct timefream

				if ( acct.Created > (giver.Start - giver.MinimumAge) )
					continue; // newly created account

				if ( acct.LastLogin >= giver.Start )
					continue; // already got one

				giver.DelayGiveGift( TimeSpan.FromSeconds( 5.0 ), e.Mobile );
			}

			acct.LastLogin = now;
		}
开发者ID:Grimoric,项目名称:RunUO.T2A,代码行数:27,代码来源:GiftGiving.cs


注:本文中的LoginEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。