本文整理匯總了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 ) );
}
}