Fixes code according to modern code style. Fixes a few expression bugs.
This commit is contained in:
parent
89eea25e5f
commit
970fd563b2
3324 changed files with 441118 additions and 433755 deletions
|
|
@ -3,68 +3,67 @@ using Server.Network;
|
|||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class GuildCharterGump : Gump
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private Guild m_Guild;
|
||||
public class GuildCharterGump : Gump
|
||||
{
|
||||
private const string DefaultWebsite = "https://github.com/runuo/";
|
||||
private Guild m_Guild;
|
||||
private Mobile m_Mobile;
|
||||
|
||||
private const string DefaultWebsite = "https://github.com/runuo/";
|
||||
public GuildCharterGump(Mobile from, Guild guild) : base(20, 30)
|
||||
{
|
||||
m_Mobile = from;
|
||||
m_Guild = guild;
|
||||
|
||||
public GuildCharterGump( Mobile from, Guild guild ) : base( 20, 30 )
|
||||
{
|
||||
m_Mobile = from;
|
||||
m_Guild = guild;
|
||||
Dragable = false;
|
||||
|
||||
Dragable = false;
|
||||
AddPage(0);
|
||||
AddBackground(0, 0, 550, 400, 5054);
|
||||
AddBackground(10, 10, 530, 380, 3000);
|
||||
|
||||
AddPage( 0 );
|
||||
AddBackground( 0, 0, 550, 400, 5054 );
|
||||
AddBackground( 10, 10, 530, 380, 3000 );
|
||||
AddButton(20, 360, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 360, 300, 35, 1011120, false, false); // Return to the main menu.
|
||||
|
||||
AddButton( 20, 360, 4005, 4007, 1, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 55, 360, 300, 35, 1011120, false, false ); // Return to the main menu.
|
||||
string charter;
|
||||
|
||||
string charter;
|
||||
if ((charter = guild.Charter) == null || (charter = charter.Trim()).Length <= 0)
|
||||
AddHtmlLocalized(20, 20, 400, 35, 1013032, false, false); // No charter has been defined.
|
||||
else
|
||||
AddHtml(20, 20, 510, 75, charter, true, true);
|
||||
|
||||
if ( (charter = guild.Charter) == null || (charter = charter.Trim()).Length <= 0 )
|
||||
AddHtmlLocalized( 20, 20, 400, 35, 1013032, false, false ); // No charter has been defined.
|
||||
else
|
||||
AddHtml( 20, 20, 510, 75, charter, true, true );
|
||||
AddButton(20, 200, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 200, 300, 20, 1011122, false, false); // Visit the guild website :
|
||||
|
||||
AddButton( 20, 200, 4005, 4007, 2, GumpButtonType.Reply, 0 );
|
||||
AddHtmlLocalized( 55, 200, 300, 20, 1011122, false, false ); // Visit the guild website :
|
||||
string website;
|
||||
|
||||
string website;
|
||||
if ((website = guild.Website) == null || (website = website.Trim()).Length <= 0)
|
||||
website = DefaultWebsite;
|
||||
|
||||
if ( (website = guild.Website) == null || (website = website.Trim()).Length <= 0 )
|
||||
website = DefaultWebsite;
|
||||
AddHtml(55, 220, 300, 20, website, false, false);
|
||||
}
|
||||
|
||||
AddHtml( 55, 220, 300, 20, website, false, false );
|
||||
}
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
if (GuildGump.BadMember(m_Mobile, m_Guild))
|
||||
return;
|
||||
|
||||
public override void OnResponse( NetState state, RelayInfo info )
|
||||
{
|
||||
if ( GuildGump.BadMember( m_Mobile, m_Guild ) )
|
||||
return;
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0: return; // Close
|
||||
case 1: break; // Return to main menu
|
||||
case 2:
|
||||
{
|
||||
string website;
|
||||
|
||||
switch ( info.ButtonID )
|
||||
{
|
||||
case 0: return; // Close
|
||||
case 1: break; // Return to main menu
|
||||
case 2:
|
||||
{
|
||||
string website;
|
||||
if ((website = m_Guild.Website) == null || (website = website.Trim()).Length <= 0)
|
||||
website = DefaultWebsite;
|
||||
|
||||
if ( (website = m_Guild.Website) == null || (website = website.Trim()).Length <= 0 )
|
||||
website = DefaultWebsite;
|
||||
m_Mobile.LaunchBrowser(website);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
m_Mobile.LaunchBrowser( website );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
GuildGump.EnsureClosed( m_Mobile );
|
||||
m_Mobile.SendGump( new GuildGump( m_Mobile, m_Guild ) );
|
||||
}
|
||||
}
|
||||
GuildGump.EnsureClosed(m_Mobile);
|
||||
m_Mobile.SendGump(new GuildGump(m_Mobile, m_Guild));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue