本文整理匯總了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 ) );
}
}
}
}
示例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!" );
}
}
示例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 ) );
}
}
}
示例4: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (!from.HasGump(typeof(TithingGump)))
{
from.SendGump(new TithingGump(from, 0));
}
}
示例5: OnMoveOver
public override bool OnMoveOver( Mobile m )
{
if ( !m.HasGump( typeof( ConfirmExitInstanceGump ) ) )
m.SendGump( new ConfirmExitInstanceGump( this ) );
return base.OnMoveOver( m );
}
示例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 ));
}
示例7: Notify
public static void Notify( Mobile m )
{
if ( m.HasGump( typeof( ErrorsGump ) ) )
new ErrorsGump( m );
else
new ErrorsNotifyGump( m );
}
示例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 );
}
}
示例9: OnUse
public override void OnUse( Mobile from )
{
if ( from.HasGump( typeof( MonkStrikeGump ) ) )
from.CloseGump( typeof( MonkStrikeGump ) );
from.SendGump( new MonkStrikeGump( from ) );
}
示例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 ) );
}
}
示例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 ) );
}
}
}
示例12: Notify
public static void Notify( Mobile m )
{
if ( m.HasGump( typeof( ErrorsGump ) ) )
ErrorsGump.SendTo( m );
else
ErrorsNotifyGump.SendTo( m );
}
示例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 ) );
}
}
示例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) );
}
示例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 );
}