本文整理汇总了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);
}
}
示例2: OnLogin
public static void OnLogin(LoginEventArgs e)
{
AnimalFormContext context = AnimalForm.GetContext(e.Mobile);
if (context != null && context.SpeedBoost)
e.Mobile.Send(SpeedControl.MountSpeed);
}
示例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 );
}
//******************************
}
示例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));
}
}
示例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());
}
}
示例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" : "" );
}
}
示例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" );
}
示例8: UserInfoControl_DownItem
void UserInfoControl_DownItem(object sender, LoginEventArgs e)
{
if (DownItem != null)
{
DownItem(sender , e);
}
}
示例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" );
}
示例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");
}
示例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;
}
}
}
}
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}