本文整理汇总了C#中Server.Mobile.SendGump方法的典型用法代码示例。如果您正苦于以下问题:C# Mobile.SendGump方法的具体用法?C# Mobile.SendGump怎么用?C# Mobile.SendGump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobile
的用法示例。
在下文中一共展示了Mobile.SendGump方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
Map map = from.Map;
if ( map == null || map == Map.Internal )
return;
if ( from.AccessLevel >= AccessLevel.GameMaster )
{
from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) );
from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) );
}
else
{
if ( !IsChildOf( from.Backpack ) )
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
else if ( !from.InRange( this.GetWorldLocation(), 1 ) )
from.SendLocalizedMessage( 500446 ); // That is too far away.
else if ( DateTime.Now.Month != 12 )
from.SendLocalizedMessage( 1005700 ); // You will have to wait till next December to put your tree back up for display.
else
{
from.CloseGump( typeof( HolidayTreeAddonChoiceGump ) );
from.SendGump( new HolidayTreeAddonChoiceGump( from, this ) );
}
}
}
示例2: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if ( this.IsChildOf( from.Backpack ) )
{
if (i_Owner == 0)
{
i_Owner = from.Serial;
Name = from.Name + "'s Reward Ticket Ledger";
i_RewardTickets = 0;
from.SendGump( new RewardTicketsGump( from, this ) );
}
else if (from.Serial == i_Owner)
{
from.SendGump( new RewardTicketsGump( from, this ) );
}
else if (from.AccessLevel >= AccessLevel.GameMaster)
{
from.SendMessage(1161, "Select a new owner for this Reward ticket ledger.");
BeginSetOwner( from );
}
else
{
from.PlaySound(1074); //play no!! sound
from.SendMessage(1161, "This book is not yours and you cannot seem to write your name in it!");
}
}
else
from.SendMessage(1161, "The Reward ticket ledger must be in your backpack to be used.");
}
示例3: SendTo
public static void SendTo( Mobile to, Mobile sender, Mobile handler, bool staff, PageEntry entry, bool resendEntryGump )
{
to.SendGump( new ChatGumpDisplay( sender, handler, staff, entry ) );
if( resendEntryGump )
to.SendGump( new ChatGumpEntry( sender, handler, entry ) );
}
示例4: 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 ) );
}
示例5: OnTarget
protected override void OnTarget(Mobile from, object targeted)
{
try
{
m_Callback.DynamicInvoke( new object[] { from, targeted } );
}
catch
{
// Console.WriteLine( "The auction system cannot access the cliloc.enu file. Please review the system instructions for proper installation" );
if (targeted != null)
{
// from.SendMessage ("target ! null");
if (targeted is Item)
{
((Item)targeted).Visible = true;
from.SendGump(new AuctionWontAcceptNoticeGump(from));
}
else
{
from.SendGump( new NoticeGump( 1060637, 30720, "Please let a GM know - Aution Target Else.", 0xFFC000, 320, 240, null, null ) );
}
}
else
{
from.SendMessage ("targeted was null");
}
}
}
示例6: Drink
public override void Drink(Mobile from)
{
Item am = from.Backpack.FindItemByType(typeof(RecluseStingMarker));
if (am != null)
{
from.BodyMod = 0;
from.Hue = -1;
from.YellowHealthbar = false;
from.PlaySound(0xF6);
from.PlaySound(0x1F7);
from.FixedParticles(0x3709, 1, 30, 9963, 13, 3, EffectLayer.Head);
BasePotion.PlayDrinkEffect(from);
this.Consume();
from.SendGump(new RecluseAntidoteGump());
//am.Delete();
}
else if (am == null )
{
from.SendGump(new RecluseCuredGump());
}
}
示例7: 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 ) );
}
}
}
}
示例8: OnTarget
protected override void OnTarget(Mobile from, object target)
{
if (from != null && !from.Deleted && target != null)
{
if (target is PlayerMobile)
{
Mobile targetted = target as Mobile;
if (targetted == from)
{
from.SendMessage("Cela sera un jet sur vous-même...");
}
else
{
from.SendMessage("Cela sera un jet contre un joueur...");
targetted.SendMessage("{0} prépare une jet RolePlay avec vous...", from.Name);
}
from.SendGump(new RolePlayGump(from, (Mobile)target, 0, false, 1, false));
}
else if (target is Mobile)
{
from.SendMessage("Cela sera un jet contre un personnage non joueur...");
from.SendGump(new RolePlayGump(from, (Mobile)target, 0, false, 1, false));
}
}
}
示例9: OnTarget
protected override void OnTarget( Mobile from, object targeted )
{
if( targeted is Mobile )
{
Mobile m = ((Mobile)targeted);
if( m == creature )
{
from.SendMessage( "It cannot attack itself!" );
from.SendGump( new CreatureControl( creature, from ) );
}
else
{
if( creature.Alive )
{
m_AI.Action = ActionType.Combat;
m_AI.NextMove = DateTime.Now;
creature.Combatant = m;
from.SendGump( new CreatureControl( creature, from ) );
}
}
}
else
{
from.SendMessage( "You cannot attack that!" );
from.SendGump( new CreatureControl( creature, from ) );
}
}
示例10: OnTarget
protected override void OnTarget( Mobile from, object o )
{
if ( !BaseCommand.IsAccessible( from, o ) )
from.SendMessage( "That is not accessible." );
else if ( m_Normal )
from.SendGump( new PropertiesGump( from, o ) );
else if ( o is Guildstone )
from.SendGump( new PropertiesGump( from, ((Guildstone)o).Guild ) );
}
示例11: 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
{
PlayerMobile pm = from as PlayerMobile;
if( pm.AccessLevel > AccessLevel.Player )
{
from.SendGump( new SetObjectGump( m_Property, m_Mobile, m_Object, m_Stack, m_Type, m_Page, m_List ) );
}
}
}
示例12: OnDoubleClick
public override void OnDoubleClick( Mobile from )
{
if ( m_Faction == null )
return;
if ( from.Kills >= 5 )
{
if (MurderSystemController._MurderersCanJoinAnyFaction == false)
{
if ((m_Faction.Definition.FriendlyName == "True Britannians" || m_Faction.Definition.FriendlyName == "Council of Mages"))
{
from.SendMessage("Murderers cannot join this faction!");
return;
}
}
}
if ( !from.InRange( GetWorldLocation(), 2 ) )
{
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
}
else if ( FactionGump.Exists( from ) )
{
from.SendLocalizedMessage( 1042160 ); // You already have a faction menu open.
}
else if ( from is PlayerMobile )
{
Faction existingFaction = Faction.Find( from );
if ( existingFaction == m_Faction || from.AccessLevel >= AccessLevel.GameMaster )
{
PlayerState pl = PlayerState.Find( from );
if ( pl != null && pl.IsLeaving )
from.SendLocalizedMessage( 1005051 ); // You cannot use the faction stone until you have finished quitting your current faction
else
from.SendGump( new FactionStoneGump( (PlayerMobile) from, m_Faction ) );
}
else if ( existingFaction != null )
{
// TODO: Validate
from.SendLocalizedMessage( 1005053 ); // This is not your faction stone!
}
else
{
from.SendGump( new JoinStoneGump( (PlayerMobile) from, m_Faction ) );
}
}
}
示例13: OnAccepted
public static void OnAccepted( Mobile from )
{
if ( from.Backpack == null )
return;
PlainGreyCloak cloak = from.FindItemOnLayer( Layer.Cloak ) as PlainGreyCloak;
if ( cloak == null )
{
from.DropHolding();
cloak = from.Backpack.FindItemByType<PlainGreyCloak>();
}
if ( cloak == null )
return;
cloak.Delete();
from.PlaceInBackpack( new ShieldOfRecognition() );
/* *smiles* Surely thy deeds will be recognized by those who see thee
* wearing this shield! It shall serve as a reminder of the exalted
* path that thou hast journeyed upon, and I wish to thank thee on
* behalf of all whom thine efforts shall benefit. Ah, let us not
* forget that old cloak I gavest thee - I shall take it back now and
* give thee thine reward. */
from.SendGump( new GenericQuestGump( 1075783 ) );
if ( from is PlayerMobile )
( (PlayerMobile) from ).HumilityQuestStatus = HumilityQuestStatus.RewardAccepted;
}
示例14: OnTarget
protected override void OnTarget( Mobile from, object o )
{
if ( !BaseCommand.IsAccessible( from, o ) )
from.SendMessage( "That is not accessible." );
else
from.SendGump( new PropertiesGump( from, o ) );
}
示例15: OnDoubleClick
public override void OnDoubleClick(Mobile from)
{
if (m_Arena != null && !m_Arena.Deleted && m_Arena.Running)
from.SendGump(new ArenaScoreBoardGump(m_Arena));
else
from.SendMessage("The Arena is under maintainance; there is no score available at the moment.");
}