本文整理汇总了C#中Server.Mobile.Send方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.Send方法的具体用法?C# Mobile.Send怎么用?C# Mobile.Send使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.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 + " axles with gears"));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "an axle with gears"));
}
}
}
示例2: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1008155 ); // You peer into the heavens, seeking the moons...
from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Trammel, from.X, from.Y ), "", AffixType.Prepend, "Trammel : ", "" ) );
from.Send( new MessageLocalizedAffix( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 1008146 + (int)Clock.GetMoonPhase( Map.Felucca, from.X, from.Y ), "", AffixType.Prepend, "Felucca : ", "" ) );
}
示例3: 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 + " pieces of amber"));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a piece of amber"));
}
}
}
示例4: Send
public static void Send(this ScreenFX effect, Mobile to)
{
if (to == null)
{
return;
}
switch (effect)
{
case ScreenFX.FadeOut:
to.Send(VNScreenFadeOut.Instance);
break;
case ScreenFX.FadeIn:
to.Send(VNScreenFadeIn.Instance);
break;
case ScreenFX.LightFlash:
to.Send(VNScreenLightFlash.Instance);
break;
case ScreenFX.FadeInOut:
to.Send(VNScreenFadeInOut.Instance);
break;
case ScreenFX.DarkFlash:
to.Send(VNScreenDarkFlash.Instance);
break;
}
}
示例5: OnSingleClick
public override void OnSingleClick(Mobile from)
{
if (this.ShipName != null)
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", String.Format("a ship claim ticket from {0} for the {1}", BaseRegion.GetRuneNameFor(Region.Find(DockLocation, Map.Felucca)), this.ShipName)));
else
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", String.Format("a ship claim ticket from {0}", BaseRegion.GetRuneNameFor(Region.Find(DockLocation, Map.Felucca)))));
}
示例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, "", Amount + " Incognito scrolls"));
}
else
{
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "a Incognito scroll"));
}
}
}
示例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, "", "I lit the way, Origins Beta Tester"));
}
}
示例8: 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 ? "brain" : "brain of " + m_Owner)));
}
}
示例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, "", "a deed to a blacksmith's shop"));
}
}
示例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, "", "an indecipherable map"));
}
}
示例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, "", "a Lesser Poison potion"));
}
}
示例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 mallet and chisel"));
}
}
示例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, "", "an armoire"));
from.Send(new AsciiMessage(Serial, ItemID, MessageType.Label, 0, 3, "", "(" + this.TotalItems + " items, " + this.TotalWeight + " stones)"));
}
}
示例14: SendNext
public static void SendNext( Mobile to )
{
if ( to.NetState == null )
{
m_Killers.Remove( to.Serial );
return;
}
ArrayList list = m_Killers[to.Serial] as ArrayList;
if ( list == null || list.Count <= 0 )
{
m_Killers.Remove( to.Serial );
if ( to is PlayerMobile && !((PlayerMobile)to).AssumePlayAsGhost )
new ResNowOption( to ).SendTo( to.NetState );
return;
}
Mobile killer = (Mobile)list[0];
list.RemoveAt( 0 );
if ( killer == null || killer.Deleted || !killer.Player )
{
SendNext( to );
return;
}
Item[] gold = to.BankBox.FindItemsByType( typeof( Gold ), true );
int total = 0;
for(int i=0;i<gold.Length && total < 5000;i++)
total += gold[i].Amount;
if ( total > 5000 )
total = 5000;
to.Send( new BountyEntry( killer, total ) );
}
示例15: OnEffectEnd
public static void OnEffectEnd( Mobile caster, Type type )
{
int spellID = SpellRegistry.GetRegistryNumber( type );
if ( spellID > 0 )
caster.Send( new ToggleSpecialAbility( spellID + 1, false ) );
}