當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。