本文整理汇总了C#中Server.Guilds.Guild.GetVotesFor方法的典型用法代码示例。如果您正苦于以下问题:C# Guild.GetVotesFor方法的具体用法?C# Guild.GetVotesFor怎么用?C# Guild.GetVotesFor使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Guilds.Guild
的用法示例。
在下文中一共展示了Guild.GetVotesFor方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GuildGump
public GuildGump( Mobile beholder, Guild guild ) : base( 20, 30 )
{
m_Mobile = beholder;
m_Guild = guild;
Dragable = false;
AddPage( 0 );
AddBackground( 0, 0, 550, 420, 5054 );
AddBackground( 10, 10, 530, 400, 3000 );
AddHtml( 20, 15, 200, 35, guild.Name, false, false );
Mobile leader = guild.Leader;
if ( leader != null )
{
string leadTitle;
if ( (leadTitle = leader.GuildTitle) != null && (leadTitle = leadTitle.Trim()).Length > 0 )
leadTitle += ": ";
else
leadTitle = "";
string leadName;
if ( (leadName = leader.Name) == null || (leadName = leadName.Trim()).Length <= 0 )
leadName = "(empty)";
AddHtml( 220, 15, 250, 35, leadTitle + leadName, false, false );
}
AddButton( 20, 50, 4005, 4007, 1, GumpButtonType.Reply, 0 );
//AddHtmlLocalized( 55, 50, 100, 20, 1013022, false, false ); // Loyal to
Mobile fealty = beholder.GuildFealty;
//Pix: ensure that GuildFealty if set is a member of the guild - otherwise, null it.
if (fealty != null)
{
if (!guild.IsMember(fealty))
{
beholder.GuildFealty = null;
fealty = null;
}
}
if (fealty == null)
{
fealty = beholder;
}
string fealtyName;
if (fealty == null
|| (fealtyName = fealty.Name) == null
|| (fealtyName = fealtyName.Trim()).Length <= 0)
{
fealtyName = "(empty)";
}
if (beholder == fealty)
{
fealtyName = "Yourself";
}
AddHtml(55, 50, 300, 20, "Loyal to: " + fealtyName, false, false);
//AddHtml(55, 70, 470, 20, "Loyal to: " + fealtyName, false, false);
int votesForMe = m_Guild.GetVotesFor(beholder);
AddHtml(55, 70, 300, 20, "Votes for you: " + votesForMe.ToString(), false, false);
AddButton( 215, 50, 4005, 4007, 2, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 250, 50, 170, 20, 1013023, false, false ); // Display guild abbreviation
AddHtmlLocalized( 250, 70, 50, 20, beholder.DisplayGuildTitle ? 1011262 : 1011263, false, false ); // on/off
AddButton( 20, 100, 4005, 4007, 3, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 55, 100, 470, 30, 1011086, false, false ); // View the current roster.
if (m_Guild.IsNoCountingGuild)
{
AddHtml(320, 100, 470, 20, "Guildmembers cannot report murders.", false, false);
}
else
{
AddHtml(320, 100, 470, 20, "Guildmembers can report murders.", false, false);
}
AddButton( 20, 130, 4005, 4007, 4, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 55, 130, 470, 30, 1011085, false, false ); // Recruit someone into the guild.
if ( guild.Candidates.Count > 0 )
{
AddButton( 20, 160, 4005, 4007, 5, GumpButtonType.Reply, 0 );
AddHtmlLocalized( 55, 160, 470, 30, 1011093, false, false ); // View list of candidates who have been sponsored to the guild.
}
else
//.........这里部分代码省略.........