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


C# Mobile.SendGump方法代码示例

本文整理汇总了C#中Mobile.SendGump方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.SendGump方法的具体用法?C# Mobile.SendGump怎么用?C# Mobile.SendGump使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Mobile的用法示例。


在下文中一共展示了Mobile.SendGump方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnTargetFinish

		protected override void OnTargetFinish( Mobile from )
		{
			if ( m_Type == typeof( Type ) )
				from.SendGump( new PropertiesGump( m_Mobile, m_Object, m_Stack, m_List, m_Page ) );
			else
				from.SendGump( new SetObjectGump( m_Property, m_Mobile, m_Object, m_Stack, m_Type, m_Page, m_List ) );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:7,代码来源:SetObjectTarget.cs

示例2: OnDoubleClick

        public override void OnDoubleClick(Mobile from)
        {
            if (Filled)
            {
                if (from.InRange(this, 3) && from.InLOS(this))
                {
                    from.SendAsciiMessage("You look at the Tombstone");
                    from.PlaySound(47);
                    from.SendGump(new GraveGump());
                }
                else if (IsChildOf(from.Backpack))
                {
                    from.SendAsciiMessage("You look at the Tombstone");
                    from.PlaySound(47);
                    from.SendGump(new GraveGump());
                }
                else
                {
                    from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
                }
            }

            if (!(Filled))
            {
                if (!IsChildOf(from.Backpack))
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                else
                {
                    from.Target = new InternalTarget(this);
                    from.SendAsciiMessage("This tombstone is blank!");
                    from.SendAsciiMessage("Target a players head to bury them.");
                }
            }
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:34,代码来源:Gravestone.cs

示例3: OnDoubleClick

 public override void OnDoubleClick( Mobile from )
 {
     if ( m_Game != null )
     {
         if ( m_Game.OpenJoin )
         {
             if ( m_Game.IsInGame( from ) )
             {
                 from.SendGump( new GameTeamSelector( m_Game ) );
             }
             else
             {
                 if ( from.AccessLevel == AccessLevel.Player )
                     from.SendGump( new GameJoinGump( m_Game, m_GameName ) );
                 else
                     from.SendMessage( "It might not be wise for staff to be playing..." );
             }
         }
         else
         {
             from.SendMessage( "{0} join is closed.", m_GameName );
         }
     }
     else
     {
         from.SendMessage( "This stone must be linked to a game stone.  Please contact a game master." );
     }
 }
开发者ID:cynricthehun,项目名称:UOLegends,代码行数:28,代码来源:GameJoin.cs

示例4: OnDoubleClick

		public override void OnDoubleClick(Mobile m)
		{
			if (!m.InRange(GetWorldLocation(), 2) || ValorRewardController.Instance == null)
			{
				return;
			}
			m.CloseGump(typeof(ValorBoardGump));
			m.CloseGump(typeof(ValorBoardGumpBritish));
			m.CloseGump(typeof(ValorBoardGumpSide));
			m.SendGump(new ValorBoardGumpBritish());
			m.SendGump(new ValorBoardGump(ValorRewardController.Instance, 0, null, null, null, false));
			m.SendGump(new ValorBoardGumpSide(m, m, ValorRewardController.Instance));
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:13,代码来源:ValorBoard.cs

示例5: ApplyHungerStatMod

        public static void ApplyHungerStatMod(Mobile m)
        {
            if (m is PlayerMobile && m.AccessLevel == AccessLevel.Player)
            {
                m.CloseGump(typeof(HungerGump));
                m.SendGump(new HungerGump(m));
            }

            int HungerModStr = 0;

            if (m.Hunger == 0)
                HungerModStr = 0;
            else if (m.Hunger < 4)
                HungerModStr = 1;
            else if (m.Hunger < 8)
                HungerModStr = 2;
            else if (m.Hunger < 12)
                HungerModStr = 3;
            else if (m.Hunger < 16)
                HungerModStr = 4;
            else if (m.Hunger <= 20)
                HungerModStr = 5;

            m.AddStatMod(new StatMod(StatType.Str, "HungerModStr", HungerModStr, TimeSpan.Zero));
        }
开发者ID:greeduomacro,项目名称:last-wish,代码行数:25,代码来源:FoodDecay.cs

示例6: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
				return;
			
			if ( m_UsesRemaining > 0 )
			{
				from.SendLocalizedMessage( 1072357 ); // Select an object to engrave.
				from.Target = new TargetWeapon( this );
			}
			else 
			{
				if ( from.Skills.Tinkering.Value == 0 )
				{
					from.SendLocalizedMessage( 1076179 ); // Since you have no tinkering skill, you will need to find an NPC tinkerer to repair this for you.					
				}
				else if ( from.Skills.Tinkering.Value < 75.0 )
				{		
					from.SendLocalizedMessage( 1076178 ); // Your tinkering skill is too low to fix this yourself.  An NPC tinkerer can help you repair this for a fee.
				}
				else
				{					
					Item diamond = from.Backpack.FindItemByType( typeof( BlueDiamond ) );	
					
					if ( diamond != null )
						from.SendGump( new ConfirmGump( this, null ) );	
					else					
						from.SendLocalizedMessage( 1076166 ); // You do not have a blue diamond needed to recharge the engraving tool.	
				}
				
				from.SendLocalizedMessage( 1076163 ); // There are no charges left on this engraving tool.
			}		
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:33,代码来源:WeaponEngravingTool.cs

示例7: OnTargetFinish

		protected override void OnTargetFinish( Mobile from )
		{
			if ( !m_Plant.Deleted && m_Plant.PlantStatus < PlantStatus.DecorativePlant && m_Plant.PlantStatus != PlantStatus.BowlOfDirt && from.InRange( m_Plant.GetWorldLocation(), 3 ) && m_Plant.IsUsableBy( from ) )
			{
				from.SendGump( new ReproductionGump( m_Plant ) );
			}
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:7,代码来源:PollinateTarget.cs

示例8: OnTarget

            protected override void OnTarget(Mobile from, object targeted)
            {
                if (targeted is DyeTub)
                {
                    DyeTub tub = (DyeTub)targeted;

                    if (tub.Redyable)
                    {
                        if (tub.CustomHuePicker == null)
                            from.SendHuePicker(new InternalPicker(tub));
                        else
                            from.SendGump(new CustomHuePickerGump(from, tub.CustomHuePicker, new CustomHuePickerCallback(SetTubHue), tub));
                    }
                    else if (tub is BlackDyeTub)
                    {
                        from.SendLocalizedMessage(1010092); // You can not use this on a black dye tub.
                    }
                    else
                    {
                        from.SendMessage("That dye tub may not be redyed.");
                    }
                }
                else
                {
                    from.SendLocalizedMessage(500857); // Use this on a dye tub.
                }
            }
开发者ID:Crome696,项目名称:ServUO,代码行数:27,代码来源:Dyes.cs

示例9: SendMessage

 private static void SendMessage(Mobile m)
 {
     Account acct = (Account)m.Account;
     m.CloseGump(typeof(MotDGump));
     m.SendGump(new MotDGump(m, LastMessage));
     acct.SetTag("MotD", "true");
 }
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:7,代码来源:MoTD.cs

示例10: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			ttt = this;
			if( IsChildOf( from.Backpack ) )
			{
				fromBackpack = true;
				from.SendGump( new SelectGump( from, ttt ) );
			}
			else if( IsChildOf( from.BankBox ) )
			{
				fromBackpack = false;
				from.SendGump( new SelectGump( from, ttt ) );
			}
			else
				from.SendMessage( "This item has to either be in your backpack or bank" );
		}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:16,代码来源:TeamTourTicket.cs

示例11: OnTarget

			protected override void OnTarget(Mobile from, object targeted)
			{
				if (from != null)
				{
					if (targeted != null && targeted is PlayerMobile)
					{
						PlayerMobile pm = (PlayerMobile)targeted;
						DuelPoints dp = null;

						if (DuelController.PointsTable.TryGetValue(pm.Serial, out dp))
						{
							from.SendGump(new DuelPlayerInfoGump(dp));
						}
						else
						{
							if (from == pm)
								from.SendMessage(53, "You have no dueling record.");
							else
								from.SendMessage(53, "That player has no dueling record.");
						}
					}
					else
					{
						from.SendMessage(32, "That's not a player!");
					}
				}
			}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:27,代码来源:DuelPlayerInfoGump.cs

示例12: OnTarget

			protected override void OnTarget(Mobile from, object targeted)
			{
				if (m_Item.Deleted)
				{
					return;
				}

				if (targeted is Item && !((Item)targeted).IsStandardLoot())
				{
					// Scissors can not be used on that to produce anything.
					// from.SendLocalizedMessage(502440); 

					if (targeted is IScissorable)
					{
						from.SendGump(new BlessedClothingCutGump((IScissorable)targeted, m_Item));
					}
					else
					{
						from.SendLocalizedMessage(502440);
					}
				}
				else if (m_Item.EraAOS && targeted == from)
				{
					// That doesn't seem like the smartest thing to do.
					// That was an encounter you don't wish to repeat.
					// Ha! You missed!
					from.SendLocalizedMessage(1062845 + Utility.Random(3));
				}
				else if (m_Item.EraSE && Utility.RandomDouble() > 0.20 && (from.Direction & Direction.Running) != 0 &&
						 DateTime.UtcNow - from.LastMoveTime < from.ComputeMovementSpeed(from.Direction))
				{
					// Didn't your parents ever tell you not to run with scissors in your hand?!
					from.SendLocalizedMessage(1063305);
				}
				else if (targeted is Item && !((Item)targeted).Movable)
				{
					if (targeted is IScissorable && (targeted is PlagueBeastInnard || targeted is PlagueBeastMutationCore))
					{
						var obj = (IScissorable)targeted;

						if (obj.Scissor(from, m_Item))
						{
							from.PlaySound(0x248);
						}
					}
				}
				else if (targeted is IScissorable)
				{
					var obj = (IScissorable)targeted;

					if (obj.Scissor(from, m_Item))
					{
						from.PlaySound(0x248);
					}
				}
				else
				{
					from.SendLocalizedMessage(502440); // Scissors can not be used on that to produce anything.
				}
			}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:60,代码来源:Scissors.cs

示例13: OnDoubleClick

		public override void OnDoubleClick(Mobile from)
		{
			if (m_Statue != null)
			{
				from.SendGump(new CharacterPlinthGump(m_Statue));
			}
		}
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:7,代码来源:CharacterStatuePlinth.cs

示例14: OnTarget

			protected override void OnTarget( Mobile from, object targeted )
			{
				if(from == null) return;

                PlayerMobile pm = targeted as PlayerMobile;
                if (pm != null && from.AccessLevel <= pm.AccessLevel)
                {
                    from.SendAsciiMessage("You can only do this to staff with lower privs");
                    return;
                }

				// does it have an xmldialog attachment?
				XmlDialog xd = XmlAttach.FindAttachment(targeted, typeof(XmlDialog)) as XmlDialog;

			    if(xd == null)
				{
					from.SendMessage("Target has no XmlDialog attachment");

					// TODO: ask whether they would like to add one
					from.SendGump( new XmlConfirmAddGump(from, targeted));

					return;
				}

				from.SendGump( new XmlEditDialogGump(from, true, xd, -1, 0, null, false, null, 0, 0));
			}
开发者ID:FreeReign,项目名称:imaginenation,代码行数:26,代码来源:XmlEdit.cs

示例15: OnTarget

 protected override void OnTarget(Mobile from, object targeted)
 {
     if (m_Tool != null && (targeted is Cloth || targeted is BoltOfCloth || targeted is BaseLeather))
         from.SendGump(new CraftGump(from, DefTailoring.CraftSystem, m_Tool, null));
     else
         from.SendAsciiMessage("You cant use this on that!");
 }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:7,代码来源:SewingKit.cs


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