本文整理汇总了C#中Server.LoginEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# LoginEventArgs类的具体用法?C# LoginEventArgs怎么用?C# LoginEventArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
LoginEventArgs类属于Server命名空间,在下文中一共展示了LoginEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnLogin
private static void OnLogin(LoginEventArgs e)
{
foreach (TownHouse house in BaseHouse.GetHouses(e.Mobile).OfType<TownHouse>())
{
(house).ForSaleSign.CheckDemolishTimer();
}
}
示例2: 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;
}
示例3: OnLogin
private static void OnLogin(LoginEventArgs e)
{
if (CMOptions.ModuleEnabled && e.Mobile != null)
{
Invalidate(e.Mobile);
}
}
示例4: OnLogin
private static void OnLogin(LoginEventArgs e)
{
if (e.Mobile.AccessLevel >= AccessLevel.Counselor)
{
SendToolbar(e.Mobile);
}
}
示例5: EventSink_Login
public static void EventSink_Login(LoginEventArgs e)
{
if (e.Mobile.RawStatTotal > e.Mobile.StatCap && e.Mobile.AccessLevel == AccessLevel.Player)
{
e.Mobile.SendGump(new LowerStatsGump(e.Mobile));
}
}
示例6: HiddenVillageEventSink_Login
private static void HiddenVillageEventSink_Login( LoginEventArgs args )
{
Mobile m = args.Mobile;
Container pack = m.Backpack;
if ( pack != null )
{
List<HiddenVillagePass> passs = pack.FindItemsByType<HiddenVillagePass>();
for ( int i = 0; i < passs.Count; ++i )
{
HiddenVillagePass pass = passs[i];
if ( pass != null )
{
m.CloseGump( typeof( HiddenVillageIconGump ) );
m.SendGump( new HiddenVillageIconGump(m) );
}
}
}
if (m.AccessLevel >= AccessLevel.Counselor)
{
m.SendMessage(68,"Because your a GM you get the HV pass!!");
m.CloseGump( typeof( HiddenVillageIconGump ) );
m.SendGump(new HiddenVillageIconGump(m));
}
}
示例7: OnLogin
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 );
}
}
示例8: OnLogin
private static void OnLogin(LoginEventArgs e)
{
if (CMOptions.LoginPopup)
{
SendCentralGump(e.Mobile as PlayerMobile);
}
}
示例9: Player_Login
private static void Player_Login( LoginEventArgs args )
{
Mobile m = args.Mobile;
Account acct = m.Account as Account;
NetState ns = m.NetState;
Console.WriteLine( "Login: {0}: Account:{1}, Has logged in with character:{2} - {3}", ns, acct, m.Name, DateTime.Now);
}
示例10: OnLogin
public static void OnLogin( LoginEventArgs e )
{
AnimalFormContext context = AnimalForm.GetContext( e.Mobile );
if( context != null && context.SpeedBoost )
e.Mobile.Send( SpeedControl.MountSpeed );
}
示例11: OnLogin
private static void OnLogin( LoginEventArgs e )
{
if ( e.Mobile.AccessLevel != AccessLevel.Player
&& s_ErrorLog.Count != 0
&& !s_Checked.Contains( e.Mobile ) )
ErrorsNotifyGump.SendTo( e.Mobile );
}
示例12: 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;
}
示例13: EventSink_Login
public static void EventSink_Login(LoginEventArgs e)
{
if (e.Mobile is PlayerMobile)
{
SlayerTitleAttachment attachment = FindAttachment(e.Mobile);
}
}
示例14: OnLogin
/// <summary>
/// Sends a toolbar to staff members upon login.
/// </summary>
private static void OnLogin(LoginEventArgs e)
{
if (e.Mobile.AccessLevel >= AccessLevel.Counselor)
{
e.Mobile.CloseGump(typeof(Toolbar));
SendToolbar(e.Mobile);
}
}
示例15: World_Login
private static void World_Login(LoginEventArgs args)
{
Mobile m = args.Mobile;
if (args.Mobile.AccessLevel < AccessLevel.Administrator)//Edit AccessLevel to show its set for GameMaster
{
World.Broadcast(0x35, true, "{0} has logged into the world.", args.Mobile.Name);//Edit Message
}
}