Formatting #2 (#59)

This commit is contained in:
Kamron Batman 2019-10-05 00:37:03 -07:00 committed by GitHub
parent 096d39609e
commit 8e9221bb5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
400 changed files with 3688 additions and 5969 deletions

View file

@ -47,23 +47,13 @@ namespace Server.Gumps
!Guild.NewGuildSystem && GuildGump.BadLeader(m_Mobile, m_Guild))
return;
GuildType newType;
switch (info.ButtonID)
var newType = info.ButtonID switch
{
default:
newType = m_Guild.Type;
break;
case 1:
newType = GuildType.Regular;
break;
case 2:
newType = GuildType.Order;
break;
case 3:
newType = GuildType.Chaos;
break;
}
1 => GuildType.Regular,
2 => GuildType.Order,
3 => GuildType.Chaos,
_ => m_Guild.Type
};
if (m_Guild.Type != newType)
{

View file

@ -31,7 +31,7 @@ namespace Server.Guilds
AddImageTiled(67, 116, 156, 22, 0xBBC);
AddHtmlLocalized(70, 117, 150, 20, 1063025, 0x0); // <i>Alliance</i>
if (guild.Alliance != null && guild.Alliance.IsMember(guild))
if (guild.Alliance?.IsMember(guild) == true)
{
AddHtml(233, 118, 320, 26, guild.Alliance.Name);
AddButton(40, 120, 0x4B9, 0x4BA, 6); //Alliance Roster
@ -119,7 +119,7 @@ namespace Server.Guilds
case 6:
{
//Alliance Roster
if (guild.Alliance != null && guild.Alliance.IsMember(guild))
if (guild.Alliance?.IsMember(guild) == true)
pm.SendGump(new AllianceInfo.AllianceRosterGump(pm, guild, guild.Alliance));
break;

View file

@ -356,7 +356,7 @@ namespace Server.Guilds
guild.AcceptedWars.Remove(activeWar);
if (otherAlliance != null && otherAlliance.IsMember(otherGuild))
if (otherAlliance?.IsMember(otherGuild) == true)
{
otherAlliance.AllianceMessage(1070739,
guild.Alliance != null
@ -523,7 +523,7 @@ namespace Server.Guilds
else if (alliance?.IsMember(guild) == true)
{
guild.Alliance = null; //Calls alliance.Removeguild
// alliance.RemoveGuild( guild );
// alliance.RemoveGuild( guild );
m_Other.InvalidateWarNotoriety();

View file

@ -23,11 +23,11 @@ namespace Server.Guilds
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");
AddTextEntry(70, 154, 50, 30, 0x481, 10, war?.WarLength.Hours.ToString() ?? "0");
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");
AddTextEntry(70, 254, 50, 30, 0x481, 11, war?.MaxKills.ToString() ?? "0");
AddBackground(190, 270, 130, 26, 0x2486);
AddButton(195, 275, 0x845, 0x846, 0);
AddHtmlLocalized(220, 273, 90, 26, 1006045, 0x0); // Cancel