當前位置: 首頁>>代碼示例>>C#>>正文


C# Mobile.HasGump方法代碼示例

本文整理匯總了C#中Server.Mobile.HasGump方法的典型用法代碼示例。如果您正苦於以下問題:C# Mobile.HasGump方法的具體用法?C# Mobile.HasGump怎麽用?C# Mobile.HasGump使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Mobile的用法示例。


在下文中一共展示了Mobile.HasGump方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{	
			if ( from.InRange( GetWorldLocation(), 2 ) )
			{
				if ( BlueMageControl.IsBlueMage( from ) )
				{
					if ( from.HasGump( typeof( BlueQuitGump ) ) )
						from.CloseGump( typeof( BlueQuitGump ) );

					from.SendGump( new BlueQuitGump( from ) );
				}
				else
				{
					if ( from.AccessLevel == AccessLevel.Player )
						from.SendMessage( "Please speak to Ben in New Haven" );
					else
					{
						if ( from.HasGump( typeof( BlueAcceptGump ) ) )
							from.CloseGump( typeof( BlueAcceptGump ) );
						
						from.SendGump( new BlueAcceptGump( from ) );
					}
				}
			}

		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:26,代碼來源:BlueJoinStone.cs

示例2: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if( m_Owner == from && !from.HasGump( typeof( TentManagementGump ) ) && !from.HasGump( typeof( ConfirmTentPlacementGump ) ) )
			{
				from.SendGump( new TentManagementGump( from, this ) );
			}
			else
			{
				from.SendMessage( "This is not your tent!" );
			}
		}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:11,代碼來源:TentBedroll.cs

示例3: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			PlayerMobile m;

			if ( m_Points < 1 )
			{
				from.SendMessage("That is empty!");
			}
			else if ( !IsChildOf( from.Backpack ) )
			{
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			}
			else if ( from.HasGump( typeof( IncreaseSkillsGump ) ) )
			{
				from.SendMessage( "You may not have more than one Skill Gump running." );
			}
			else
			{
				if ( from is PlayerMobile )
				{
					m = from as PlayerMobile;
					m.SendGump( new IncreaseSkillsGump( m, this, true, 0 ) );
				}
			}
		}
開發者ID:Tukaramdas,項目名稱:ServUO-EC-Test-Fork,代碼行數:25,代碼來源:SkillBall.cs

示例4: OnDoubleClick

 public override void OnDoubleClick(Mobile from)
 {
     if (!from.HasGump(typeof(TithingGump)))
     {
         from.SendGump(new TithingGump(from, 0));
     }
 }
開發者ID:greeduomacro,項目名稱:annox,代碼行數:7,代碼來源:Donate.cs

示例5: OnMoveOver

		public override bool OnMoveOver( Mobile m )
		{
			if ( !m.HasGump( typeof( ConfirmExitInstanceGump ) ) )
				m.SendGump( new ConfirmExitInstanceGump( this ) );

			return base.OnMoveOver( m );
		}
開發者ID:Crome696,項目名稱:ServUO,代碼行數:7,代碼來源:InstanceExitGate.cs

示例6: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if (from.HasGump( typeof (CraftRequestGump) ) )
				from.CloseGump( typeof (CraftRequestGump) );
			
			from.SendGump( new CraftRequestGump( 1, this, from, ref m_orders ));
		}
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:7,代碼來源:Ordertaker.cs

示例7: Notify

		public static void Notify( Mobile m )
		{
			if ( m.HasGump( typeof( ErrorsGump ) ) )
				new ErrorsGump( m );
			else
				new ErrorsNotifyGump( m );
		}
開發者ID:greeduomacro,項目名稱:vivre-uo,代碼行數:7,代碼來源:Errors.cs

示例8: HelpGump

		public HelpGump( Mobile from )
			: base( 0, 0 )
		{
			_from = from;

			if( from.HasGump( typeof( HelpGump ) ) )
				from.CloseGump( typeof( HelpGump ) );

			AddPage( 0 );
			AddBackground( 10, 10, 430, 350, 9250 );
			AddAlphaRegion( 25, 50, 400, 265 );
			AddLabel( 100, 30, LabelHue, "Help Menu" );

			AddLabel( 345, 320, LabelHue, "Cancel" );
			AddButton( 395, 320, 4020, 4022, 0, GumpButtonType.Reply, 0 );

			AddHtml( 70, 60, 350, 75, @"<u>General Question:</u> Select this option if you have a general gameplay question. This encompasses questions about the shard's custom systems, command usage, and skill usage.", true, true );
			AddHtml( 70, 145, 350, 75, @"<u>Harrassment:</u> Use this option if another player is harrassing you, verbally or with game mechanics (i.e. luring monsters to attack you). Please be aware that we take all harrassment claims seriously, and it is inadvisable to report illegitimate claims of this type.", true, true );
			AddHtml( 70, 230, 350, 75, @"<u>Other:</u> Select this page type if your question or concern does not fall under any of the others. Use this category for suggestions, bug reports, and account management questions as well.", true, true );

			int x = 35, y = 85;

			for( int i = 1; i < 4; i++, y += 85 )
			{
				AddButton( x, y, 4005, 4007, i, GumpButtonType.Reply, 0 );
			}
		}
開發者ID:greeduomacro,項目名稱:hubroot,代碼行數:27,代碼來源:HelpGump.cs

示例9: OnUse

		public override void OnUse( Mobile from )
		{
			if ( from.HasGump( typeof( MonkStrikeGump ) ) )
				from.CloseGump( typeof( MonkStrikeGump ) );

			from.SendGump( new MonkStrikeGump( from ) );
		}
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:7,代碼來源:MonkStrike.cs

示例10: OnTargetFinish

 protected override void OnTargetFinish( Mobile from )
 {
     if ( !m_Plant.Deleted && m_Plant.PlantStatus < PlantStatus.DecorativePlant && from.InRange( m_Plant.GetWorldLocation(), 3 ) && m_Plant.IsUsableBy( from ) && !from.HasGump( typeof(MainPlantGump) ) )
     {
         from.SendGump( new MainPlantGump( m_Plant ) );
     }
 }
開發者ID:vexilar,項目名稱:RunUO_Rebar,代碼行數:7,代碼來源:PlantPourTarget.cs

示例11: OnDoubleClick

        public override void OnDoubleClick( Mobile from )
        {
            if ( this.Parent != null || !this.VerifyMove( from ) )
                return;

            if ( !from.InRange( this, 2 ) )
            {
                from.LocalOverheadMessage( MessageType.Regular, 0x3B2, true, "I can't reach that." ); // I can't reach that.
                return;
            }

            if ( this.ItemID == 0xA57 ) // rolled
            {
                Direction dir = PlayerMobile.GetDirection4( from.Location, this.Location );

                if ( dir == Direction.North || dir == Direction.South )
                    this.ItemID = 0xA55;
                else
                    this.ItemID = 0xA56;
            }
            else // unrolled
            {
                this.ItemID = 0xA57;

                if ( !from.HasGump( typeof( LogoutGump ) ) )
                {
                    CampfireEntry entry = Campfire.GetEntry( from );

                    if ( entry != null && entry.Safe )
                        from.SendGump( new LogoutGump( entry, this ) );
                }
            }
        }
開發者ID:Godkong,項目名稱:Origins,代碼行數:33,代碼來源:Bedroll.cs

示例12: Notify

		public static void Notify( Mobile m )
		{
			if ( m.HasGump( typeof( ErrorsGump ) ) )
				ErrorsGump.SendTo( m );
			else
				ErrorsNotifyGump.SendTo( m );
		}
開發者ID:greeduomacro,項目名稱:uodarktimes-1,代碼行數:7,代碼來源:Errors.cs

示例13: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			BaseHouse house = BaseHouse.FindHouseAt( this );
			if ( !( house == null || !house.IsOwner( from ) || !house.IsCoOwner( from ) ) && !from.HasGump( typeof(FlameCloseGump) ) )
			{
				from.SendGump( new FlameCloseGump( this ) );
			}
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:8,代碼來源:FlamingHead.cs

示例14: Resend

        public void Resend( Mobile from )
        {
            AddOnEditor_Att addoneditor = (AddOnEditor_Att)XmlAttach.FindAttachment(from, typeof(AddOnEditor_Att));

            if( from.HasGump(typeof(AddOnEditor)) ) {
                from.CloseGump(typeof(AddOnEditor));
            }
            from.SendGump( new AddOnEditor( from, addoneditor) );
        }
開發者ID:zerodowned,項目名稱:My-Stuff,代碼行數:9,代碼來源:AddOnEditor_Att.cs

示例15: OnDoubleClick

		public override void OnDoubleClick( Mobile from )
		{
			if ( !IsChildOf( from.Backpack ) )
				from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
			else if ( from.HasGump( typeof(CarpetGump) ) )
				from.SendMessage( "You are already choosing a style of carpet." );
			else
				BoundingBoxPicker.Begin( from, new BoundingBoxCallback( BoundingBox_Callback ), null );
		}
開發者ID:kamronbatman,項目名稱:DefianceUO-Pre1.10,代碼行數:9,代碼來源:CarpetAddonDeed.cs


注:本文中的Server.Mobile.HasGump方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。