本文整理汇总了C#中Server.Mobiles.PlayerMobile.SendGump方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.SendGump方法的具体用法?C# PlayerMobile.SendGump怎么用?C# PlayerMobile.SendGump使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.SendGump方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SendGumpThreaded
public static void SendGumpThreaded(PlayerMobile to)
{
if (to.AntiMacroGump && m_GumpDictionary.ContainsKey(to))
{
AntiMacroGump oldGump = m_GumpDictionary[to];
m_GumpDictionary.Remove(to);
//Close existing gump if it exists
if (to.HasGump(typeof(AntiMacroGump)))
to.CloseGump(typeof(AntiMacroGump));
to.SendGump(new AntiMacroGump(oldGump) );
return;
}
if ( !MySQLManager.SQLEnabled)
{
to.SendGump(new OldAntiMacroGump(to));
return;
}
AntiMacroGump gump = new AntiMacroGump(to);
new Thread(gump.ThreadedGump).Start();
}
示例2: Resurrect
public static void Resurrect( PlayerMobile m, AnkhOfSacrificeAddon ankh )
{
BaseHouse ankhhouse = BaseHouse.FindHouseAt( ankh );
if ( m != null && ankhhouse != null && ankhhouse.IsFriend( m ) )
{
if ( !m.InRange( ankh.GetWorldLocation(), 2 ) )
m.SendLocalizedMessage( 500446 ); // That is too far away.
else if ( m.Alive )
m.SendLocalizedMessage( 1060197 ); // You are not dead, and thus cannot be resurrected!
else if ( m.AnkhNextUse > DateTime.UtcNow )
{
TimeSpan delay = m.AnkhNextUse - DateTime.UtcNow;
if ( delay.TotalMinutes > 0 )
m.SendLocalizedMessage( 1079265, Math.Round( delay.TotalMinutes ).ToString() ); // You must wait ~1_minutes~ minutes before you can use this item.
else
m.SendLocalizedMessage( 1079263, Math.Round( delay.TotalSeconds ).ToString() ); // You must wait ~1_seconds~ seconds before you can use this item.
}
else
{
m.CloseGump( typeof( AnkhResurrectGump ) );
/*PlayerMobile pres = m as PlayerMobile;
if (pres.MurderBounty > 0)
m.SendGump( new ResurrectGump( m, m, pres.MurderBounty ) );
else*/
m.SendGump( new AnkhResurrectGump( m, ResurrectMessage.VirtueShrine ) );
}
}
}
示例3: Resurrect
public static void Resurrect( PlayerMobile m, AnkhOfSacrificeAddon ankh )
{
if ( m == null )
{
}
else if ( !m.InRange( ankh.GetWorldLocation(), 2 ) )
{
m.SendLocalizedMessage( 500446 ); // That is too far away.
}
else if ( m.Alive )
{
m.SendLocalizedMessage( 1060197 ); // You are not dead, and thus cannot be resurrected!
}
else if ( m.AnkhNextUse > DateTime.UtcNow )
{
TimeSpan delay = m.AnkhNextUse - DateTime.UtcNow;
if ( delay.TotalMinutes > 0 )
m.SendLocalizedMessage( 1079265, Math.Round( delay.TotalMinutes ).ToString() ); // You must wait ~1_minutes~ minutes before you can use this item.
else
m.SendLocalizedMessage( 1079263, Math.Round( delay.TotalSeconds ).ToString() ); // You must wait ~1_seconds~ seconds before you can use this item.
}
else
{
m.CloseGump( typeof( AnkhResurrectGump ) );
m.SendGump( new AnkhResurrectGump( m, ResurrectMessage.VirtueShrine ) );
}
}
示例4: OnTalk
public void OnTalk(PlayerMobile talker, bool contextMenu)
{
if (talker.Player)
{
talker.CloseGump(typeof(DuelScoreGump));
talker.SendGump(new DuelScoreGump(talker));
Say("*The scribe looks trough his scrolls, finds what he is looking for. And hands you a piece of paper with your name on it.*");
}
}
示例5: MLQuestFinishGump
public MLQuestFinishGump( PlayerMobile pm, BaseQuest quest, MondainQuester quester )
: base(75, 25)
{
m_Quest = quest;
m_From = pm;
m_Quester = quester;
if ( m_Quest.Complete == null )
{
if ( QuestHelper.TryDeleteItems( m_Quest ) )
{
if ( QuestHelper.AnyRewards( m_Quest ) )
{
m_From.CloseGump( this.GetType() );
m_From.SendGump( new MLQuestRewardGump( m_Quest ) );
}
else
m_Quest.GiveRewards();
}
return;
}
Intern( "" );
AddPage( 1 );
Closable = false;
AddImageTiled( 50, 20, 400, 400, 0x1404 );
AddImageTiled( 50, 29, 30, 390, 0x28DC );
AddImageTiled( 34, 140, 17, 279, 0x242F );
AddImage( 48, 135, 0x28AB );
AddImage( -16, 285, 0x28A2 );
AddImage( 0, 10, 0x28B5 );
AddImage( 25, 0, 0x28B4 );
AddImageTiled( 83, 15, 350, 15, 0x280A );
AddImage( 34, 419, 0x2842 );
AddImage( 442, 419, 0x2840 );
AddImageTiled( 51, 419, 392, 17, 0x2775 );
AddImageTiled( 415, 29, 44, 390, 0xA2D );
AddImageTiled( 415, 29, 30, 390, 0x28DC );
AddLabelIntern( 100, 50, 0x481, 0 );
AddImage( 370, 50, 0x589 );
AddImage( 379, 60, 0x15A9 );
AddImage( 425, 0, 0x28C9 );
AddImage( 90, 33, 0x232D );
AddHtmlLocalized( 130, 45, 270, 16, 3006156, 0xFFFFFF, false, false ); // Quest Conversation
AddImageTiled( 130, 65, 175, 1, 0x238D );
AddHtmlLocalized( 130, 68, 220, 48, 1114513, String.Format( "#{0}", quest.Title.ToString() ), 0x2710, false, false );
AddHtmlObject( 98, 140, 312, 180, quest.Complete, 0x15F90, false, true );
AddButton( 95, 395, 0x2EE9, 0x2EEB, 4, GumpButtonType.Reply, 0 ); // Continue
AddKRHtmlLocalized( 0, 0, 0, 0, 1011036, false, false );
AddKRHtmlLocalized( 0, 0, 0, 0, 1011012, false, false );
AddButton( 313, 395, 0x2EE6, 0x2EE8, 3, GumpButtonType.Reply, 0 ); // Close
}
示例6: OnTalk
public virtual void OnTalk( PlayerMobile player )
{
if ( QuestHelper.DeliveryArrived( player, this ) )
return;
if ( QuestHelper.InProgress( player, this ) )
return;
if ( QuestHelper.QuestLimitReached( player ) )
return;
// check if this quester can offer any quest chain (already started)
foreach( KeyValuePair<QuestChain,BaseChain> pair in player.Chains )
{
BaseChain chain = pair.Value;
if ( chain != null && chain.Quester != null && chain.Quester == GetType() )
{
BaseQuest quest = QuestHelper.RandomQuest( player, new Type[] { chain.CurrentQuest }, this );
if ( quest != null )
{
player.CloseGump( typeof( MondainQuestGump ) );
player.SendGump( new MondainQuestGump( quest ) );
return;
}
}
}
BaseQuest questt = QuestHelper.RandomQuest( player, Quests, this );
if ( questt != null )
{
player.CloseGump( typeof( MondainQuestGump ) );
player.SendGump( new MondainQuestGump( questt ) );
}
}
示例7: Use
public void Use( PlayerMobile pm )
{
if ( DateTime.Now < pm.NextGemOfSalvationUse )
{
TimeSpan left = pm.NextGemOfSalvationUse - DateTime.Now;
if ( left >= TimeSpan.FromMinutes( 1.0 ) )
pm.SendLocalizedMessage( 1095131, ( ( left.Hours * 60 ) + left.Minutes ).ToString() ); // Your spirit lacks cohesion. You must wait ~1_minutes~ minutes before invoking the power of a Gem of Salvation.
else
pm.SendLocalizedMessage( 1095130, left.Seconds.ToString() ); // Your spirit lacks cohesion. You must wait ~1_seconds~ seconds before invoking the power of a Gem of Salvation.
}
else
{
pm.CloseGump( typeof( ResurrectGump ) );
pm.SendGump( new GemResurrectGump( pm, this ) );
}
}
示例8: OnTalk
public override void OnTalk(PlayerMobile pm)
{
if (!HasQuest(pm))
{
BaseBoat boat = FishQuestHelper.GetBoat(pm);
if (boat != null && boat is BaseGalleon)
{
if (((BaseGalleon)boat).Scuttled)
{
pm.SendLocalizedMessage(1116752); //Your ship is a mess! Fix it first and then we can talk about catching pirates.
}
else
{
ProfessionalBountyQuest q = new ProfessionalBountyQuest((BaseGalleon)boat);
q.Owner = pm;
q.Quester = this;
pm.CloseGump(typeof(MondainQuestGump));
pm.SendGump(new MondainQuestGump(q));
}
}
else if (boat != null && !(boat is BaseGalleon))
{
SayTo(pm, 1116751); //The ship you are captaining could not take on a pirate ship. Bring a warship if you want this quest.
}
else if(m_NextSay < DateTime.UtcNow)
{
if (m_LastSay == 0)
{
if (this.Map != Map.Tokuno)
Say(1152651); //I'm G.B. Bigglesby, proprietor of the G.B. Bigglesby Free Trade Floating Emporium.
else
Say("I am {0}, proprietor of {0} Free Trade Coroporation of Tokuno.", Name);
m_LastSay = 1;
}
else
{
Say(1152652); //This sea market be me life's work and 'tis me pride and joy..
m_LastSay = 0;
}
m_NextSay = DateTime.UtcNow + TimeSpan.FromSeconds(5);
}
}
}
示例9: OnTalk
public override void OnTalk( PlayerMobile player, bool contextMenu )
{
QuestSystem qs = player.Quest;
if ( qs is CollectorQuest )
{
FindSheetMusicObjective obj = qs.FindObjective( typeof( FindSheetMusicObjective ) ) as FindSheetMusicObjective;
if ( obj != null && !obj.Completed )
{
Direction = GetDirectionTo( player );
if ( obj.IsInRightTheater() )
{
player.CloseGump( typeof( SheetMusicOfferGump ) );
player.SendGump( new SheetMusicOfferGump() );
}
else
{
qs.AddConversation( new NoSheetMusicConversation() );
}
}
}
}
示例10: OnTalk
public override void OnTalk(PlayerMobile player)
{
int distance = 100;
BaseBoat boat = FishQuestHelper.GetBoat(player);
if (boat == null)
SayTo(player, 1116514); //Bring yer ship around, I might have some work for ye!);
else
{
bool inRange = InRange(boat.Location, distance) && boat.Map == this.Map;
if (!FishQuestHelper.HasFishQuest(player, this, inRange))
{
FishMonger monger = FishQuestHelper.GetRandomMonger(player, this);
if (monger == null)
SayTo(player, "It seems my fellow fish mongers are on vacation. Try again later, or perhaps another Facet.");
else
{
ProfessionalFisherQuest quest = new ProfessionalFisherQuest(player, monger, this, boat);
if (quest != null)
{
quest.Quester = this;
quest.Owner = player;
player.CloseGump(typeof(MondainQuestGump));
player.SendGump(new MondainQuestGump(quest));
if (boat.IsClassicBoat)
this.SayTo(player, "Such a weak vessle can only catch a weak line.");
}
}
}
}
}
示例11: OnComplete
public override void OnComplete( PlayerMobile from )
{
from.SendGump( new RaceChangeConfirmGump( this, from, Race.Human ) );
}
示例12: DeliveryArrived
public static bool DeliveryArrived(PlayerMobile player, BaseVendor vendor)
{
for (int i = 0; i < player.Quests.Count; i ++)
{
BaseQuest quest = player.Quests[i];
for (int j = 0; j < quest.Objectives.Count; j ++)
{
BaseObjective objective = quest.Objectives[j];
if (objective is DeliverObjective)
{
DeliverObjective deliver = (DeliverObjective)objective;
if (deliver.Update(vendor))
{
if (quest.Completed)
{
player.SendLocalizedMessage(1046258, null, 0x23); // Your quest is complete.
player.PlaySound(quest.CompleteSound);
quest.OnCompleted();
if (vendor is MondainQuester)
player.SendGump(new MondainQuestGump(player, quest, MondainQuestGump.Section.Complete, false, true, (MondainQuester)vendor));
else
player.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
}
return true;
}
}
}
}
return false;
}
示例13: CompleteQuest
public static void CompleteQuest(PlayerMobile from, BaseQuest quest)
{
if (quest == null)
return;
for (int i = 0; i < quest.Objectives.Count; i ++)
{
BaseObjective obj = quest.Objectives[i];
obj.Complete();
}
from.SendLocalizedMessage(1046258, null, 0x23); // Your quest is complete.
from.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
from.PlaySound(quest.CompleteSound);
quest.OnCompleted();
}
示例14: EmbraceHonor
private static void EmbraceHonor( PlayerMobile pm )
{
if ( pm.HonorActive )
{
pm.SendLocalizedMessage( 1063230 ); // You must wait awhile before you can embrace honor again.
return;
}
if ( GetHonorDuration( pm ) == 0 )
{
pm.SendLocalizedMessage( 1063234 ); // You do not have enough honor to do that
return;
}
TimeSpan waitTime = DateTime.UtcNow - pm.LastHonorUse;
if ( waitTime < UseDelay )
{
TimeSpan remainingTime = UseDelay - waitTime;
int remainingMinutes = (int) Math.Ceiling( remainingTime.TotalMinutes );
pm.SendLocalizedMessage( 1063240, remainingMinutes.ToString() ); // You must wait ~1_HONOR_WAIT~ minutes before embracing honor again
return;
}
pm.SendGump( new HonorSelf( pm ) );
}
示例15: SendGump
public override void SendGump(PlayerMobile pm)
{
DiceRider game = GetGame(pm) as DiceRider;
if (game == null)
{
game = new DiceRider(pm, this);
AddGame(pm, game);
}
DiceRiderGump g = pm.FindGump(typeof(DiceRiderGump)) as DiceRiderGump;
if (g != null)
g.Refresh();
else
{
pm.SendGump(new DiceRiderGump(pm, game));
}
}