" + count, false, false);
+ AddHtml(35, 25, 190, 20, Center("Starting"));
+ AddHtml(35, 25, 190, 20, "
" + count);
}
int y = 25 + 20;
for (int i = 0; i < parts.Count; ++i)
{
- Participant p = (Participant)parts[i];
+ Participant p = parts[i];
y += 4;
@@ -66,7 +66,7 @@ namespace Server.Engines.ConPVP
if (p.Players.Length > 1)
{
- AddHtml(35 + 14, y, 176, 20, $"Participant #{i + 1}", false, false);
+ AddHtml(35 + 14, y, 176, 20, $"Participant #{i + 1}");
y += 22;
offset = 10;
}
@@ -75,7 +75,7 @@ namespace Server.Engines.ConPVP
{
DuelPlayer pl = p.Players[j];
- if (pl != null && pl.Ready)
+ if (pl?.Ready == true)
{
AddImage(35 + offset, y + 4, 0x939);
}
@@ -87,7 +87,7 @@ namespace Server.Engines.ConPVP
string name = pl == null ? "(Empty)" : pl.Mobile.Name;
- AddHtml(35 + offset + 14, y, 166, 20, name, false, false);
+ AddHtml(35 + offset + 14, y, 166, 20, name);
y += 22;
}
@@ -106,4 +106,4 @@ namespace Server.Engines.ConPVP
{
}
}
-}
\ No newline at end of file
+}
diff --git a/Scripts/Engines/ConPVP/Gumps/ReadyUpGump.cs b/Scripts/Engines/ConPVP/Gumps/ReadyUpGump.cs
index c19878547..e97899ef9 100644
--- a/Scripts/Engines/ConPVP/Gumps/ReadyUpGump.cs
+++ b/Scripts/Engines/ConPVP/Gumps/ReadyUpGump.cs
@@ -26,10 +26,10 @@ namespace Server.Engines.ConPVP
AddBackground(0, 0, 210, height, 9250);
AddBackground(10, 10, 190, height - 20, 0xDAC);
- AddHtml(35, 25, 140, 20, Center("Rematch?"), false, false);
+ AddHtml(35, 25, 140, 20, Center("Rematch?"));
- AddButton(35, 55, 247, 248, 1, GumpButtonType.Reply, 0);
- AddButton(115, 55, 242, 241, 2, GumpButtonType.Reply, 0);
+ AddButton(35, 55, 247, 248, 1);
+ AddButton(115, 55, 242, 241, 2);
}
else
{
@@ -58,7 +58,7 @@ namespace Server.Engines.ConPVP
AddBackground(0, 0, 260, height, 9250);
AddBackground(10, 10, 240, height - 20, 0xDAC);
- AddHtml(35, 25, 190, 20, Center("Participants"), false, false);
+ AddHtml(35, 25, 190, 20, Center("Participants"));
int y = 20 + 25;
@@ -72,7 +72,7 @@ namespace Server.Engines.ConPVP
if (p.Players.Length > 1)
{
- AddHtml(35, y, 176, 20, $"Team #{i + 1}", false, false);
+ AddHtml(35, y, 176, 20, $"Team #{i + 1}");
y += 22;
offset = 10;
}
@@ -83,7 +83,7 @@ namespace Server.Engines.ConPVP
string name = pl == null ? "(Empty)" : pl.Mobile.Name;
- AddHtml(35 + offset, y, 166, 20, name, false, false);
+ AddHtml(35 + offset, y, 166, 20, name);
y += 22;
}
@@ -91,12 +91,12 @@ namespace Server.Engines.ConPVP
y += 8;
- AddHtml(35, y, 176, 20, "Continue?", false, false);
+ AddHtml(35, y, 176, 20, "Continue?");
y -= 2;
AddButton(102, y, 247, 248, 0, GumpButtonType.Page, 2);
- AddButton(169, y, 242, 241, 2, GumpButtonType.Reply, 0);
+ AddButton(169, y, 242, 241, 2);
#endregion
@@ -118,7 +118,7 @@ namespace Server.Engines.ConPVP
defs = new BitArray(basedef.Options);
for (int i = 0; i < ruleset.Flavors.Count; ++i)
- defs.Or(((Ruleset)ruleset.Flavors[i]).Options);
+ defs.Or(ruleset.Flavors[i].Options);
height += ruleset.Flavors.Count * 18;
}
@@ -140,20 +140,20 @@ namespace Server.Engines.ConPVP
AddBackground(0, 0, 260, height, 9250);
AddBackground(10, 10, 240, height - 20, 0xDAC);
- AddHtml(35, 25, 190, 20, Center("Rules"), false, false);
+ AddHtml(35, 25, 190, 20, Center("Rules"));
- AddHtml(35, 50, 190, 20, $"Set: {basedef.Title}", false, false);
+ AddHtml(35, 50, 190, 20, $"Set: {basedef.Title}");
y = 70;
for (int i = 0; i < ruleset.Flavors.Count; ++i, y += 18)
- AddHtml(35, y, 190, 20, $" + {((Ruleset)ruleset.Flavors[i]).Title}", false, false);
+ AddHtml(35, y, 190, 20, $" + {ruleset.Flavors[i].Title}");
y += 4;
if (changes > 0)
{
- AddHtml(35, y, 190, 20, "Modifications:", false, false);
+ AddHtml(35, y, 190, 20, "Modifications:");
y += 20;
for (int i = 0; i < opts.Length; ++i)
@@ -164,7 +164,7 @@ namespace Server.Engines.ConPVP
if (name != null) // sanity
{
AddImage(35, y, opts[i] ? 0xD3 : 0xD2);
- AddHtml(60, y, 165, 22, name, false, false);
+ AddHtml(60, y, 165, 22, name);
}
y += 22;
@@ -172,18 +172,18 @@ namespace Server.Engines.ConPVP
}
else
{
- AddHtml(35, y, 190, 20, "Modifications: None", false, false);
+ AddHtml(35, y, 190, 20, "Modifications: None");
y += 20;
}
y += 8;
- AddHtml(35, y, 176, 20, "Continue?", false, false);
+ AddHtml(35, y, 176, 20, "Continue?");
y -= 2;
- AddButton(102, y, 247, 248, 1, GumpButtonType.Reply, 0);
- AddButton(169, y, 242, 241, 3, GumpButtonType.Reply, 0);
+ AddButton(102, y, 247, 248, 1);
+ AddButton(169, y, 242, 241, 3);
#endregion
}
@@ -196,8 +196,8 @@ namespace Server.Engines.ConPVP
public void AddGoldenButton(int x, int y, int bid)
{
- AddButton(x, y, 0xD2, 0xD2, bid, GumpButtonType.Reply, 0);
- AddButton(x + 3, y + 3, 0xD8, 0xD8, bid, GumpButtonType.Reply, 0);
+ AddButton(x, y, 0xD2, 0xD2, bid);
+ AddButton(x + 3, y + 3, 0xD8, 0xD8, bid);
}
public override void OnResponse(NetState sender, RelayInfo info)
@@ -230,4 +230,4 @@ namespace Server.Engines.ConPVP
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Scripts/Engines/ConPVP/Gumps/RulesetGump.cs b/Scripts/Engines/ConPVP/Gumps/RulesetGump.cs
index 3470e6ac5..bb9372ede 100644
--- a/Scripts/Engines/ConPVP/Gumps/RulesetGump.cs
+++ b/Scripts/Engines/ConPVP/Gumps/RulesetGump.cs
@@ -45,7 +45,7 @@ namespace Server.Engines.ConPVP
AddBackground(0, 0, 260, height, 9250);
AddBackground(10, 10, 240, height - 20, 0xDAC);
- AddHtml(35, 25, 190, 20, Center(page.Title), false, false);
+ AddHtml(35, 25, 190, 20, Center(page.Title));
int x = 35;
int y = 47;
@@ -53,7 +53,7 @@ namespace Server.Engines.ConPVP
for (int i = 0; i < page.Children.Length; ++i)
{
AddGoldenButton(x, y, 1 + i);
- AddHtml(x + 25, y, 250, 22, page.Children[i].Title, false, false);
+ AddHtml(x + 25, y, 250, 22, page.Children[i].Title);
y += 22;
}
@@ -67,7 +67,7 @@ namespace Server.Engines.ConPVP
else
AddCheck(x, y, 0xD2, 0xD3, enabled, i);
- AddHtml(x + 25, y, 250, 22, page.Options[i], false, false);
+ AddHtml(x + 25, y, 250, 22, page.Options[i]);
y += 22;
}
@@ -80,13 +80,13 @@ namespace Server.Engines.ConPVP
public void AddGoldenButton(int x, int y, int bid)
{
- AddButton(x, y, 0xD2, 0xD2, bid, GumpButtonType.Reply, 0);
- AddButton(x + 3, y + 3, 0xD8, 0xD8, bid, GumpButtonType.Reply, 0);
+ AddButton(x, y, 0xD2, 0xD2, bid);
+ AddButton(x + 3, y + 3, 0xD8, 0xD8, bid);
}
public override void OnResponse(NetState sender, RelayInfo info)
{
- if (m_DuelContext != null && !m_DuelContext.Registered)
+ if (m_DuelContext?.Registered == false)
return;
if (!m_ReadOnly)
@@ -127,4 +127,4 @@ namespace Server.Engines.ConPVP
}
}
}
-}
\ No newline at end of file
+}
diff --git a/Scripts/Engines/ConPVP/Gumps/TournamentBracketGump.cs b/Scripts/Engines/ConPVP/Gumps/TournamentBracketGump.cs
index 85b88c532..0743d9353 100644
--- a/Scripts/Engines/ConPVP/Gumps/TournamentBracketGump.cs
+++ b/Scripts/Engines/ConPVP/Gumps/TournamentBracketGump.cs
@@ -19,7 +19,7 @@ namespace Server.Engines.ConPVP
Match_Info,
Player_Info
}
-
+
public class TournamentBracketGump : Gump
{
private const int BlackColor32 = 0x000008;
@@ -86,7 +86,7 @@ namespace Server.Engines.ConPVP
sb.Append(" Tournament Bracket");
- AddHtml(25, 35, 250, 20, Center(sb.ToString()), false, false);
+ AddHtml(25, 35, 250, 20, Center(sb.ToString()));
AddRightArrow(25, 53, ToButtonID(0, 4), "Rules");
AddRightArrow(25, 71, ToButtonID(0, 1), "Participants");
@@ -117,7 +117,7 @@ namespace Server.Engines.ConPVP
text = "The tournament will begin shortly.";
}
- AddHtml(25, 92, 250, 40, text, false, false);
+ AddHtml(25, 92, 250, 40, text);
}
else
{
@@ -138,7 +138,7 @@ namespace Server.Engines.ConPVP
defs = new BitArray(basedef.Options);
for (int i = 0; i < ruleset.Flavors.Count; ++i)
- defs.Or(((Ruleset)ruleset.Flavors[i]).Options);
+ defs.Or(ruleset.Flavors[i].Options);
}
else
{
@@ -158,7 +158,7 @@ namespace Server.Engines.ConPVP
60 + 18 + 20 + 20 + 20 + 8 + 20 + ruleset.Flavors.Count * 18 + 4 + 20 + changes * 22 + 6, 9380);
AddLeftArrow(25, 11, ToButtonID(0, 0));
- AddHtml(25, 35, 250, 20, Center("Rules"), false, false);
+ AddHtml(25, 35, 250, 20, Center("Rules"));
int y = 53;
@@ -177,7 +177,7 @@ namespace Server.Engines.ConPVP
break;
}
- AddHtml(35, y, 190, 20, $"Grouping: {groupText}", false, false);
+ AddHtml(35, y, 190, 20, $"Grouping: {groupText}");
y += 20;
string tieText = null;
@@ -201,7 +201,7 @@ namespace Server.Engines.ConPVP
break;
}
- AddHtml(35, y, 190, 20, $"Tiebreaker: {tieText}", false, false);
+ AddHtml(35, y, 190, 20, $"Tiebreaker: {tieText}");
y += 20;
string sdText = "Off";
@@ -216,22 +216,22 @@ namespace Server.Engines.ConPVP
sdText = $"{sdText} (all rounds)";
}
- AddHtml(35, y, 240, 20, $"Sudden Death: {sdText}", false, false);
+ AddHtml(35, y, 240, 20, $"Sudden Death: {sdText}");
y += 20;
y += 8;
- AddHtml(35, y, 190, 20, $"Ruleset: {basedef.Title}", false, false);
+ AddHtml(35, y, 190, 20, $"Ruleset: {basedef.Title}");
y += 20;
for (int i = 0; i < ruleset.Flavors.Count; ++i, y += 18)
- AddHtml(35, y, 190, 20, $" + {((Ruleset)ruleset.Flavors[i]).Title}", false, false);
+ AddHtml(35, y, 190, 20, $" + {ruleset.Flavors[i].Title}");
y += 4;
if (changes > 0)
{
- AddHtml(35, y, 190, 20, "Modifications:", false, false);
+ AddHtml(35, y, 190, 20, "Modifications:");
y += 20;
for (int i = 0; i < opts.Length; ++i)
@@ -242,7 +242,7 @@ namespace Server.Engines.ConPVP
if (name != null) // sanity
{
AddImage(35, y, opts[i] ? 0xD3 : 0xD2);
- AddHtml(60, y, 165, 22, name, false, false);
+ AddHtml(60, y, 165, 22, name);
}
y += 22;
@@ -250,7 +250,7 @@ namespace Server.Engines.ConPVP
}
else
{
- AddHtml(35, y, 190, 20, "Modifications: None", false, false);
+ AddHtml(35, y, 190, 20, "Modifications: None");
}
break;
@@ -265,8 +265,7 @@ namespace Server.Engines.ConPVP
: new List
(tourney.Participants);
AddLeftArrow(25, 11, ToButtonID(0, 0));
- AddHtml(25, 35, 250, 20, Center($"{pList.Count} Participant{(pList.Count == 1 ? "" : "s")}"), false,
- false);
+ AddHtml(25, 35, 250, 20, Center($"{pList.Count} Participant{(pList.Count == 1 ? "" : "s")}"));
StartPage(out int index, out int count, out int y, 12);
@@ -293,11 +292,11 @@ namespace Server.Engines.ConPVP
AddBackground(0, 0, 300, 60 + 18 + 20 + part.Players.Count * 18 + 20 + 20 + 160, 9380);
AddLeftArrow(25, 11, ToButtonID(0, 1));
- AddHtml(25, 35, 250, 20, Center("Participants"), false, false);
+ AddHtml(25, 35, 250, 20, Center("Participants"));
int y = 53;
- AddHtml(25, y, 200, 20, part.Players.Count == 1 ? "Players" : "Team", false, false);
+ AddHtml(25, y, 200, 20, part.Players.Count == 1 ? "Players" : "Team");
y += 20;
for (int i = 0; i < part.Players.Count; ++i)
@@ -314,10 +313,10 @@ namespace Server.Engines.ConPVP
}
AddHtml(25, y, 200, 20,
- $"Free Advances: {(part.FreeAdvances == 0 ? "None" : part.FreeAdvances.ToString())}", false, false);
+ $"Free Advances: {(part.FreeAdvances == 0 ? "None" : part.FreeAdvances.ToString())}");
y += 20;
- AddHtml(25, y, 200, 20, "Log:", false, false);
+ AddHtml(25, y, 200, 20, "Log:");
y += 20;
StringBuilder sb = new StringBuilder();
@@ -343,7 +342,7 @@ namespace Server.Engines.ConPVP
AddBackground(0, 0, 300, 300, 9380);
AddLeftArrow(25, 11, ToButtonID(0, 3));
- AddHtml(25, 35, 250, 20, Center("Participants"), false, false);
+ AddHtml(25, 35, 250, 20, Center("Participants"));
if (!(obj is Mobile mob))
break;
@@ -351,16 +350,13 @@ namespace Server.Engines.ConPVP
Ladder ladder = Ladder.Instance;
LadderEntry entry = ladder?.Find(mob);
- AddHtml(25, 53, 250, 20, $"Name: {mob.Name}", false, false);
+ AddHtml(25, 53, 250, 20, $"Name: {mob.Name}");
AddHtml(25, 73, 250, 20,
- $"Guild: {(mob.Guild == null ? "None" : mob.Guild.Name + " [" + mob.Guild.Abbreviation + "]")}",
- false, false);
- AddHtml(25, 93, 250, 20, $"Rank: {(entry == null ? "N/A" : LadderGump.Rank(entry.Index + 1))}", false,
- false);
- AddHtml(25, 113, 250, 20, $"Level: {(entry == null ? 0 : Ladder.GetLevel(entry.Experience))}", false,
- false);
- AddHtml(25, 133, 250, 20, $"Wins: {entry?.Wins ?? 0:N0}", false, false);
- AddHtml(25, 153, 250, 20, $"Losses: {entry?.Losses ?? 0:N0}", false, false);
+ $"Guild: {(mob.Guild == null ? "None" : mob.Guild.Name + " [" + mob.Guild.Abbreviation + "]")}");
+ AddHtml(25, 93, 250, 20, $"Rank: {(entry == null ? "N/A" : LadderGump.Rank(entry.Index + 1))}");
+ AddHtml(25, 113, 250, 20, $"Level: {(entry == null ? 0 : Ladder.GetLevel(entry.Experience))}");
+ AddHtml(25, 133, 250, 20, $"Wins: {entry?.Wins ?? 0:N0}");
+ AddHtml(25, 153, 250, 20, $"Losses: {entry?.Losses ?? 0:N0}");
break;
}
@@ -370,7 +366,7 @@ namespace Server.Engines.ConPVP
AddBackground(0, 0, 300, 300, 9380);
AddLeftArrow(25, 11, ToButtonID(0, 0));
- AddHtml(25, 35, 250, 20, Center("Rounds"), false, false);
+ AddHtml(25, 35, 250, 20, Center("Rounds"));
// List levelsList = m_List != null
// ? Utility.CastListCovariant