本文整理汇总了C#中Server.Mobile类的典型用法代码示例。如果您正苦于以下问题:C# Mobile类的具体用法?C# Mobile怎么用?C# Mobile使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Mobile类属于Server命名空间,在下文中一共展示了Mobile类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: LegalGrappling
public static bool LegalGrappling( Mobile mob )
{
if( mob == null || mob.Deleted || !mob.Alive || mob.Blessed )
return false;
return true;
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:GrappleTimer.cs
示例2: InternalTimer
public InternalTimer(Mobile m)
: base(TimeSpan.FromMinutes(1.0))
{
this.m_Mobile = m;
this.Priority = TimerPriority.OneSecond;
}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:7,代码来源:SpellHelper.cs
示例3: MarrowQuestGump
public MarrowQuestGump( Mobile owner )
: base(50,50)
{
//----------------------------------------------------------------------------------------------------
AddPage( 0 );AddImageTiled( 54, 33, 369, 400, 2624 );AddAlphaRegion( 54, 33, 369, 400 );AddImageTiled( 416, 39, 44, 389, 203 );
//--------------------------------------Window size bar--------------------------------------------
AddImage( 97, 49, 9005 );AddImageTiled( 58, 39, 29, 390, 10460 );AddImageTiled( 412, 37, 31, 389, 10460 );
AddBackground(85, 30, 329, 408, 3500);
AddLabel( 140, 60, 0x34, "Marrow's Task" );
//----------------------/----------------------------------------------/
AddHtml( 107, 140, 300, 230, " < BODY > " +
"<BASEFONT COLOR=YELLOW>Hello there, might you be interested in<BR>" +
"<BASEFONT COLOR=YELLOW>helping me with a little task?<BR>" +
"<BASEFONT COLOR=YELLOW><BR>" +
"<BASEFONT COLOR=YELLOW>I am researching a new type of potion<BR>" +
"<BASEFONT COLOR=YELLOW>and I need some reptile bones to finish<BR>" +
"<BASEFONT COLOR=YELLOW>my tests. As you can see though, I am <BR>" +
"<BASEFONT COLOR=YELLOW>no fighter and cannot get them myself.<BR>" +
"<BASEFONT COLOR=YELLOW><BR>" +
"<BASEFONT COLOR=YELLOW>Although my research has made my coin <BR>" +
"<BASEFONT COLOR=YELLOW>purse rather light these days I will be<BR>" +
"<BASEFONT COLOR=YELLOW>sure to reward you with something. I<BR>" +
"<BASEFONT COLOR=YELLOW>just need 20 bones, that should be <BR>" +
"<BASEFONT COLOR=YELLOW>plenty. You should be able to find<BR>" +
"<BASEFONT COLOR=YELLOW>some right outside of town. Thanks!<BR>" +
"</BODY>", false, true);
//----------------------/----------------------------------------------/
AddImage( 430, 9, 10441);AddImageTiled( 40, 38, 17, 391, 9263 );AddImage( 6, 25, 10421 );AddImage( 34, 12, 10420 );AddImageTiled( 94, 25, 342, 15, 10304 );AddImageTiled( 40, 427, 415, 16, 10304 );AddImage( -10, 314, 10402 );AddImage( 56, 150, 10411 );AddImage( 155, 120, 2103 );AddImage( 136, 84, 96 );AddButton( 225, 390, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0 );
}
开发者ID:Ziden,项目名称:ServUO-EC-Test-Fork,代码行数:29,代码来源:MarrowQuestGump.cs
示例4: RewardConfirmGump
public RewardConfirmGump( Mobile from, RewardEntry entry )
: base(0, 0)
{
m_From = from;
m_Entry = entry;
from.CloseGump( typeof( RewardConfirmGump ) );
AddPage( 0 );
AddBackground( 10, 10, 500, 300, 2600 );
AddHtmlLocalized( 30, 55, 300, 35, 1006000, false, false ); // You have selected:
if ( entry.NameString != null )
AddHtml( 335, 55, 150, 35, entry.NameString, false, false );
else
AddHtmlLocalized( 335, 55, 150, 35, entry.Name, false, false );
AddHtmlLocalized( 30, 95, 300, 35, 1006001, false, false ); // This will be assigned to this character:
AddLabel( 335, 95, 0, from.Name );
AddHtmlLocalized( 35, 160, 450, 90, 1006002, true, true ); // Are you sure you wish to select this reward for this character? You will not be able to transfer this reward to another character on another shard. Click 'ok' below to confirm your selection or 'cancel' to go back to the selection screen.
AddButton( 60, 265, 4005, 4007, 1, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 95, 266, 150, 35, 1006044, false, false ); // Ok
AddButton( 295, 265, 4017, 4019, 0, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 330, 266, 150, 35, 1006045, false, false ); // Cancel
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:30,代码来源:RewardConfirmGump.cs
示例5: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
try
{
if ( m_Type == typeof( Type ) )
targeted = targeted.GetType();
else if ( (m_Type == typeof( BaseAddon ) || m_Type.IsAssignableFrom( typeof( BaseAddon ) )) && targeted is AddonComponent )
targeted = ((AddonComponent)targeted).Addon;
if ( m_Type.IsAssignableFrom( targeted.GetType() ) )
{
Server.Scripts.Commands.CommandLogging.LogChangeProperty( m_Mobile, m_Object, m_Property.Name, targeted.ToString() );
m_Property.SetValue( m_Object, targeted, null );
PropertiesGump.OnValueChanged( m_Object, m_Property, m_Stack );
}
else
{
m_Mobile.SendMessage( "That cannot be assigned to a property of type : {0}", m_Type.Name );
}
}
catch
{
m_Mobile.SendMessage( "An exception was caught. The property may not have changed." );
}
}
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:25,代码来源:SetObjectTarget.cs
示例6: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( !from.InRange( this.GetWorldLocation(), 2 ) || !from.InLOS( this ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that
}
else if ( Visible && ( ItemID == 4656 || ItemID == 4702 ) && DateTime.Now >= m_NextUse )
{
Point3D p = this.GetWorldLocation();
if ( 1 > Utility.Random( Math.Max( Math.Abs( from.X - p.X ), Math.Abs( from.Y - p.Y ) ) ) )
{
Effects.PlaySound( from.Location, from.Map, from.GetHurtSound() );
from.PublicOverheadMessage( MessageType.Regular, from.SpeechHue, true, "Ouch!" );
Spells.SpellHelper.Damage( TimeSpan.FromSeconds( 0.5 ), from, Utility.Dice( 2, 10, 5 ) );
}
Effects.PlaySound( this.GetWorldLocation(), this.Map, 0x387 );
Timer.DelayCall( TimeSpan.FromSeconds( 0.25 ), new TimerCallback( Down1 ) );
Timer.DelayCall( TimeSpan.FromSeconds( 0.50 ), new TimerCallback( Down2 ) );
Timer.DelayCall( TimeSpan.FromSeconds( 5.00 ), new TimerCallback( BackUp ) );
m_NextUse = DateTime.Now + TimeSpan.FromSeconds( 10.0 );
}
}
开发者ID:romeov007,项目名称:imagine-uo,代码行数:27,代码来源:Guillotine.cs
示例7: OnCancel
public override void OnCancel( Mobile from )
{
if ( GuildMenu.BadLeader( m_Mobile, m_Guild ) )
return;
m_Mobile.SendMenu( new GuildmasterMenu( m_Mobile, m_Guild ) );
}
开发者ID:Ravenwolfe,项目名称:Origins,代码行数:7,代码来源:GuildNamePrompt.cs
示例8: Data
public Data(Mobile m)
{
c_Mobile = m;
c_Friends = new ArrayList();
c_Ignores = new ArrayList();
c_Messages = new ArrayList();
c_GIgnores = new ArrayList();
c_GListens = new ArrayList();
c_IrcIgnores = new ArrayList();
c_Sounds = new Hashtable();
c_PerPage = 10;
c_SystemC = 0x161;
c_GlobalMC = 0x26;
c_GlobalCC = 0x47E;
c_GlobalGC = 0x44;
c_GlobalFC = 0x17;
c_GlobalWC = 0x3;
c_StaffC = 0x3B4;
c_MsgC = 0x480;
c_AwayMsg = "";
c_Signature = "";
c_BannedUntil = DateTime.Now;
if (m.AccessLevel >= AccessLevel.Administrator)
c_GlobalAccess = true;
s_Datas[m] = this;
foreach (Channel c in Channel.Channels)
if (c.NewChars)
c.Join(m);
}
开发者ID:guy489,项目名称:runuot2a,代码行数:33,代码来源:Data.cs
示例9: AllowHarmful
public override bool AllowHarmful( Mobile from, Mobile target )
{
if (Contains(from.Location) && Contains(target.Location)) // only when both are inside the region
return true;
else
return false;
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:SanctuaryRegion.cs
示例10: GetAccountDuration
private static string GetAccountDuration( Mobile m )
{
Account a = m.Account as Account;
if ( a == null )
return "";
TimeSpan ts = DateTime.Now - a.Created;
string v;
if ( Format( ts.TotalDays, "This account is {0} day{1} old.", out v ) )
return v;
if ( Format( ts.TotalHours, "This account is {0} hour{1} old.", out v ) )
return v;
if ( Format( ts.TotalMinutes, "This account is {0} minute{1} old.", out v ) )
return v;
if ( Format( ts.TotalSeconds, "This account is {0} second{1} old.", out v ) )
return v;
return "";
}
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:25,代码来源:Profile.cs
示例11: OnMoveOver
public override bool OnMoveOver( Mobile m )
{
if( !m_AllowCreatures && !m.Player )
return true;
if( m.Alive)
{
m.SendMessage( "You must be dead to use this portal." );
m.Say("Duh... I am not dead... Hello? Use a Rune book..");
m.PlaySound( 0x440 );
return true;
}
if( m_TelePets)
{
Server.Mobiles.BaseCreature.TeleportPets( m, m_DestLoc, m_DestMap );
}
m.Say("Have mercy on my soul.");
World.Broadcast( 32, true, "A Darkening chime is heard throughout the land as Dracula has consumed another victim. May {0} rest in peace.", m.Name );
m.PlaySound(0x1F7);
m.MoveToWorld( m_DestLoc, m_DestMap );
return false;
}
开发者ID:greeduomacro,项目名称:dragonknights-uo,代码行数:28,代码来源:DraculasDeadOnlyTeleportalOut.cs
示例12: GetMaxWeight
public const int OverloadAllowance = 4; // We can be four stones overweight without getting fatigued
public static int GetMaxWeight( Mobile m )
{
//return ((( Core.ML && m.Race == Race.Human) ? 100 : 40 ) + (int)(3.5 * m.Str));
//Moved to core virtual method for use there
return m.MaxWeight;
}
开发者ID:nick12344356,项目名称:The-Basement,代码行数:9,代码来源:WeightOverloading.cs
示例13: StealingTarget
public StealingTarget( Mobile thief )
: base(1, false, TargetFlags.None)
{
m_Thief = thief;
AllowNonlocal = true;
}
开发者ID:justdanofficial,项目名称:khaeros,代码行数:7,代码来源:Stealing.cs
示例14: OnMoveOver
public override bool OnMoveOver( Mobile m )
{
if ( m == null || m.Deleted || m.Backpack == null || m.Backpack.Deleted )
return true;
if ( Active && m_itemType != null )
{
if ( !Creatures && !m.Player )
return true;
m_item = m.Backpack.FindItemByType(m_itemType, true);
if ( m_item != null )
{
StartTeleport(m);
return false;
}
else
{
if ( m_Message != null && m != null)
m.SendMessage(m_Message);
}
}
return true;
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:27,代码来源:CheckForItemTeleporter.cs
示例15: OnGotMeleeAttack
public override void OnGotMeleeAttack( Mobile attacker )
{
base.OnGotMeleeAttack( attacker );
if ( 0.40 >= Utility.RandomDouble() ) // 40% chance to clone itself.
AddClonedOoze( attacker, 0.25 );
}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:ClonedOoze.cs
示例16: OnMoveOver
public override bool OnMoveOver( Mobile m )
{
if ( Active )
m.InstanceID = m_DestInstance;
return base.OnMoveOver( m );
}
开发者ID:greeduomacro,项目名称:xrunuo,代码行数:7,代码来源:InstanceTeleporter.cs
示例17: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
if (Amount >= 2)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " " + this.Name));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
}
}
else
{
if (Amount >= 2)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", Amount + " axles with gears"));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "an axle with gears"));
}
}
}
开发者ID:Godkong,项目名称:RunUO,代码行数:25,代码来源:AxleGears.cs
示例18: GetContextMenuEntries
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);
if(m_Plot != null && m_Plot.Active)
list.Add(new RecallRuneEntry(from, this));
}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:PlotSign.cs
示例19: GiveGift
public override void GiveGift( Mobile mob )
{
GiftBox box = new GiftBox();
box.DropItem( new MistletoeDeed() );
box.DropItem( new PileOfGlacialSnow() );
box.DropItem( new LightOfTheWinterSolstice() );
int random = Utility.Random( 100 );
if ( random < 60 )
box.DropItem( new DecorativeTopiary() );
else if ( random < 84 )
box.DropItem( new FestiveCactus() );
else
box.DropItem( new SnowyTree() );
switch ( GiveGift( mob, box ) )
{
case GiftResult.Backpack:
mob.SendMessage( 0x482, "Happy Holidays from the team! Gift items have been placed in your backpack." );
break;
case GiftResult.BankBox:
mob.SendMessage( 0x482, "Happy Holidays from the team! Gift items have been placed in your bank box." );
break;
}
}
开发者ID:Godkong,项目名称:Origins,代码行数:27,代码来源:Winter2004.cs
示例20: DoCure
public void DoCure( Mobile from )
{
bool cure = false;
CureLevelInfo[] info = LevelInfo;
for ( int i = 0; i < info.Length; ++i )
{
CureLevelInfo li = info[i];
if ( li.Poison == from.Poison && Scale( from, li.Chance ) > Utility.RandomDouble() )
{
cure = true;
break;
}
}
if ( cure && from.CurePoison( from ) )
{
from.SendAsciiMessage( "You feel cured of poison!" ); // You feel cured of poison!
from.FixedEffect( 0x373A, 10, 15 );
from.PlaySound( 0x1E0 );
}
else if ( !cure )
{
from.SendAsciiMessage( "That potion was not strong enough to cure your ailment!" ); // That potion was not strong enough to cure your ailment!
}
}
开发者ID:Godkong,项目名称:Origins,代码行数:29,代码来源:BaseCurePotion.cs
注:本文中的Server.Mobile类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论