Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ public MatchHistory_Entry(
string map_name,
string map_path,
string match_roster_type,
ELobbyType? lobby_type,
bool is_official_map,
bool vanilla_teams_only,
UInt32 starting_cash,
Expand All @@ -84,6 +85,7 @@ UInt32 ini_crc
this.map_name = map_name;
this.map_path = map_path;
this.match_roster_type = match_roster_type;
this.lobby_type = lobby_type;
this.is_official_map = is_official_map;
this.vanilla_teams_only = vanilla_teams_only;
this.starting_cash = starting_cash;
Expand All @@ -105,6 +107,7 @@ UInt32 ini_crc
public string map_path { get; set; } = String.Empty;

public string match_roster_type { get; set; } = String.Empty;
public ELobbyType? lobby_type { get; set; } = null;
public bool is_official_map { get; set; } = false;
public bool vanilla_teams_only { get; set; } = false;
public UInt32 starting_cash { get; set; } = 0;
Expand Down
11 changes: 11 additions & 0 deletions GenOnlineService/Database/Database.MatchHistory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class MatchHistoryEntry
public string MapName { get; set; } = string.Empty;
public bool MapOfficial { get; set; }
public string MatchRosterType { get; set; } = string.Empty;
public ELobbyType? LobbyType { get; set; } = null;
public bool VanillaTeams { get; set; }
public uint StartingCash { get; set; }
public bool LimitSuperweapons { get; set; }
Expand Down Expand Up @@ -108,6 +109,11 @@ public void Configure(EntityTypeBuilder<MatchHistoryEntry> entity)
.HasMaxLength(32)
.HasDefaultValue("");

entity.Property(e => e.LobbyType)
.HasColumnName("lobby_type")
.HasConversion<byte?>()
.HasColumnType("tinyint unsigned");

entity.Property(e => e.VanillaTeams)
.HasColumnName("vanilla_teams");

Expand Down Expand Up @@ -480,6 +486,7 @@ public static async Task<ulong> CreatePlaceholderMatchHistory(
MapPath = lobby.MapPath,
MapOfficial = lobby.IsMapOfficial,
MatchRosterType = rosterType,
LobbyType = lobby.LobbyType,
VanillaTeams = lobby.IsVanillaTeamsOnly,
StartingCash = lobby.StartingCash,
LimitSuperweapons = lobby.IsLimitSuperweapons,
Expand Down Expand Up @@ -755,6 +762,7 @@ public static async Task<MatchHistoryCollection> GetMatchesInRange(
m.MapName,
m.MapPath,
m.MatchRosterType,
m.LobbyType,
m.MapOfficial,
m.VanillaTeams,
m.StartingCash,
Expand Down Expand Up @@ -787,6 +795,7 @@ public static async Task<MatchHistoryCollection> GetMatchesInRange(
row.MapName,
row.MapPath ?? string.Empty,
row.MatchRosterType,
row.LobbyType,
row.MapOfficial,
row.VanillaTeams,
row.StartingCash,
Expand Down Expand Up @@ -841,6 +850,7 @@ public static async Task<MatchHistoryCollection> GetMatchesSince(
row.MapName,
row.MapPath ?? string.Empty,
row.MatchRosterType,
row.LobbyType,
row.MapOfficial,
row.VanillaTeams,
row.StartingCash,
Expand Down Expand Up @@ -938,6 +948,7 @@ await db.MatchHistory
row.MapName,
row.MapPath ?? string.Empty,
row.MatchRosterType,
row.LobbyType,
row.MapOfficial,
row.VanillaTeams,
row.StartingCash,
Expand Down
1 change: 1 addition & 0 deletions GenOnlineService/Database_Structure/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ CREATE TABLE IF NOT EXISTS `match_history` (
`map_name` varchar(128) NOT NULL,
`map_official` tinyint(1) NOT NULL,
`match_roster_type` varchar(32) NOT NULL DEFAULT '',
`lobby_type` tinyint(3) unsigned DEFAULT NULL,
`vanilla_teams` tinyint(1) NOT NULL,
`starting_cash` int(10) unsigned NOT NULL,
`limit_superweapons` tinyint(1) NOT NULL,
Expand Down
Loading