本文整理汇总了C#中Server.Mobiles.PlayerMobile.SendMenu方法的典型用法代码示例。如果您正苦于以下问题:C# PlayerMobile.SendMenu方法的具体用法?C# PlayerMobile.SendMenu怎么用?C# PlayerMobile.SendMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Mobiles.PlayerMobile
的用法示例。
在下文中一共展示了PlayerMobile.SendMenu方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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.Now )
{
TimeSpan delay = m.AnkhNextUse - DateTime.Now;
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( ResurrectGump ) );
m.SendMenu(new ResurrectGump(m, ResurrectMessage.VirtueShrine));
//m.CloseGump( typeof( AnkhResurrectGump ) );
//m.SendGump( new AnkhResurrectGump( m, ResurrectMessage.VirtueShrine ) );
}
}