当前位置: 首页>>代码示例>>C#>>正文


C# Mobile.Send方法代码示例

本文整理汇总了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"));
         }
     }
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:25,代码来源:AxleGears.cs

示例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 : ", "" ) );
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:7,代码来源:Spyglass.cs

示例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"));
         }
     }
 }
开发者ID:Godkong,项目名称:Origins,代码行数:25,代码来源:Amber.cs

示例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;
			}
		}
开发者ID:greeduomacro,项目名称:RuneUO,代码行数:26,代码来源:ScreenEffect.cs

示例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)))));
 }
开发者ID:Godkong,项目名称:Origins,代码行数:7,代码来源:MediumDragonBoat.cs

示例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"));
         }
     }
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:25,代码来源:IncognitoScroll.cs

示例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"));
     }
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:11,代码来源:BetaCandle.cs

示例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)));
     }
 }
开发者ID:Godkong,项目名称:Origins,代码行数:11,代码来源:Head.cs

示例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"));
     }
 }
开发者ID:Godkong,项目名称:Origins,代码行数:11,代码来源:NewHousesDeeds.cs

示例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"));
     }
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:11,代码来源:IndecipherableMap.cs

示例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"));
     }
 }
开发者ID:Godkong,项目名称:Origins,代码行数:11,代码来源:LesserPoisonPotion.cs

示例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"));
     }
 }
开发者ID:Godkong,项目名称:RunUO,代码行数:11,代码来源:MalletAndChisel.cs

示例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)"));
     }
 }
开发者ID:Godkong,项目名称:Origins,代码行数:13,代码来源:FurnitureContainer.cs

示例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 ) );
        }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:33,代码来源:ReportMurderer.cs

示例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 ) );
        }
开发者ID:notsentient,项目名称:RunZHA,代码行数:7,代码来源:SamuraiSpell.cs


注:本文中的Server.Mobile.Send方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。