本文整理汇总了C#中Mobile.Send方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.Send方法的具体用法?C# Mobile.Send怎么用?C# Mobile.Send使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mobile
的用法示例。
在下文中一共展示了Mobile.Send方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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 + " bales of cotton"));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a bale of cotton"));
}
}
}
示例2: OnSwing
public override TimeSpan OnSwing( Mobile attacker, Mobile defender ) {
// Make sure we've been standing still for one second
if( DateTime.Now > (attacker.LastMoveTime + TimeSpan.FromSeconds( Core.AOS ? 0.5 : 1.0 )) || (Core.AOS && WeaponAbility.GetCurrentAbility( attacker ) is MovingShot) ) {
bool canSwing = true;
if( Core.AOS ) {
canSwing = (!attacker.Paralyzed && !attacker.Frozen);
if( canSwing ) {
Spell sp = attacker.Spell as Spell;
canSwing = (sp == null || !sp.IsCasting || !sp.BlocksMovement);
}
}
if( canSwing && attacker.HarmfulCheck( defender ) ) {
attacker.DisruptiveAction();
attacker.Send( new Swing( 0, attacker, defender ) );
if( OnFired( attacker, defender ) ) {
if( CheckHit( attacker, defender ) )
OnHit( attacker, defender );
else
OnMiss( attacker, defender );
}
}
return GetDelay( attacker );
} else {
return TimeSpan.FromSeconds( 0.25 );
}
}
示例3: AsciiMessage
/*public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a ring"));
}
}*/
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
}
else
{
if (Effect != JewelEffect.None)
{
if (Identified || from.AccessLevel >= AccessLevel.GameMaster)
{
if (Effect == JewelEffect.Invisibility)
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", String.Format("a ring of invisibility ({0} charges)", Charges)));
else if (Effect == JewelEffect.Teleportation)
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", String.Format("a ring of teleportation ({0} charges)", Charges)));
}
else
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a magic ring"));
}
else
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a ring"));
}
}
示例4: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (Utility.RandomBool())
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "Ankhs"));
else
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "Serpents"));
}
示例5: OnSingleClick
public override void OnSingleClick(Mobile from)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a wooden chest"));
if (this.Locked == false)
from.Send( new AsciiMessage( Serial, ItemID, MessageType.Label, 0, 3, "", "(" + this.TotalItems + " items, " + this.TotalWeight + " stones)" ) );
if (m_House != null && BaseHouse.DecayEnabled && m_House.DecayPeriod != TimeSpan.Zero)
{
string message;
string full;
switch (m_House.DecayLevel)
{
case DecayLevel.Ageless: message = "ageless"; break;
case DecayLevel.Fairly: message = "fairly worn"; break;
case DecayLevel.Greatly: message = "greatly worn"; break;
case DecayLevel.LikeNew: message = "like new"; break;
case DecayLevel.Slightly: message = "slightly worn"; break;
case DecayLevel.Somewhat: message = "somewhat worn"; break;
default: message = "in danger of collapsing"; break;
}
full = "This tent is " + message + ".";
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", full));
}
}
示例6: 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, "", String.Format("{0} pieces of cloth ({0} yards of cloth)", Amount)));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a piece of cloth (1 yard of cloth)"));
}
}
}
示例7: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
else
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a dungeon wall"));
}
示例8: OnSingleClick
public override void OnSingleClick(Mobile from)
{
int hue = Notoriety.GetHue(Server.Misc.NotorietyHandlers.CorpseNotoriety(from, this));
if (this.ItemID == 0x2006) // Corpse form
from.Send(new MessageLocalized(this.Serial, this.ItemID, MessageType.Label, hue, 3, 1049144, "", this.Name)); // the remains of ~1_NAME~ the apprentice
else
from.Send(new MessageLocalized(this.Serial, this.ItemID, MessageType.Label, hue, 3, 1049145, "", "")); // the remains of a wizard's apprentice
}
示例9: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", (m_Owner == null ? "ribcage" : "ribcage of " + m_Owner)));
}
}
示例10: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "A plate decorated with a beautiful painting of Mondain's defeat as the Gem of Immortality shatters."));
}
}
示例11: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "In Commemoration of the 300th anniversary of Mondain's defeat"));
}
}
示例12: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a dressform"));
}
}
示例13: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.Name != null)
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", this.Name));
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "(" + this.TotalItems + " items, " + this.TotalWeight + " stones)"));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a trash chest"));
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "(" + this.TotalItems + " items, " + this.TotalWeight + " stones)"));
}
}
示例14: SendTo
public static void SendTo( this Prompt prompt, Mobile m )
{
if (m.NetState != null && m.NetState.Version.Major >= 67)
{
m.Send( new PromptGumpStub( prompt, m ).GetPacket() );
}
else
{
if ( prompt.MessageCliloc != 1042971 || prompt.MessageArgs != String.Empty )
m.SendLocalizedMessage( prompt.MessageCliloc, prompt.MessageArgs, prompt.MessageHue );
m.Send( new UnicodePrompt( prompt, m ) );
}
}
示例15: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
BaseBook book;
if (Toggle || mate == null) book = this;
else book = mate;
if (book.Title == null && book.Author == null && book.Writable == true)
{
book.Title = "a book";
book.Author = from.Name;
}
from.Send(new BookHeader(from, book));
from.Send(new BookPageDetails(book));
Toggle = !Toggle;
}