本文整理汇总了C#中Server.Guilds.Guild.IsProtected方法的典型用法代码示例。如果您正苦于以下问题:C# Guild.IsProtected方法的具体用法?C# Guild.IsProtected怎么用?C# Guild.IsProtected使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Guilds.Guild
的用法示例。
在下文中一共展示了Guild.IsProtected方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GuildProtectionMenu
public GuildProtectionMenu( Mobile from, Guild guild )
: base("Guild Protection", null)
{
m_Mobile = from;
m_Guild = guild;
List<String> list = new List<String>();
if ( m_Guild.IsProtected( m_Guild.Leader ) )
{
int total = 0;
foreach ( Mobile m in m_Guild.Protected )
{
if ( m == m_Guild.Leader )
total += Guild.ProtectionRateLeader;
else
total -= Guild.ProtectionRateMember;
if ( total < 5000 )
total = 5000;
}
TimeSpan days = m_Guild.LastProtectionPayment.AddDays(m_Guild.ProtectionPeriod.TotalDays) - DateTime.Now;
list.Add( String.Format( "Toggle guild protection and lockdowns. Currently on. The next payment of {0:n0} gold pieces will be charged in {1} days.", total, Math.Ceiling( days.TotalDays ) ) );
}
else
{
list.Add( "Toggle guild protection and lockdowns. Currently off." );
}
list.Add( "Set guild house sign." );
list.Add( "Grant protection to a guild member." );
list.Add( "Revoke protection from a guild member." );
list.Add( "Return to main menu." );
Answers = list.ToArray();
}