Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)
This commit is contained in:
parent
e748af4430
commit
513e54f70e
1094 changed files with 15913 additions and 21892 deletions
|
|
@ -11,13 +11,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011097, false, false); // Declare your fealty
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011097); // Declare your fealty
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 250, 35, 1011098, false, false); // I have selected my new lord.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 250, 35, 1011098); // I have selected my new lord.
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 0, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -37,7 +37,8 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = m_List[index];
|
||||
|
||||
if (m != null && !m.Deleted) state.Mobile.GuildFealty = m;
|
||||
if (m?.Deleted == false)
|
||||
state.Mobile.GuildFealty = m;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -46,4 +47,4 @@ namespace Server.Gumps
|
|||
m_Mobile.SendGump(new GuildGump(m_Mobile, m_Guild));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011118, false, false); // Grant a title to another member.
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011118); // Grant a title to another member.
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011127, false, false); // I dub thee...
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011127); // I dub thee...
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -37,7 +37,7 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = m_List[index];
|
||||
|
||||
if (m != null && !m.Deleted)
|
||||
if (m?.Deleted == false)
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage(1013074); // New title (20 characters max):
|
||||
m_Mobile.Prompt = new GuildTitlePrompt(m_Mobile, m, m_Guild);
|
||||
|
|
@ -52,4 +52,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011147, false, false); // Select the guild to accept the invitations:
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011147); // Select the guild to accept the invitations:
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011100, false, false); // Accept war invitations.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011100); // Accept war invitations.
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -62,4 +62,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,13 +12,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1013075, false, false); // Accept or Refuse candidates for membership
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1013075); // Accept or Refuse candidates for membership
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1013076, false, false); // Accept
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1013076); // Accept
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1013077, false, false); // Refuse
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1013077); // Refuse
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -47,7 +47,7 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = m_List[index];
|
||||
|
||||
if (m != null && !m.Deleted)
|
||||
if (m?.Deleted == false)
|
||||
{
|
||||
#region Factions
|
||||
|
||||
|
|
@ -72,7 +72,7 @@ namespace Server.Gumps
|
|||
break;
|
||||
}
|
||||
|
||||
if (targetState != null && targetState.IsLeaving)
|
||||
if (targetState?.IsLeaving == true)
|
||||
{
|
||||
// OSI does this quite strangely, so we'll just do it this way
|
||||
m_Mobile.SendMessage(
|
||||
|
|
@ -109,7 +109,7 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = m_List[index];
|
||||
|
||||
if (m != null && !m.Deleted)
|
||||
if (m?.Deleted == false)
|
||||
{
|
||||
m_Guild.Candidates.Remove(m);
|
||||
|
||||
|
|
@ -128,4 +128,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 500, 35, 1013030, false, false); // <center> Candidates </center>
|
||||
AddHtmlLocalized(20, 10, 500, 35, 1013030); // <center> Candidates </center>
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 300, 35, 1011120, false, false); // Return to the main menu.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 300, 35, 1011120); // Return to the main menu.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -29,4 +29,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,24 +22,23 @@ namespace Server.Gumps
|
|||
AddBackground(0, 0, 550, 400, 5054);
|
||||
AddBackground(10, 10, 530, 380, 3000);
|
||||
|
||||
AddHtmlLocalized(20, 15, 510, 30, 1013062, false, false); // <center>Change Guild Type Menu</center>
|
||||
AddHtmlLocalized(20, 15, 510, 30, 1013062); // <center>Change Guild Type Menu</center>
|
||||
|
||||
AddHtmlLocalized(50, 50, 450, 30, 1013066, false,
|
||||
false); // Please select the type of guild you would like to change to
|
||||
AddHtmlLocalized(50, 50, 450, 30, 1013066); // Please select the type of guild you would like to change to
|
||||
|
||||
AddButton(20, 100, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(85, 100, 300, 30, 1013063, false, false); // Standard guild
|
||||
AddButton(20, 100, 4005, 4007, 1);
|
||||
AddHtmlLocalized(85, 100, 300, 30, 1013063); // Standard guild
|
||||
|
||||
AddButton(20, 150, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddButton(20, 150, 4005, 4007, 2);
|
||||
AddItem(50, 143, 7109);
|
||||
AddHtmlLocalized(85, 150, 300, 300, 1013064, false, false); // Order guild
|
||||
AddHtmlLocalized(85, 150, 300, 300, 1013064); // Order guild
|
||||
|
||||
AddButton(20, 200, 4005, 4007, 3, GumpButtonType.Reply, 0);
|
||||
AddButton(20, 200, 4005, 4007, 3);
|
||||
AddItem(45, 200, 7107);
|
||||
AddHtmlLocalized(85, 200, 300, 300, 1013065, false, false); // Chaos guild
|
||||
AddHtmlLocalized(85, 200, 300, 300, 1013065); // Chaos guild
|
||||
|
||||
AddButton(300, 360, 4005, 4007, 4, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 360, 150, 30, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 360, 4005, 4007, 4);
|
||||
AddHtmlLocalized(335, 360, 150, 30, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -98,4 +97,4 @@ namespace Server.Gumps
|
|||
m_Mobile.SendGump(new GuildmasterGump(m_Mobile, m_Guild));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,25 +20,25 @@ namespace Server.Gumps
|
|||
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);
|
||||
AddHtmlLocalized(55, 360, 300, 35, 1011120); // Return to the main menu.
|
||||
|
||||
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.
|
||||
AddHtmlLocalized(20, 20, 400, 35, 1013032); // 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);
|
||||
AddHtmlLocalized(55, 200, 300, 20, 1011122); // Visit the guild website :
|
||||
|
||||
string website;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -66,4 +66,4 @@ namespace Server.Gumps
|
|||
m_Mobile.SendGump(new GuildGump(m_Mobile, m_Guild));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011137, false, false); // Select the guild you wish to declare peace with.
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011137); // Select the guild you wish to declare peace with.
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011138, false, false); // Send the olive branch.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011138); // Send the olive branch.
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -60,4 +60,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,13 +14,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011065, false, false); // Select the guild you wish to declare war on.
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011065); // Select the guild you wish to declare war on.
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011068, false, false); // Send the challenge!
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011068); // Send the challenge!
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -86,4 +86,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011124, false, false); // Whom do you wish to dismiss?
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011124); // Whom do you wish to dismiss?
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011125, false, false); // Kick them out!
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011125); // Kick them out!
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -37,7 +37,7 @@ namespace Server.Gumps
|
|||
{
|
||||
Mobile m = m_List[index];
|
||||
|
||||
if (m != null && !m.Deleted)
|
||||
if (m?.Deleted == false)
|
||||
{
|
||||
m_Guild.RemoveMember(m);
|
||||
|
||||
|
|
@ -57,4 +57,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ namespace Server.Gumps
|
|||
AddBackground(0, 0, 550, 400, 5054);
|
||||
AddBackground(10, 10, 530, 380, 3000);
|
||||
|
||||
AddHtml(20, 15, 200, 35, guild.Name, false, false);
|
||||
AddHtml(20, 15, 200, 35, guild.Name);
|
||||
|
||||
Mobile leader = guild.Leader;
|
||||
|
||||
|
|
@ -37,11 +37,11 @@ namespace Server.Gumps
|
|||
if ((leadName = leader.Name) == null || (leadName = leadName.Trim()).Length <= 0)
|
||||
leadName = "(empty)";
|
||||
|
||||
AddHtml(220, 15, 250, 35, leadTitle + leadName, false, false);
|
||||
AddHtml(220, 15, 250, 35, leadTitle + leadName);
|
||||
}
|
||||
|
||||
AddButton(20, 50, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 50, 100, 20, 1013022, false, false); // Loyal to
|
||||
AddButton(20, 50, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 50, 100, 20, 1013022); // Loyal to
|
||||
|
||||
Mobile fealty = beholder.GuildFealty;
|
||||
|
||||
|
|
@ -57,55 +57,53 @@ namespace Server.Gumps
|
|||
fealtyName = "(empty)";
|
||||
|
||||
if (beholder == fealty)
|
||||
AddHtmlLocalized(55, 70, 470, 20, 1018002, false, false); // yourself
|
||||
AddHtmlLocalized(55, 70, 470, 20, 1018002); // yourself
|
||||
else
|
||||
AddHtml(55, 70, 470, 20, fealtyName, false, false);
|
||||
AddHtml(55, 70, 470, 20, fealtyName);
|
||||
|
||||
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(215, 50, 4005, 4007, 2);
|
||||
AddHtmlLocalized(250, 50, 170, 20, 1013023); // Display guild abbreviation
|
||||
AddHtmlLocalized(250, 70, 50, 20, beholder.DisplayGuildTitle ? 1011262 : 1011263); // on/off
|
||||
|
||||
AddButton(20, 100, 4005, 4007, 3, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1011086, false, false); // View the current roster.
|
||||
AddButton(20, 100, 4005, 4007, 3);
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1011086); // View the current roster.
|
||||
|
||||
AddButton(20, 130, 4005, 4007, 4, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 130, 470, 30, 1011085, false, false); // Recruit someone into the guild.
|
||||
AddButton(20, 130, 4005, 4007, 4);
|
||||
AddHtmlLocalized(55, 130, 470, 30, 1011085); // 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.
|
||||
AddButton(20, 160, 4005, 4007, 5);
|
||||
AddHtmlLocalized(55, 160, 470, 30, 1011093); // View list of candidates who have been sponsored to the guild.
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(20, 160, 4020);
|
||||
AddHtmlLocalized(55, 160, 470, 30, 1013031, false,
|
||||
false); // There are currently no candidates for membership.
|
||||
AddHtmlLocalized(55, 160, 470, 30, 1013031); // There are currently no candidates for membership.
|
||||
}
|
||||
|
||||
AddButton(20, 220, 4005, 4007, 6, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 220, 470, 30, 1011087, false, false); // View the guild's charter.
|
||||
AddButton(20, 220, 4005, 4007, 6);
|
||||
AddHtmlLocalized(55, 220, 470, 30, 1011087); // View the guild's charter.
|
||||
|
||||
AddButton(20, 250, 4005, 4007, 7, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 250, 470, 30, 1011092, false, false); // Resign from the guild.
|
||||
AddButton(20, 250, 4005, 4007, 7);
|
||||
AddHtmlLocalized(55, 250, 470, 30, 1011092); // Resign from the guild.
|
||||
|
||||
AddButton(20, 280, 4005, 4007, 8, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 280, 470, 30, 1011095, false, false); // View list of guilds you are at war with.
|
||||
AddButton(20, 280, 4005, 4007, 8);
|
||||
AddHtmlLocalized(55, 280, 470, 30, 1011095); // View list of guilds you are at war with.
|
||||
|
||||
if (beholder.AccessLevel >= AccessLevel.GameMaster || beholder == leader)
|
||||
{
|
||||
AddButton(20, 310, 4005, 4007, 9, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 310, 470, 30, 1011094, false, false); // Access guildmaster functions.
|
||||
AddButton(20, 310, 4005, 4007, 9);
|
||||
AddHtmlLocalized(55, 310, 470, 30, 1011094); // Access guildmaster functions.
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(20, 310, 4020);
|
||||
AddHtmlLocalized(55, 310, 470, 30, 1018013, false, false); // Reserved for guildmaster
|
||||
AddHtmlLocalized(55, 310, 470, 30, 1018013); // Reserved for guildmaster
|
||||
}
|
||||
|
||||
AddButton(20, 360, 4005, 4007, 0, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 360, 470, 30, 1011441, false, false); // EXIT
|
||||
AddButton(20, 360, 4005, 4007, 0);
|
||||
AddHtmlLocalized(55, 360, 470, 30, 1011441); // EXIT
|
||||
}
|
||||
|
||||
public static void EnsureClosed(Mobile m)
|
||||
|
|
@ -130,7 +128,7 @@ namespace Server.Gumps
|
|||
|
||||
Item stone = g.Guildstone;
|
||||
|
||||
return stone == null || stone.Deleted || !m.InRange(stone.GetWorldLocation(), 2);
|
||||
return stone?.Deleted != false || !m.InRange(stone.GetWorldLocation(), 2);
|
||||
}
|
||||
|
||||
public static bool BadMember(Mobile m, Guild g)
|
||||
|
|
@ -140,7 +138,7 @@ namespace Server.Gumps
|
|||
|
||||
Item stone = g.Guildstone;
|
||||
|
||||
return stone == null || stone.Deleted || !m.InRange(stone.GetWorldLocation(), 2);
|
||||
return stone?.Deleted != false || !m.InRange(stone.GetWorldLocation(), 2);
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -219,4 +217,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ namespace Server.Gumps
|
|||
if (i != 0)
|
||||
{
|
||||
AddButton(300, 370, 4005, 4007, 0, GumpButtonType.Page, i / 11 + 1);
|
||||
AddHtmlLocalized(335, 370, 300, 35, 1011066, false, false); // Next page
|
||||
AddHtmlLocalized(335, 370, 300, 35, 1011066); // Next page
|
||||
}
|
||||
|
||||
AddPage(i / 11 + 1);
|
||||
|
|
@ -39,7 +39,7 @@ namespace Server.Gumps
|
|||
if (i != 0)
|
||||
{
|
||||
AddButton(20, 370, 4014, 4016, 0, GumpButtonType.Page, i / 11);
|
||||
AddHtmlLocalized(55, 370, 300, 35, 1011067, false, false); // Previous page
|
||||
AddHtmlLocalized(55, 370, 300, 35, 1011067); // Previous page
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace Server.Gumps
|
|||
if (i != 0)
|
||||
{
|
||||
AddButton(300, 370, 4005, 4007, 0, GumpButtonType.Page, i / 11 + 1);
|
||||
AddHtmlLocalized(335, 370, 300, 35, 1011066, false, false); // Next page
|
||||
AddHtmlLocalized(335, 370, 300, 35, 1011066); // Next page
|
||||
}
|
||||
|
||||
AddPage(i / 11 + 1);
|
||||
|
|
@ -40,7 +40,7 @@ namespace Server.Gumps
|
|||
if (i != 0)
|
||||
{
|
||||
AddButton(20, 370, 4014, 4016, 0, GumpButtonType.Page, i / 11);
|
||||
AddHtmlLocalized(55, 370, 300, 35, 1011067, false, false); // Previous page
|
||||
AddHtmlLocalized(55, 370, 300, 35, 1011067); // Previous page
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011148, false, false); // Select the guild to reject their invitations:
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011148); // Select the guild to reject their invitations:
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011101, false, false); // Reject war invitations.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011101); // Reject war invitations.
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -59,4 +59,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,13 +11,13 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011150, false, false); // Select the guild to rescind our invitations:
|
||||
AddHtmlLocalized(20, 10, 400, 35, 1011150); // Select the guild to rescind our invitations:
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011102, false, false); // Rescind your war declarations.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 245, 30, 1011102); // Rescind your war declarations.
|
||||
|
||||
AddButton(300, 400, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012, false, false); // CANCEL
|
||||
AddButton(300, 400, 4005, 4007, 2);
|
||||
AddHtmlLocalized(335, 400, 100, 35, 1011012); // CANCEL
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -59,4 +59,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,10 +11,10 @@ namespace Server.Gumps
|
|||
|
||||
protected override void Design()
|
||||
{
|
||||
AddHtml(20, 10, 500, 35, $"<center>{m_Guild.Name}</center>", false, false);
|
||||
AddHtml(20, 10, 500, 35, $"<center>{m_Guild.Name}</center>");
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 300, 35, 1011120, false, false); // Return to the main menu.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 300, 35, 1011120); // Return to the main menu.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -29,4 +29,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,49 +19,48 @@ namespace Server.Gumps
|
|||
AddBackground(0, 0, 550, 440, 5054);
|
||||
AddBackground(10, 10, 530, 420, 3000);
|
||||
|
||||
AddHtmlLocalized(20, 10, 510, 35, 1011105, false, false); // <center>WAR FUNCTIONS</center>
|
||||
AddHtmlLocalized(20, 10, 510, 35, 1011105); // <center>WAR FUNCTIONS</center>
|
||||
|
||||
AddButton(20, 40, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 40, 400, 30, 1011099, false, false); // Declare war through guild name search.
|
||||
AddButton(20, 40, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 40, 400, 30, 1011099); // Declare war through guild name search.
|
||||
|
||||
int count = 0;
|
||||
|
||||
if (guild.Enemies.Count > 0)
|
||||
{
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011103, false, false); // Declare peace.
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 2);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011103); // Declare peace.
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized(20, 160 + count++ * 30, 400, 30, 1013033, false, false); // No current wars
|
||||
AddHtmlLocalized(20, 160 + count++ * 30, 400, 30, 1013033); // No current wars
|
||||
}
|
||||
|
||||
if (guild.WarInvitations.Count > 0)
|
||||
{
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 3, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011100, false, false); // Accept war invitations.
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 3);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011100); // Accept war invitations.
|
||||
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 4, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011101, false, false); // Reject war invitations.
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 4);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011101); // Reject war invitations.
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized(20, 160 + count++ * 30, 400, 30, 1018012, false,
|
||||
false); // No current invitations received for war.
|
||||
AddHtmlLocalized(20, 160 + count++ * 30, 400, 30, 1018012); // No current invitations received for war.
|
||||
}
|
||||
|
||||
if (guild.WarDeclarations.Count > 0)
|
||||
{
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 5, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011102, false, false); // Rescind your war declarations.
|
||||
AddButton(20, 160 + count * 30, 4005, 4007, 5);
|
||||
AddHtmlLocalized(55, 160 + count++ * 30, 400, 30, 1011102); // Rescind your war declarations.
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtmlLocalized(20, 160 + count++ * 30, 400, 30, 1013055, false, false); // No current war declarations
|
||||
AddHtmlLocalized(20, 160 + count++ * 30, 400, 30, 1013055); // No current war declarations
|
||||
}
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 6, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 400, 35, 1011104, false, false); // Return to the previous menu.
|
||||
AddButton(20, 400, 4005, 4007, 6);
|
||||
AddHtmlLocalized(55, 400, 400, 35, 1011104); // Return to the previous menu.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -73,7 +72,7 @@ namespace Server.Gumps
|
|||
{
|
||||
case 1: // Declare war
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage(1018001); // Declare war through search - Enter Guild Name:
|
||||
m_Mobile.SendLocalizedMessage(1018001); // Declare war through search - Enter Guild Name:
|
||||
m_Mobile.Prompt = new GuildDeclareWarPrompt(m_Mobile, m_Guild);
|
||||
|
||||
break;
|
||||
|
|
@ -116,4 +115,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,69 +20,69 @@ namespace Server.Gumps
|
|||
AddBackground(0, 0, 550, 440, 5054);
|
||||
AddBackground(10, 10, 530, 420, 3000);
|
||||
|
||||
AddHtmlLocalized(20, 10, 500, 35, 1011133, false, false); // <center>WARFARE STATUS</center>
|
||||
AddHtmlLocalized(20, 10, 500, 35, 1011133); // <center>WARFARE STATUS</center>
|
||||
|
||||
AddButton(20, 400, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 400, 300, 35, 1011120, false, false); // Return to the main menu.
|
||||
AddButton(20, 400, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 400, 300, 35, 1011120); // Return to the main menu.
|
||||
|
||||
AddPage(1);
|
||||
|
||||
AddButton(375, 375, 5224, 5224, 0, GumpButtonType.Page, 2);
|
||||
AddHtmlLocalized(410, 373, 100, 25, 1011066, false, false); // Next page
|
||||
AddHtmlLocalized(410, 373, 100, 25, 1011066); // Next page
|
||||
|
||||
AddHtmlLocalized(20, 45, 400, 20, 1011134, false, false); // We are at war with:
|
||||
AddHtmlLocalized(20, 45, 400, 20, 1011134); // We are at war with:
|
||||
|
||||
List<Guild> enemies = guild.Enemies;
|
||||
|
||||
if (enemies.Count == 0)
|
||||
AddHtmlLocalized(20, 65, 400, 20, 1013033, false, false); // No current wars
|
||||
AddHtmlLocalized(20, 65, 400, 20, 1013033); // No current wars
|
||||
else
|
||||
for (int i = 0; i < enemies.Count; ++i)
|
||||
{
|
||||
Guild g = enemies[i];
|
||||
|
||||
AddHtml(20, 65 + i * 20, 300, 20, g.Name, false, false);
|
||||
AddHtml(20, 65 + i * 20, 300, 20, g.Name);
|
||||
}
|
||||
|
||||
AddPage(2);
|
||||
|
||||
AddButton(375, 375, 5224, 5224, 0, GumpButtonType.Page, 3);
|
||||
AddHtmlLocalized(410, 373, 100, 25, 1011066, false, false); // Next page
|
||||
AddHtmlLocalized(410, 373, 100, 25, 1011066); // Next page
|
||||
|
||||
AddButton(30, 375, 5223, 5223, 0, GumpButtonType.Page, 1);
|
||||
AddHtmlLocalized(65, 373, 150, 25, 1011067, false, false); // Previous page
|
||||
AddHtmlLocalized(65, 373, 150, 25, 1011067); // Previous page
|
||||
|
||||
AddHtmlLocalized(20, 45, 400, 20, 1011136, false, false); // Guilds that we have declared war on:
|
||||
AddHtmlLocalized(20, 45, 400, 20, 1011136); // Guilds that we have declared war on:
|
||||
|
||||
List<Guild> declared = guild.WarDeclarations;
|
||||
|
||||
if (declared.Count == 0)
|
||||
AddHtmlLocalized(20, 65, 400, 20, 1018012, false, false); // No current invitations received for war.
|
||||
AddHtmlLocalized(20, 65, 400, 20, 1018012); // No current invitations received for war.
|
||||
else
|
||||
for (int i = 0; i < declared.Count; ++i)
|
||||
{
|
||||
Guild g = declared[i];
|
||||
|
||||
AddHtml(20, 65 + i * 20, 300, 20, g.Name, false, false);
|
||||
AddHtml(20, 65 + i * 20, 300, 20, g.Name);
|
||||
}
|
||||
|
||||
AddPage(3);
|
||||
|
||||
AddButton(30, 375, 5223, 5223, 0, GumpButtonType.Page, 2);
|
||||
AddHtmlLocalized(65, 373, 150, 25, 1011067, false, false); // Previous page
|
||||
AddHtmlLocalized(65, 373, 150, 25, 1011067); // Previous page
|
||||
|
||||
AddHtmlLocalized(20, 45, 400, 20, 1011135, false, false); // Guilds that have declared war on us:
|
||||
AddHtmlLocalized(20, 45, 400, 20, 1011135); // Guilds that have declared war on us:
|
||||
|
||||
List<Guild> invites = guild.WarInvitations;
|
||||
|
||||
if (invites.Count == 0)
|
||||
AddHtmlLocalized(20, 65, 400, 20, 1013055, false, false); // No current war declarations
|
||||
AddHtmlLocalized(20, 65, 400, 20, 1013055); // No current war declarations
|
||||
else
|
||||
for (int i = 0; i < invites.Count; ++i)
|
||||
{
|
||||
Guild g = invites[i];
|
||||
|
||||
AddHtml(20, 65 + i * 20, 300, 20, g.Name, false, false);
|
||||
AddHtml(20, 65 + i * 20, 300, 20, g.Name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -98,4 +98,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,67 +20,66 @@ namespace Server.Gumps
|
|||
AddBackground(0, 0, 550, 400, 5054);
|
||||
AddBackground(10, 10, 530, 380, 3000);
|
||||
|
||||
AddHtmlLocalized(20, 15, 510, 35, 1011121, false, false); // <center>GUILDMASTER FUNCTIONS</center>
|
||||
AddHtmlLocalized(20, 15, 510, 35, 1011121); // <center>GUILDMASTER FUNCTIONS</center>
|
||||
|
||||
AddButton(20, 40, 4005, 4007, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 40, 470, 30, 1011107, false, false); // Set the guild name.
|
||||
AddButton(20, 40, 4005, 4007, 2);
|
||||
AddHtmlLocalized(55, 40, 470, 30, 1011107); // Set the guild name.
|
||||
|
||||
AddButton(20, 70, 4005, 4007, 3, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 70, 470, 30, 1011109, false, false); // Set the guild's abbreviation.
|
||||
AddButton(20, 70, 4005, 4007, 3);
|
||||
AddHtmlLocalized(55, 70, 470, 30, 1011109); // Set the guild's abbreviation.
|
||||
|
||||
if (Guild.OrderChaos)
|
||||
{
|
||||
AddButton(20, 100, 4005, 4007, 4, GumpButtonType.Reply, 0);
|
||||
AddButton(20, 100, 4005, 4007, 4);
|
||||
|
||||
switch (m_Guild.Type)
|
||||
{
|
||||
case GuildType.Regular:
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1013059, false, false); // Change guild type: Currently Standard
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1013059); // Change guild type: Currently Standard
|
||||
break;
|
||||
case GuildType.Order:
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1013057, false, false); // Change guild type: Currently Order
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1013057); // Change guild type: Currently Order
|
||||
break;
|
||||
case GuildType.Chaos:
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1013058, false, false); // Change guild type: Currently Chaos
|
||||
AddHtmlLocalized(55, 100, 470, 30, 1013058); // Change guild type: Currently Chaos
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AddButton(20, 130, 4005, 4007, 5, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 130, 470, 30, 1011112, false, false); // Set the guild's charter.
|
||||
AddButton(20, 130, 4005, 4007, 5);
|
||||
AddHtmlLocalized(55, 130, 470, 30, 1011112); // Set the guild's charter.
|
||||
|
||||
AddButton(20, 160, 4005, 4007, 6, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 160, 470, 30, 1011113, false, false); // Dismiss a member.
|
||||
AddButton(20, 160, 4005, 4007, 6);
|
||||
AddHtmlLocalized(55, 160, 470, 30, 1011113); // Dismiss a member.
|
||||
|
||||
AddButton(20, 190, 4005, 4007, 7, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 190, 470, 30, 1011114, false, false); // Go to the WAR menu.
|
||||
AddButton(20, 190, 4005, 4007, 7);
|
||||
AddHtmlLocalized(55, 190, 470, 30, 1011114); // Go to the WAR menu.
|
||||
|
||||
if (m_Guild.Candidates.Count > 0)
|
||||
{
|
||||
AddButton(20, 220, 4005, 4007, 8, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 220, 470, 30, 1013056, false, false); // Administer the list of candidates
|
||||
AddButton(20, 220, 4005, 4007, 8);
|
||||
AddHtmlLocalized(55, 220, 470, 30, 1013056); // Administer the list of candidates
|
||||
}
|
||||
else
|
||||
{
|
||||
AddImage(20, 220, 4020);
|
||||
AddHtmlLocalized(55, 220, 470, 30, 1013031, false,
|
||||
false); // There are currently no candidates for membership.
|
||||
AddHtmlLocalized(55, 220, 470, 30, 1013031); // There are currently no candidates for membership.
|
||||
}
|
||||
|
||||
AddButton(20, 250, 4005, 4007, 9, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 250, 470, 30, 1011117, false, false); // Set the guildmaster's title.
|
||||
AddButton(20, 250, 4005, 4007, 9);
|
||||
AddHtmlLocalized(55, 250, 470, 30, 1011117); // Set the guildmaster's title.
|
||||
|
||||
AddButton(20, 280, 4005, 4007, 10, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 280, 470, 30, 1011118, false, false); // Grant a title to another member.
|
||||
AddButton(20, 280, 4005, 4007, 10);
|
||||
AddHtmlLocalized(55, 280, 470, 30, 1011118); // Grant a title to another member.
|
||||
|
||||
AddButton(20, 310, 4005, 4007, 11, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 310, 470, 30, 1011119, false, false); // Move this guildstone.
|
||||
AddButton(20, 310, 4005, 4007, 11);
|
||||
AddHtmlLocalized(55, 310, 470, 30, 1011119); // Move this guildstone.
|
||||
|
||||
AddButton(20, 360, 4005, 4007, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(55, 360, 245, 30, 1011120, false, false); // Return to the main menu.
|
||||
AddButton(20, 360, 4005, 4007, 1);
|
||||
AddHtmlLocalized(55, 360, 245, 30, 1011120); // Return to the main menu.
|
||||
|
||||
AddButton(300, 360, 4005, 4007, 0, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(335, 360, 100, 30, 1011441, false, false); // EXIT
|
||||
AddButton(300, 360, 4005, 4007, 0);
|
||||
AddHtmlLocalized(335, 360, 100, 30, 1011441); // EXIT
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
|
|
@ -186,4 +185,4 @@ namespace Server.Gumps
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,27 +23,26 @@ namespace Server.Guilds
|
|||
{
|
||||
base.PopulateGump();
|
||||
|
||||
AddHtmlLocalized(431, 43, 110, 26, 1062978, 0xF, false, false); // Diplomacy
|
||||
AddHtmlLocalized(431, 43, 110, 26, 1062978, 0xF); // Diplomacy
|
||||
|
||||
AddHtmlLocalized(65, 80, 480, 26, 1063124, 0xF, true, false); // <i>Advanced Search Options</i>
|
||||
AddHtmlLocalized(65, 80, 480, 26, 1063124, 0xF, true); // <i>Advanced Search Options</i>
|
||||
|
||||
AddHtmlLocalized(65, 110, 480, 26, 1063136 + (int)m_Display, 0xF, false,
|
||||
false); // Showing All Guilds/w/Relation/Waiting Relation
|
||||
AddHtmlLocalized(65, 110, 480, 26, 1063136 + (int)m_Display, 0xF); // Showing All Guilds/w/Relation/Waiting Relation
|
||||
|
||||
AddGroup(1);
|
||||
AddRadio(75, 140, 0xD2, 0xD3, false, 2);
|
||||
AddHtmlLocalized(105, 140, 200, 26, 1063006, 0x0, false, false); // Show Guilds with Relationship
|
||||
AddHtmlLocalized(105, 140, 200, 26, 1063006, 0x0); // Show Guilds with Relationship
|
||||
AddRadio(75, 170, 0xD2, 0xD3, false, 1);
|
||||
AddHtmlLocalized(105, 170, 200, 26, 1063005, 0x0, false, false); // Show Guilds Awaiting Action
|
||||
AddHtmlLocalized(105, 170, 200, 26, 1063005, 0x0); // Show Guilds Awaiting Action
|
||||
AddRadio(75, 200, 0xD2, 0xD3, false, 0);
|
||||
AddHtmlLocalized(105, 200, 200, 26, 1063007, 0x0, false, false); // Show All Guilds
|
||||
AddHtmlLocalized(105, 200, 200, 26, 1063007, 0x0); // Show All Guilds
|
||||
|
||||
AddBackground(450, 370, 100, 26, 0x2486);
|
||||
AddButton(455, 375, 0x845, 0x846, 5, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(480, 373, 60, 26, 1006044, 0x0, false, false); // OK
|
||||
AddButton(455, 375, 0x845, 0x846, 5);
|
||||
AddHtmlLocalized(480, 373, 60, 26, 1006044, 0x0); // OK
|
||||
AddBackground(340, 370, 100, 26, 0x2486);
|
||||
AddButton(345, 375, 0x845, 0x846, 0, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(370, 373, 60, 26, 1006045, 0x0, false, false); // Cancel
|
||||
AddButton(345, 375, 0x845, 0x846, 0);
|
||||
AddHtmlLocalized(370, 373, 60, 26, 1006045, 0x0); // Cancel
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -66,4 +65,4 @@ namespace Server.Guilds
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,11 +7,7 @@ namespace Server.Guilds
|
|||
{
|
||||
public abstract class BaseGuildGump : Gump
|
||||
{
|
||||
public BaseGuildGump(PlayerMobile pm, Guild g) : this(pm, g, 10, 10)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseGuildGump(PlayerMobile pm, Guild g, int x, int y) : base(x, y)
|
||||
public BaseGuildGump(PlayerMobile pm, Guild g, int x = 10, int y = 10) : base(x, y)
|
||||
{
|
||||
guild = g;
|
||||
player = pm;
|
||||
|
|
@ -31,14 +27,14 @@ namespace Server.Guilds
|
|||
|
||||
AddBackground(0, 0, 600, 440, 0x24AE);
|
||||
AddBackground(66, 40, 150, 26, 0x2486);
|
||||
AddButton(71, 45, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(96, 43, 110, 26, 1063014, 0x0, false, false); // My Guild
|
||||
AddButton(71, 45, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(96, 43, 110, 26, 1063014, 0x0); // My Guild
|
||||
AddBackground(236, 40, 150, 26, 0x2486);
|
||||
AddButton(241, 45, 0x845, 0x846, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(266, 43, 110, 26, 1062974, 0x0, false, false); // Guild Roster
|
||||
AddButton(241, 45, 0x845, 0x846, 2);
|
||||
AddHtmlLocalized(266, 43, 110, 26, 1062974, 0x0); // Guild Roster
|
||||
AddBackground(401, 40, 150, 26, 0x2486);
|
||||
AddButton(406, 45, 0x845, 0x846, 3, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(431, 43, 110, 26, 1062978, 0x0, false, false); // Diplomacy
|
||||
AddButton(406, 45, 0x845, 0x846, 3);
|
||||
AddHtmlLocalized(431, 43, 110, 26, 1062978, 0x0); // Diplomacy
|
||||
AddPage(1);
|
||||
}
|
||||
|
||||
|
|
@ -81,12 +77,7 @@ namespace Server.Guilds
|
|||
m.AccessLevel < AccessLevel.GameMaster && !g.IsMember(m));
|
||||
}
|
||||
|
||||
public static bool CheckProfanity(string s)
|
||||
{
|
||||
return CheckProfanity(s, 50);
|
||||
}
|
||||
|
||||
public static bool CheckProfanity(string s, int maxLength)
|
||||
public static bool CheckProfanity(string s, int maxLength = 50)
|
||||
{
|
||||
//return NameVerification.Validate( s, 1, 50, true, true, false, int.MaxValue, ProfanityProtection.Exceptions, ProfanityProtection.Disallowed, ProfanityProtection.StartDisallowed ); //What am I doing wrong, this still allows chars like the <3 symbol... 3 AM. someone change this to use this
|
||||
|
||||
|
|
@ -126,7 +117,7 @@ namespace Server.Guilds
|
|||
|
||||
public void AddHtmlText(int x, int y, int width, int height, TextDefinition text, bool back, bool scroll)
|
||||
{
|
||||
if (text != null && text.Number > 0)
|
||||
if (text?.Number > 0)
|
||||
AddHtmlLocalized(x, y, width, height, text.Number, back, scroll);
|
||||
else if (text?.String != null)
|
||||
AddHtml(x, y, width, height, text.String, back, scroll);
|
||||
|
|
@ -137,4 +128,4 @@ namespace Server.Guilds
|
|||
return $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ namespace Server.Guilds
|
|||
|
||||
AddBackground(130, 75, 385, 30, 0xBB8);
|
||||
AddTextEntry(135, 80, 375, 30, 0x481, 1, m_Filter);
|
||||
AddButton(520, 75, 0x867, 0x868, 5, GumpButtonType.Reply, 0); //Filter Button
|
||||
AddButton(520, 75, 0x867, 0x868, 5); //Filter Button
|
||||
|
||||
int width = 0;
|
||||
for (int i = 0; i < m_Fields.Length; i++)
|
||||
|
|
@ -69,21 +69,20 @@ namespace Server.Guilds
|
|||
|
||||
int ButtonID = isComparer ? m_Ascending ? 0x983 : 0x985 : 0x2716;
|
||||
|
||||
AddButton(59 + width + f.Width, 117, ButtonID, ButtonID + (isComparer ? 1 : 0), 100 + i,
|
||||
GumpButtonType.Reply, 0);
|
||||
AddButton(59 + width + f.Width, 117, ButtonID, ButtonID + (isComparer ? 1 : 0), 100 + i);
|
||||
|
||||
width += f.Width + 12;
|
||||
}
|
||||
|
||||
if (m_StartNumber <= 0)
|
||||
AddButton(65, 80, 0x15E3, 0x15E7, 0, GumpButtonType.Page, 0);
|
||||
AddButton(65, 80, 0x15E3, 0x15E7, 0, GumpButtonType.Page);
|
||||
else
|
||||
AddButton(65, 80, 0x15E3, 0x15E7, 6, GumpButtonType.Reply, 0); // Back
|
||||
AddButton(65, 80, 0x15E3, 0x15E7, 6); // Back
|
||||
|
||||
if (m_StartNumber + itemsPerPage > m_List.Count)
|
||||
AddButton(95, 80, 0x15E1, 0x15E5, 0, GumpButtonType.Page, 0);
|
||||
AddButton(95, 80, 0x15E1, 0x15E5, 0, GumpButtonType.Page);
|
||||
else
|
||||
AddButton(95, 80, 0x15E1, 0x15E5, 7, GumpButtonType.Reply, 0); // Forward
|
||||
AddButton(95, 80, 0x15E1, 0x15E5, 7); // Forward
|
||||
|
||||
|
||||
int itemNumber = 0;
|
||||
|
|
@ -125,9 +124,9 @@ namespace Server.Guilds
|
|||
}
|
||||
|
||||
if (HasRelationship(o))
|
||||
AddButton(40, 143 + itemNumber * 28, 0x8AF, 0x8AF, 200 + index, GumpButtonType.Reply, 0); //Info Button
|
||||
AddButton(40, 143 + itemNumber * 28, 0x8AF, 0x8AF, 200 + index); //Info Button
|
||||
else
|
||||
AddButton(40, 143 + itemNumber * 28, 0x4B9, 0x4BA, 200 + index, GumpButtonType.Reply, 0); //Info Button
|
||||
AddButton(40, 143 + itemNumber * 28, 0x4B9, 0x4BA, 200 + index); //Info Button
|
||||
}
|
||||
|
||||
protected abstract TextDefinition[] GetValuesFor(T o, int aryLength);
|
||||
|
|
@ -206,4 +205,4 @@ namespace Server.Guilds
|
|||
Comparer = comparer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,26 +14,25 @@ namespace Server.Guilds
|
|||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 500, 300, 0x2422);
|
||||
AddHtmlLocalized(25, 20, 450, 25, 1062939, 0x0, true, false); // <center>GUILD MENU</center>
|
||||
AddHtmlLocalized(25, 60, 450, 60, 1062940, 0x0, false,
|
||||
false); // As you are not a member of any guild, you can create your own by providing a unique guild name and paying the standard guild registration fee.
|
||||
AddHtmlLocalized(25, 135, 120, 25, 1062941, 0x0, false, false); // Registration Fee:
|
||||
AddHtmlLocalized(25, 20, 450, 25, 1062939, 0x0, true); // <center>GUILD MENU</center>
|
||||
AddHtmlLocalized(25, 60, 450, 60, 1062940, 0x0); // As you are not a member of any guild, you can create your own by providing a unique guild name and paying the standard guild registration fee.
|
||||
AddHtmlLocalized(25, 135, 120, 25, 1062941, 0x0); // Registration Fee:
|
||||
AddLabel(155, 135, 0x481, Guild.RegistrationFee.ToString());
|
||||
AddHtmlLocalized(25, 165, 120, 25, 1011140, 0x0, false, false); // Enter Guild Name:
|
||||
AddHtmlLocalized(25, 165, 120, 25, 1011140, 0x0); // Enter Guild Name:
|
||||
AddBackground(155, 160, 320, 26, 0xBB8);
|
||||
AddTextEntry(160, 163, 315, 21, 0x481, 5, guildName);
|
||||
AddHtmlLocalized(25, 191, 120, 26, 1063035, 0x0, false, false); // Abbreviation:
|
||||
AddHtmlLocalized(25, 191, 120, 26, 1063035, 0x0); // Abbreviation:
|
||||
AddBackground(155, 186, 320, 26, 0xBB8);
|
||||
AddTextEntry(160, 189, 315, 21, 0x481, 6, guildAbbrev);
|
||||
AddButton(415, 217, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(345, 217, 0xF2, 0xF1, 0, GumpButtonType.Reply, 0);
|
||||
AddButton(415, 217, 0xF7, 0xF8, 1);
|
||||
AddButton(345, 217, 0xF2, 0xF1, 0);
|
||||
|
||||
if (pm.AcceptGuildInvites)
|
||||
AddButton(20, 260, 0xD2, 0xD3, 2, GumpButtonType.Reply, 0);
|
||||
AddButton(20, 260, 0xD2, 0xD3, 2);
|
||||
else
|
||||
AddButton(20, 260, 0xD3, 0xD2, 2, GumpButtonType.Reply, 0);
|
||||
AddButton(20, 260, 0xD3, 0xD2, 2);
|
||||
|
||||
AddHtmlLocalized(45, 260, 200, 30, 1062943, 0x0, false, false); // <i>Ignore Guild Invites</i>
|
||||
AddHtmlLocalized(45, 260, 200, 30, 1062943, 0x0); // <i>Ignore Guild Invites</i>
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -110,4 +109,4 @@ namespace Server.Guilds
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ namespace Server.Guilds
|
|||
{
|
||||
base.PopulateGump();
|
||||
|
||||
AddHtmlLocalized(431, 43, 110, 26, 1062978, 0xF, false, false); // Diplomacy
|
||||
AddHtmlLocalized(431, 43, 110, 26, 1062978, 0xF); // Diplomacy
|
||||
}
|
||||
|
||||
protected override TextDefinition[] GetValuesFor(Guild g, int aryLength)
|
||||
|
|
@ -137,16 +137,16 @@ namespace Server.Guilds
|
|||
//AddHtmlLocalized( 66, 153 + itemNumber * 28, 280, 26, 1063136 + (int)m_Display, 0xF, false, false ); // Showing All Guilds/Awaiting Action/ w/Relation Ship
|
||||
//AddHtmlText( 66, 153 + itemNumber * 28, 280, 26, m_LowerText, false, false );
|
||||
|
||||
if (m_LowerText != null && m_LowerText.Number > 0)
|
||||
AddHtmlLocalized(66, 153 + itemNumber * 28, 280, 26, m_LowerText.Number, 0xF, false, false);
|
||||
if (m_LowerText?.Number > 0)
|
||||
AddHtmlLocalized(66, 153 + itemNumber * 28, 280, 26, m_LowerText.Number, 0xF);
|
||||
else if (m_LowerText?.String != null)
|
||||
AddHtml(66, 153 + itemNumber * 28, 280, 26, Color(m_LowerText.String, 0x99), false, false);
|
||||
AddHtml(66, 153 + itemNumber * 28, 280, 26, Color(m_LowerText.String, 0x99));
|
||||
|
||||
if (AllowAdvancedSearch)
|
||||
{
|
||||
AddBackground(350, 148 + itemNumber * 28, 200, 26, 0x2486);
|
||||
AddButton(355, 153 + itemNumber * 28, 0x845, 0x846, 8, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(380, 151 + itemNumber * 28, 160, 26, 1063083, 0x0, false, false); // Advanced Search
|
||||
AddButton(355, 153 + itemNumber * 28, 0x845, 0x846, 8);
|
||||
AddHtmlLocalized(380, 151 + itemNumber * 28, 160, 26, 1063083, 0x0); // Advanced Search
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -290,4 +290,4 @@ namespace Server.Guilds
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@ namespace Server.Guilds
|
|||
{
|
||||
private bool m_IsResigning;
|
||||
|
||||
public GuildInfoGump(PlayerMobile pm, Guild g) : this(pm, g, false)
|
||||
{
|
||||
}
|
||||
|
||||
public GuildInfoGump(PlayerMobile pm, Guild g, bool isResigning) : base(pm, g)
|
||||
public GuildInfoGump(PlayerMobile pm, Guild g, bool isResigning = false) : base(pm, g)
|
||||
{
|
||||
m_IsResigning = isResigning;
|
||||
PopulateGump();
|
||||
|
|
@ -24,37 +20,37 @@ namespace Server.Guilds
|
|||
bool isLeader = IsLeader(player, guild);
|
||||
base.PopulateGump();
|
||||
|
||||
AddHtmlLocalized(96, 43, 110, 26, 1063014, 0xF, false, false); // My Guild
|
||||
AddHtmlLocalized(96, 43, 110, 26, 1063014, 0xF); // My Guild
|
||||
|
||||
AddImageTiled(65, 80, 160, 26, 0xA40);
|
||||
AddImageTiled(67, 82, 156, 22, 0xBBC);
|
||||
AddHtmlLocalized(70, 83, 150, 20, 1062954, 0x0, false, false); // <i>Guild Name</i>
|
||||
AddHtml(233, 84, 320, 26, guild.Name, false, false);
|
||||
AddHtmlLocalized(70, 83, 150, 20, 1062954, 0x0); // <i>Guild Name</i>
|
||||
AddHtml(233, 84, 320, 26, guild.Name);
|
||||
|
||||
AddImageTiled(65, 114, 160, 26, 0xA40);
|
||||
AddImageTiled(67, 116, 156, 22, 0xBBC);
|
||||
AddHtmlLocalized(70, 117, 150, 20, 1063025, 0x0, false, false); // <i>Alliance</i>
|
||||
AddHtmlLocalized(70, 117, 150, 20, 1063025, 0x0); // <i>Alliance</i>
|
||||
|
||||
if (guild.Alliance != null && guild.Alliance.IsMember(guild))
|
||||
{
|
||||
AddHtml(233, 118, 320, 26, guild.Alliance.Name, false, false);
|
||||
AddButton(40, 120, 0x4B9, 0x4BA, 6, GumpButtonType.Reply, 0); //Alliance Roster
|
||||
AddHtml(233, 118, 320, 26, guild.Alliance.Name);
|
||||
AddButton(40, 120, 0x4B9, 0x4BA, 6); //Alliance Roster
|
||||
}
|
||||
|
||||
if (Guild.OrderChaos && isLeader)
|
||||
AddButton(40, 154, 0x4B9, 0x4BA, 100, GumpButtonType.Reply, 0); // Guild Faction
|
||||
AddButton(40, 154, 0x4B9, 0x4BA, 100); // Guild Faction
|
||||
|
||||
AddImageTiled(65, 148, 160, 26, 0xA40);
|
||||
AddImageTiled(67, 150, 156, 22, 0xBBC);
|
||||
AddHtmlLocalized(70, 151, 150, 20, 1063084, 0x0, false, false); // <i>Guild Faction</i>
|
||||
AddHtmlLocalized(70, 151, 150, 20, 1063084, 0x0); // <i>Guild Faction</i>
|
||||
|
||||
GuildType gt;
|
||||
Faction f;
|
||||
|
||||
if ((gt = guild.Type) != GuildType.Regular)
|
||||
AddHtml(233, 152, 320, 26, gt.ToString(), false, false);
|
||||
AddHtml(233, 152, 320, 26, gt.ToString());
|
||||
else if ((f = Faction.Find(guild.Leader)) != null)
|
||||
AddHtml(233, 152, 320, 26, f.ToString(), false, false);
|
||||
AddHtml(233, 152, 320, 26, f.ToString());
|
||||
|
||||
AddImageTiled(65, 196, 480, 4, 0x238D);
|
||||
|
||||
|
|
@ -65,21 +61,21 @@ namespace Server.Guilds
|
|||
|
||||
AddHtml(65, 216, 480, 80, s, true, true);
|
||||
if (isLeader)
|
||||
AddButton(40, 251, 0x4B9, 0x4BA, 4, GumpButtonType.Reply, 0); //Charter Edit button
|
||||
AddButton(40, 251, 0x4B9, 0x4BA, 4); //Charter Edit button
|
||||
|
||||
s = guild.Website;
|
||||
if (string.IsNullOrEmpty(s))
|
||||
s = "Guild website not yet set.";
|
||||
AddHtml(65, 306, 480, 30, s, true, false);
|
||||
AddHtml(65, 306, 480, 30, s, true);
|
||||
if (isLeader)
|
||||
AddButton(40, 313, 0x4B9, 0x4BA, 5, GumpButtonType.Reply, 0); //Website Edit button
|
||||
AddButton(40, 313, 0x4B9, 0x4BA, 5); //Website Edit button
|
||||
|
||||
AddCheck(65, 370, 0xD2, 0xD3, player.DisplayGuildTitle, 0);
|
||||
AddHtmlLocalized(95, 370, 150, 26, 1063085, 0x0, false, false); // Show Guild Title
|
||||
AddHtmlLocalized(95, 370, 150, 26, 1063085, 0x0); // Show Guild Title
|
||||
AddBackground(450, 370, 100, 26, 0x2486);
|
||||
|
||||
AddButton(455, 375, 0x845, 0x846, 7, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(480, 373, 60, 26, 3006115, m_IsResigning ? 0x5000 : 0, false, false); // Resign
|
||||
AddButton(455, 375, 0x845, 0x846, 7);
|
||||
AddHtmlLocalized(480, 373, 60, 26, 3006115, m_IsResigning ? 0x5000 : 0); // Resign
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -193,4 +189,4 @@ namespace Server.Guilds
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,13 +20,12 @@ namespace Server.Guilds
|
|||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 350, 170, 0x2422);
|
||||
AddHtmlLocalized(25, 20, 300, 45, 1062946, 0x0, true,
|
||||
false); // <center>You have been invited to join a guild! (Warning: Accepting will make you attackable!)</center>
|
||||
AddHtml(25, 75, 300, 25, $"<center>{guild.Name}</center>", true, false);
|
||||
AddButton(265, 130, 0xF7, 0xF8, 1, GumpButtonType.Reply, 0);
|
||||
AddButton(195, 130, 0xF2, 0xF1, 0, GumpButtonType.Reply, 0);
|
||||
AddButton(20, 130, 0xD2, 0xD3, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(45, 130, 150, 30, 1062943, 0x0, false, false); // <i>Ignore Guild Invites</i>
|
||||
AddHtmlLocalized(25, 20, 300, 45, 1062946, 0x0, true); // <center>You have been invited to join a guild! (Warning: Accepting will make you attackable!)</center>
|
||||
AddHtml(25, 75, 300, 25, $"<center>{guild.Name}</center>", true);
|
||||
AddButton(265, 130, 0xF7, 0xF8, 1);
|
||||
AddButton(195, 130, 0xF2, 0xF1, 0);
|
||||
AddButton(20, 130, 0xD2, 0xD3, 2);
|
||||
AddHtmlLocalized(45, 130, 150, 30, 1062943, 0x0); // <i>Ignore Guild Invites</i>
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -62,4 +61,4 @@ namespace Server.Guilds
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,41 +23,39 @@ namespace Server.Guilds
|
|||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 350, 255, 0x242C);
|
||||
AddHtmlLocalized(20, 15, 310, 26, 1063018, 0x0, false,
|
||||
false); // <div align=center><i>Guild Member Information</i></div>
|
||||
AddHtmlLocalized(20, 15, 310, 26, 1063018, 0x0); // <div align=center><i>Guild Member Information</i></div>
|
||||
AddImageTiled(20, 40, 310, 2, 0x2711);
|
||||
|
||||
AddHtmlLocalized(20, 50, 150, 26, 1062955, 0x0, true, false); // <i>Name</i>
|
||||
AddHtml(180, 53, 150, 26, m_Member.Name, false, false);
|
||||
AddHtmlLocalized(20, 50, 150, 26, 1062955, 0x0, true); // <i>Name</i>
|
||||
AddHtml(180, 53, 150, 26, m_Member.Name);
|
||||
|
||||
AddHtmlLocalized(20, 80, 150, 26, 1062956, 0x0, true, false); // <i>Rank</i>
|
||||
AddHtmlLocalized(180, 83, 150, 26, m_Member.GuildRank.Name, 0x0, false, false);
|
||||
AddHtmlLocalized(20, 80, 150, 26, 1062956, 0x0, true); // <i>Rank</i>
|
||||
AddHtmlLocalized(180, 83, 150, 26, m_Member.GuildRank.Name, 0x0);
|
||||
|
||||
AddHtmlLocalized(20, 110, 150, 26, 1062953, 0x0, true, false); // <i>Guild Title</i>
|
||||
AddHtml(180, 113, 150, 26, m_Member.GuildTitle, false, false);
|
||||
AddHtmlLocalized(20, 110, 150, 26, 1062953, 0x0, true); // <i>Guild Title</i>
|
||||
AddHtml(180, 113, 150, 26, m_Member.GuildTitle);
|
||||
AddImageTiled(20, 142, 310, 2, 0x2711);
|
||||
|
||||
AddBackground(20, 150, 310, 26, 0x2486);
|
||||
AddButton(25, 155, 0x845, 0x846, 4, GumpButtonType.Reply, 0);
|
||||
AddButton(25, 155, 0x845, 0x846, 4);
|
||||
AddHtmlLocalized(50, 153, 270, 26,
|
||||
m_Member == player.GuildFealty && guild.Leader != m_Member ? 1063082 : 1062996, 0x0, false,
|
||||
false); // Clear/Cast Vote For This Member
|
||||
m_Member == player.GuildFealty && guild.Leader != m_Member ? 1063082 : 1062996, 0x0); // Clear/Cast Vote For This Member
|
||||
|
||||
AddBackground(20, 180, 150, 26, 0x2486);
|
||||
AddButton(25, 185, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(50, 183, 110, 26, 1062993, m_ToLeader ? 0x990000 : 0, false, false); // Promote
|
||||
AddButton(25, 185, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(50, 183, 110, 26, 1062993, m_ToLeader ? 0x990000 : 0); // Promote
|
||||
|
||||
AddBackground(180, 180, 150, 26, 0x2486);
|
||||
AddButton(185, 185, 0x845, 0x846, 3, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(210, 183, 110, 26, 1062995, 0x0, false, false); // Set Guild Title
|
||||
AddButton(185, 185, 0x845, 0x846, 3);
|
||||
AddHtmlLocalized(210, 183, 110, 26, 1062995, 0x0); // Set Guild Title
|
||||
|
||||
AddBackground(20, 210, 150, 26, 0x2486);
|
||||
AddButton(25, 215, 0x845, 0x846, 2, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(50, 213, 110, 26, 1062994, 0x0, false, false); // Demote
|
||||
AddButton(25, 215, 0x845, 0x846, 2);
|
||||
AddHtmlLocalized(50, 213, 110, 26, 1062994, 0x0); // Demote
|
||||
|
||||
AddBackground(180, 210, 150, 26, 0x2486);
|
||||
AddButton(185, 215, 0x845, 0x846, 5, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(210, 213, 110, 26, 1062997, m_toKick ? 0x5000 : 0, false, false); // Kick
|
||||
AddButton(185, 215, 0x845, 0x846, 5);
|
||||
AddHtmlLocalized(210, 213, 110, 26, 1062997, m_toKick ? 0x5000 : 0); // Kick
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -252,4 +250,4 @@ namespace Server.Guilds
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,12 +17,12 @@ namespace Server.Guilds
|
|||
new InfoField<PlayerMobile>(1062953, 150, TitleComparer.Instance) //Guild Title
|
||||
};
|
||||
|
||||
public GuildRosterGump(PlayerMobile pm, Guild g) : this(pm, g, LastOnComparer.Instance, false, "", 0)
|
||||
public GuildRosterGump(PlayerMobile pm, Guild g) : this(pm, g, LastOnComparer.Instance)
|
||||
{
|
||||
}
|
||||
|
||||
public GuildRosterGump(PlayerMobile pm, Guild g, IComparer<PlayerMobile> currentComparer, bool ascending,
|
||||
string filter, int startNumber)
|
||||
public GuildRosterGump(PlayerMobile pm, Guild g, IComparer<PlayerMobile> currentComparer, bool ascending = false,
|
||||
string filter = "", int startNumber = 0)
|
||||
: base(pm, g, Utility.SafeConvertList<Mobile, PlayerMobile>(g.Members), currentComparer, ascending, filter,
|
||||
startNumber, m_Fields)
|
||||
{
|
||||
|
|
@ -33,14 +33,14 @@ namespace Server.Guilds
|
|||
{
|
||||
base.PopulateGump();
|
||||
|
||||
AddHtmlLocalized(266, 43, 110, 26, 1062974, 0xF, false, false); // Guild Roster
|
||||
AddHtmlLocalized(266, 43, 110, 26, 1062974, 0xF); // Guild Roster
|
||||
}
|
||||
|
||||
public override void DrawEndingEntry(int itemNumber)
|
||||
{
|
||||
AddBackground(225, 148 + itemNumber * 28, 150, 26, 0x2486);
|
||||
AddButton(230, 153 + itemNumber * 28, 0x845, 0x846, 8, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(255, 151 + itemNumber * 28, 110, 26, 1062992, 0x0, false, false); // Invite Player
|
||||
AddButton(230, 153 + itemNumber * 28, 0x845, 0x846, 8);
|
||||
AddHtmlLocalized(255, 151 + itemNumber * 28, 110, 26, 1062992, 0x0); // Invite Player
|
||||
}
|
||||
|
||||
protected override TextDefinition[] GetValuesFor(PlayerMobile pm, int aryLength)
|
||||
|
|
@ -156,7 +156,7 @@ namespace Server.Guilds
|
|||
else
|
||||
pm.SendLocalizedMessage(1013028); // That person has a different faction affiliation.
|
||||
}
|
||||
else if (targetState != null && targetState.IsLeaving)
|
||||
else if (targetState?.IsLeaving == true)
|
||||
{
|
||||
// OSI does this quite strangely, so we'll just do it this way
|
||||
pm.SendMessage("That person is quitting their faction and so you may not recruit them.");
|
||||
|
|
@ -252,4 +252,4 @@ namespace Server.Guilds
|
|||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ namespace Server.Guilds
|
|||
public void AddButtonAndBackground(int x, int y, int buttonID, int locNum)
|
||||
{
|
||||
AddBackground(x, y, 225, 26, 0x2486);
|
||||
AddButton(x + 5, y + 5, 0x845, 0x846, buttonID, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(x + 30, y + 3, 185, 26, locNum, 0x0, false, false);
|
||||
AddButton(x + 5, y + 5, 0x845, 0x846, buttonID);
|
||||
AddHtmlLocalized(x + 30, y + 3, 185, 26, locNum, 0x0);
|
||||
}
|
||||
|
||||
public override void PopulateGump()
|
||||
|
|
@ -43,20 +43,19 @@ namespace Server.Guilds
|
|||
AddPage(0);
|
||||
|
||||
AddBackground(0, 0, 520, 335, 0x242C);
|
||||
AddHtmlLocalized(20, 15, 480, 26, 1062975, 0x0, false,
|
||||
false); // <div align=center><i>Guild Relationship</i></div>
|
||||
AddHtmlLocalized(20, 15, 480, 26, 1062975, 0x0); // <div align=center><i>Guild Relationship</i></div>
|
||||
AddImageTiled(20, 40, 480, 2, 0x2711);
|
||||
AddHtmlLocalized(20, 50, 120, 26, 1062954, 0x0, true, false); // <i>Guild Name</i>
|
||||
AddHtml(150, 53, 360, 26, m_Other.Name, false, false);
|
||||
AddHtmlLocalized(20, 50, 120, 26, 1062954, 0x0, true); // <i>Guild Name</i>
|
||||
AddHtml(150, 53, 360, 26, m_Other.Name);
|
||||
|
||||
AddHtmlLocalized(20, 80, 120, 26, 1063025, 0x0, true, false); // <i>Alliance</i>
|
||||
AddHtmlLocalized(20, 80, 120, 26, 1063025, 0x0, true); // <i>Alliance</i>
|
||||
|
||||
if (otherAlliance != null)
|
||||
if (otherAlliance.IsMember(m_Other))
|
||||
AddHtml(150, 83, 360, 26, otherAlliance.Name, false, false);
|
||||
AddHtml(150, 83, 360, 26, otherAlliance.Name);
|
||||
|
||||
AddHtmlLocalized(20, 110, 120, 26, 1063139, 0x0, true, false); // <i>Abbreviation</i>
|
||||
AddHtml(150, 113, 120, 26, m_Other.Abbreviation, false, false);
|
||||
AddHtmlLocalized(20, 110, 120, 26, 1063139, 0x0, true); // <i>Abbreviation</i>
|
||||
AddHtml(150, 113, 120, 26, m_Other.Abbreviation);
|
||||
|
||||
|
||||
string kills = "0/0";
|
||||
|
|
@ -92,14 +91,14 @@ namespace Server.Guilds
|
|||
otherKills = Color($"{otherWar.Kills}/{otherWar.MaxKills}", 0x990000);
|
||||
}
|
||||
|
||||
AddHtmlLocalized(280, 110, 120, 26, 1062966, 0x0, true, false); // <i>Your Kills</i>
|
||||
AddHtml(410, 113, 120, 26, kills, false, false);
|
||||
AddHtmlLocalized(280, 110, 120, 26, 1062966, 0x0, true); // <i>Your Kills</i>
|
||||
AddHtml(410, 113, 120, 26, kills);
|
||||
|
||||
AddHtmlLocalized(20, 140, 120, 26, 1062968, 0x0, true, false); // <i>Time Remaining</i>
|
||||
AddHtml(150, 143, 120, 26, time, false, false);
|
||||
AddHtmlLocalized(20, 140, 120, 26, 1062968, 0x0, true); // <i>Time Remaining</i>
|
||||
AddHtml(150, 143, 120, 26, time);
|
||||
|
||||
AddHtmlLocalized(280, 140, 120, 26, 1062967, 0x0, true, false); // <i>Their Kills</i>
|
||||
AddHtml(410, 143, 120, 26, otherKills, false, false);
|
||||
AddHtmlLocalized(280, 140, 120, 26, 1062967, 0x0, true); // <i>Their Kills</i>
|
||||
AddHtml(410, 143, 120, 26, otherKills);
|
||||
|
||||
AddImageTiled(20, 172, 480, 2, 0x2711);
|
||||
|
||||
|
|
@ -155,7 +154,7 @@ namespace Server.Guilds
|
|||
//Withdraw Request
|
||||
AddButtonAndBackground(20, 290, 14, 1062986); // Withdraw Request
|
||||
|
||||
AddHtml(150, 83, 360, 26, Color(alliance.Name, 0x99), false, false);
|
||||
AddHtml(150, 83, 360, 26, Color(alliance.Name, 0x99));
|
||||
}
|
||||
else if (alliance.Leader == m_Other && alliance.IsPendingMember(guild))
|
||||
{
|
||||
|
|
@ -168,7 +167,7 @@ namespace Server.Guilds
|
|||
AddButtonAndBackground(20, 260, 15, 1062988); // Deny Request
|
||||
AddButtonAndBackground(20, 290, 16, 1062987); // Accept Request
|
||||
|
||||
AddHtml(150, 83, 360, 26, Color(alliance.Name, 0x99), false, false);
|
||||
AddHtml(150, 83, 360, 26, Color(alliance.Name, 0x99));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -179,7 +178,7 @@ namespace Server.Guilds
|
|||
|
||||
AddButtonAndBackground(275, 290, 0, 3000091); //Cancel
|
||||
|
||||
AddHtmlLocalized(20, 180, 480, 30, number, 0x0, true, false);
|
||||
AddHtmlLocalized(20, 180, 480, 30, number, 0x0, true);
|
||||
AddImageTiled(20, 245, 480, 2, 0x2711);
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +208,7 @@ namespace Server.Guilds
|
|||
|
||||
case 5: //Accept the war
|
||||
{
|
||||
if (war != null && !war.WarRequester && activeWar == null)
|
||||
if (war?.WarRequester == false && activeWar == null)
|
||||
{
|
||||
if (!playerRank.GetFlag(RankFlags.ControlWarStatus))
|
||||
{
|
||||
|
|
@ -229,7 +228,7 @@ namespace Server.Guilds
|
|||
war.WarBeginning = DateTime.UtcNow;
|
||||
guild.AcceptedWars.Add(war);
|
||||
|
||||
if (alliance != null && alliance.IsMember(guild))
|
||||
if (alliance?.IsMember(guild) == true)
|
||||
{
|
||||
alliance.AllianceMessage(1070769,
|
||||
otherAlliance != null
|
||||
|
|
@ -274,7 +273,7 @@ namespace Server.Guilds
|
|||
}
|
||||
case 6: //Modify war terms
|
||||
{
|
||||
if (war != null && !war.WarRequester && activeWar == null)
|
||||
if (war?.WarRequester == false && activeWar == null)
|
||||
{
|
||||
if (!playerRank.GetFlag(RankFlags.ControlWarStatus))
|
||||
{
|
||||
|
|
@ -338,7 +337,7 @@ namespace Server.Guilds
|
|||
{
|
||||
if (activeWar != null)
|
||||
{
|
||||
if (alliance != null && alliance.IsMember(guild))
|
||||
if (alliance?.IsMember(guild) == true)
|
||||
{
|
||||
alliance.AllianceMessage(1070740,
|
||||
otherAlliance != null
|
||||
|
|
@ -521,7 +520,7 @@ namespace Server.Guilds
|
|||
{
|
||||
pm.SendLocalizedMessage(1063436); // You don't have permission to negotiate an alliance.
|
||||
}
|
||||
else if (alliance != null && alliance.IsMember(guild))
|
||||
else if (alliance?.IsMember(guild) == true)
|
||||
{
|
||||
guild.Alliance = null; //Calls alliance.Removeguild
|
||||
// alliance.RemoveGuild( guild );
|
||||
|
|
@ -544,7 +543,7 @@ namespace Server.Guilds
|
|||
pm.SendLocalizedMessage(1063239,
|
||||
$"{guild.Name}\t{alliance.Name}"); // ~1_val~ is not the leader of the ~2_val~ alliance.
|
||||
}
|
||||
else if (alliance != null && alliance.IsMember(guild) && alliance.IsMember(m_Other))
|
||||
else if (alliance?.IsMember(guild) == true && alliance.IsMember(m_Other))
|
||||
{
|
||||
m_Other.Alliance = null;
|
||||
|
||||
|
|
@ -566,7 +565,7 @@ namespace Server.Guilds
|
|||
pm.SendLocalizedMessage(1063239,
|
||||
$"{guild.Name}\t{alliance.Name}"); // ~1_val~ is not the leader of the ~2_val~ alliance.
|
||||
}
|
||||
else if (alliance != null && alliance.IsMember(guild) && alliance.IsMember(m_Other))
|
||||
else if (alliance?.IsMember(guild) == true && alliance.IsMember(m_Other))
|
||||
{
|
||||
pm.SendLocalizedMessage(1063434,
|
||||
$"{m_Other.Name}\t{alliance.Name}"); // ~1_val~ is now the leader of ~2_val~.
|
||||
|
|
@ -700,4 +699,4 @@ namespace Server.Guilds
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,23 +18,22 @@ namespace Server.Guilds
|
|||
|
||||
AddBackground(0, 0, 500, 340, 0x24AE);
|
||||
AddBackground(65, 50, 370, 30, 0x2486);
|
||||
AddHtmlLocalized(75, 55, 370, 26, 1062979, 0x3C00, false,
|
||||
false); // <div align=center><i>Declaration of War</i></div>
|
||||
AddHtmlLocalized(75, 55, 370, 26, 1062979, 0x3C00); // <div align=center><i>Declaration of War</i></div>
|
||||
AddImage(410, 45, 0x232C);
|
||||
AddHtmlLocalized(65, 95, 200, 20, 1063009, 0x14AF, false, false); // <i>Duration of War</i>
|
||||
AddHtmlLocalized(65, 120, 400, 20, 1063010, 0x0, false, false); // Enter the number of hours the war will last.
|
||||
AddHtmlLocalized(65, 95, 200, 20, 1063009, 0x14AF); // <i>Duration of War</i>
|
||||
AddHtmlLocalized(65, 120, 400, 20, 1063010, 0x0); // Enter the number of hours the war will last.
|
||||
AddBackground(65, 150, 40, 30, 0x2486);
|
||||
AddTextEntry(70, 154, 50, 30, 0x481, 10, war != null ? war.WarLength.Hours.ToString() : "0");
|
||||
AddHtmlLocalized(65, 195, 200, 20, 1063011, 0x14AF, false, false); // <i>Victory Condition</i>
|
||||
AddHtmlLocalized(65, 220, 400, 20, 1063012, 0x0, false, false); // Enter the winning number of kills.
|
||||
AddHtmlLocalized(65, 195, 200, 20, 1063011, 0x14AF); // <i>Victory Condition</i>
|
||||
AddHtmlLocalized(65, 220, 400, 20, 1063012, 0x0); // Enter the winning number of kills.
|
||||
AddBackground(65, 250, 40, 30, 0x2486);
|
||||
AddTextEntry(70, 254, 50, 30, 0x481, 11, war != null ? war.MaxKills.ToString() : "0");
|
||||
AddBackground(190, 270, 130, 26, 0x2486);
|
||||
AddButton(195, 275, 0x845, 0x846, 0, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(220, 273, 90, 26, 1006045, 0x0, false, false); // Cancel
|
||||
AddButton(195, 275, 0x845, 0x846, 0);
|
||||
AddHtmlLocalized(220, 273, 90, 26, 1006045, 0x0); // Cancel
|
||||
AddBackground(330, 270, 130, 26, 0x2486);
|
||||
AddButton(335, 275, 0x845, 0x846, 1, GumpButtonType.Reply, 0);
|
||||
AddHtmlLocalized(360, 273, 90, 26, 1062989, 0x5000, false, false); // Declare War!
|
||||
AddButton(335, 275, 0x845, 0x846, 1);
|
||||
AddHtmlLocalized(360, 273, 90, 26, 1062989, 0x5000); // Declare War!
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState sender, RelayInfo info)
|
||||
|
|
@ -137,4 +136,4 @@ namespace Server.Guilds
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ namespace Server.Gumps
|
|||
else
|
||||
m_Mobile.SendLocalizedMessage(1013028); // That person has a different faction affiliation.
|
||||
}
|
||||
else if (targetState != null && targetState.IsLeaving)
|
||||
else if (targetState?.IsLeaving == true)
|
||||
{
|
||||
// OSI does this quite strangely, so we'll just do it this way
|
||||
m_Mobile.SendMessage("That person is quitting their faction and so you may not recruit them.");
|
||||
|
|
@ -94,4 +94,4 @@ namespace Server.Gumps
|
|||
m_Mobile.SendGump(new GuildGump(m_Mobile, m_Guild));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue