private void btn_first_Click(object sender, EventArgs e) { FileTraceManagment.MatchRecord next_match = match_history.Where(x => x.MatchData.MatchStart > match_data.MatchStart).OrderByDescending(x => x.MatchData.MatchStart).FirstOrDefault(); if (next_match == null) { return; } load_selected_match(this, next_match); }
public void btn_last_MouseClick(object sender, MouseEventArgs e) { FileTraceManagment.MatchRecord previous_match = match_history.Where(x => x.MatchData.MatchStart < match_data.MatchStart).OrderBy(x => x.MatchData.MatchStart).FirstOrDefault(); if (previous_match == null) { return; } load_selected_match(this, previous_match); }
public static Crossout.AspWeb.Models.API.v2.MatchEntry PopulateMatchEntry(FileTraceManagment.MatchRecord match, Dictionary <string, Dictionary <string, Translate.Translation> > translations) { Crossout.AspWeb.Models.API.v2.MatchEntry match_entry = new Crossout.AspWeb.Models.API.v2.MatchEntry { }; match_entry.match_id = match.MatchData.ServerGUID; match_entry.match_type = match.MatchData.MatchTypeDesc; match_entry.match_classification = match.MatchData.MatchClassification; match_entry.match_start = match.MatchData.MatchStart.ToUniversalTime(); match_entry.match_end = match.MatchData.MatchEnd.ToUniversalTime(); match_entry.map_name = match.MatchData.MapName; match_entry.map_display_name = Translate.TranslateStringEnglish(match.MatchData.MapDesc, translations); match_entry.winning_team = match.MatchData.WinningTeam; match_entry.win_conidtion = 1; /*TODO*/ match_entry.co_driver_version = GlobalData.CURRENT_VERSION; if (match.MatchData.ClientVersion.Contains(" ")) { match_entry.client_version = match.MatchData.ClientVersion.Split(' ')[0]; } else { match_entry.client_version = match.MatchData.ClientVersion; } match_entry.host_name = match.MatchData.HostName; match_entry.rounds = PopulateRoundEntrys(match); match_entry.resources = new List <Crossout.AspWeb.Models.API.v2.ResourceEntry> { }; foreach (KeyValuePair <string, int> reward in match.MatchData.MatchRewards.Where(x => x.Key != "score")) { match_entry.resources.Add(new Crossout.AspWeb.Models.API.v2.ResourceEntry { resource = reward.Key, amount = reward.Value }); } return(match_entry); }
public static bool CheckFilters(FilterSelections filter, FileTraceManagment.MatchRecord match, Dictionary <string, FileTraceManagment.BuildRecord> buildRecords, LogFileManagment.SessionVariables session, Dictionary <string, Dictionary <string, Translate.Translation> > translations) { PopulateFiltersForMatch(filter, match, buildRecords, session, translations); if (filter.GameModeFilter != GlobalData.GAME_MODE_FILTER_DEFAULT && filter.GameModeFilter != "PvP" && filter.GameModeFilter != "PvE" && filter.GameModeFilter != "Brawl" && filter.GameModeFilter != match.MatchData.MatchTypeDesc) { return(false); } if (filter.GameModeFilter == "PvP" && match.MatchData.MatchClassification != GlobalData.PVP_CLASSIFICATION) { return(false); } if (filter.GameModeFilter == "PvE" && match.MatchData.MatchClassification != GlobalData.PVE_CLASSIFICATION) { return(false); } if (filter.GameModeFilter == "Brawl" && match.MatchData.MatchClassification != GlobalData.BRAWL_CLASSIFICATION) { return(false); } if (filter.GroupFilter == "Solo" && match.MatchData.LocalPlayer.PartyID > 0) { return(false); } if (filter.GroupFilter == "Grouped" && match.MatchData.LocalPlayer.PartyID == 0) { return(false); } if (filter.ClientVersionFilter != GlobalData.CLIENT_VERSION_FILTER_DEFAULT && filter.ClientVersionFilter != match.MatchData.ClientVersion) { return(false); } if (filter.StartDate.Date != DateTime.Now.Date && match.MatchData.MatchStart.Date < filter.StartDate) { return(false); } if (filter.EndDate.Date != DateTime.Now.Date && match.MatchData.MatchStart.Date > filter.EndDate) { return(false); } if (filter.PowerScoreFilter != GlobalData.POWER_SCORE_FILTER_DEFAULT) { if (filter.PowerScoreFilter == "0-2499" && (match.MatchData.LocalPlayer.PowerScore < 0 || match.MatchData.LocalPlayer.PowerScore > 2499)) { return(false); } if (filter.PowerScoreFilter == "2500-3499" && (match.MatchData.LocalPlayer.PowerScore < 2500 || match.MatchData.LocalPlayer.PowerScore > 3499)) { return(false); } if (filter.PowerScoreFilter == "3500-4499" && (match.MatchData.LocalPlayer.PowerScore < 3500 || match.MatchData.LocalPlayer.PowerScore > 4499)) { return(false); } if (filter.PowerScoreFilter == "4500-5499" && (match.MatchData.LocalPlayer.PowerScore < 4500 || match.MatchData.LocalPlayer.PowerScore > 5499)) { return(false); } if (filter.PowerScoreFilter == "5500-6499" && (match.MatchData.LocalPlayer.PowerScore < 5500 || match.MatchData.LocalPlayer.PowerScore > 6499)) { return(false); } if (filter.PowerScoreFilter == "6500-7499" && (match.MatchData.LocalPlayer.PowerScore < 6500 || match.MatchData.LocalPlayer.PowerScore > 7499)) { return(false); } if (filter.PowerScoreFilter == "7500-8499" && (match.MatchData.LocalPlayer.PowerScore < 7500 || match.MatchData.LocalPlayer.PowerScore > 8499)) { return(false); } if (filter.PowerScoreFilter == "8500-9499" && (match.MatchData.LocalPlayer.PowerScore < 8500 || match.MatchData.LocalPlayer.PowerScore > 9499)) { return(false); } if (filter.PowerScoreFilter == "9500-12999" && (match.MatchData.LocalPlayer.PowerScore < 9500 || match.MatchData.LocalPlayer.PowerScore > 12999)) { return(false); } if (filter.PowerScoreFilter == "13000+" && (match.MatchData.LocalPlayer.PowerScore < 13000 || match.MatchData.LocalPlayer.PowerScore > 22000)) { return(false); } if (filter.PowerScoreFilter == "Leviathan" && match.MatchData.LocalPlayer.PowerScore < 22000) { return(false); } } if (buildRecords.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { if (filter.WeaponsFilter != GlobalData.WEAPONS_FILTER_DEFAULT && buildRecords[match.MatchData.LocalPlayer.BuildHash].Weapons.Select(x => Translate.TranslateString(x.Name, session, translations)).Where(x => x == filter.WeaponsFilter).Count() == 0) { return(false); } if (filter.MovementFilter != GlobalData.MOVEMENT_FILTER_DEFAULT && buildRecords[match.MatchData.LocalPlayer.BuildHash].Movement.Select(x => Translate.TranslateString(x.Name, session, translations)).Where(x => x == filter.MovementFilter).Count() == 0) { return(false); } if (filter.CabinFilter != GlobalData.CABIN_FILTER_DEFAULT && Translate.TranslateString(buildRecords[match.MatchData.LocalPlayer.BuildHash].Cabin.Name, session, translations) != filter.CabinFilter) { return(false); } if (filter.ModuleFilter != GlobalData.MODULE_FILTER_DEFAULT && buildRecords[match.MatchData.LocalPlayer.BuildHash].Modules.Select(x => Translate.TranslateString(x.Name, session, translations)).Where(x => x == filter.ModuleFilter).Count() == 0) { return(false); } } else { if (filter.WeaponsFilter != GlobalData.WEAPONS_FILTER_DEFAULT) { return(false); } if (filter.MovementFilter != GlobalData.MOVEMENT_FILTER_DEFAULT) { return(false); } if (filter.CabinFilter != GlobalData.CABIN_FILTER_DEFAULT) { return(false); } if (filter.ModuleFilter != GlobalData.MODULE_FILTER_DEFAULT) { return(false); } } return(true); }
public static void PopulateFiltersForMatch(FilterSelections filter, FileTraceManagment.MatchRecord match, Dictionary <string, FileTraceManagment.BuildRecord> buildRecords, LogFileManagment.SessionVariables session, Dictionary <string, Dictionary <string, Translate.Translation> > translations) { if (!filter.GameModes.Contains(match.MatchData.MatchTypeDesc)) { filter.GameModes.Add((match.MatchData.MatchTypeDesc)); } if (!filter.GameModes.Contains("PvP") && match.MatchData.MatchClassification == GlobalData.PVP_CLASSIFICATION) { filter.GameModes.Add("PvP"); } if (!filter.GameModes.Contains("PvE") && match.MatchData.MatchClassification == GlobalData.PVE_CLASSIFICATION) { filter.GameModes.Add("PvE"); } if (!filter.GameModes.Contains("Brawl") && match.MatchData.MatchClassification == GlobalData.BRAWL_CLASSIFICATION) { filter.GameModes.Add("Brawl"); } if (match.MatchData.MatchClassification == GlobalData.PVP_CLASSIFICATION && !filter.GameModes.Contains("PvP")) { filter.GameModes.Add("PvP"); } if (match.MatchData.MatchClassification == GlobalData.PVE_CLASSIFICATION && !filter.GameModes.Contains("PvE")) { filter.GameModes.Add("PvE"); } if (match.MatchData.MatchClassification == GlobalData.BRAWL_CLASSIFICATION && !filter.GameModes.Contains("Brawl")) { filter.GameModes.Add("Brawl"); } if (match.MatchData.LocalPlayer.PartyID == 0 && !filter.Grouped.Contains("Solo")) { filter.Grouped.Add("Solo"); } if (match.MatchData.LocalPlayer.PartyID > 0 && !filter.Grouped.Contains("Grouped")) { filter.Grouped.Add("Grouped"); } if (match.MatchData.LocalPlayer.PowerScore >= 0 && match.MatchData.LocalPlayer.PowerScore <= 2499 && !filter.PowerScores.Contains("0-2499")) { filter.PowerScores.Add("0-2499"); } if (match.MatchData.LocalPlayer.PowerScore >= 2500 && match.MatchData.LocalPlayer.PowerScore <= 2499 && !filter.PowerScores.Contains("2500-3499")) { filter.PowerScores.Add("2500-3499"); } if (match.MatchData.LocalPlayer.PowerScore >= 3500 && match.MatchData.LocalPlayer.PowerScore <= 4499 && !filter.PowerScores.Contains("3500-4499")) { filter.PowerScores.Add("3500-4499"); } if (match.MatchData.LocalPlayer.PowerScore >= 4500 && match.MatchData.LocalPlayer.PowerScore <= 5499 && !filter.PowerScores.Contains("4500-5499")) { filter.PowerScores.Add("4500-5499"); } if (match.MatchData.LocalPlayer.PowerScore >= 5500 && match.MatchData.LocalPlayer.PowerScore <= 6499 && !filter.PowerScores.Contains("5500-6499")) { filter.PowerScores.Add("5500-6499"); } if (match.MatchData.LocalPlayer.PowerScore >= 6500 && match.MatchData.LocalPlayer.PowerScore <= 7499 && !filter.PowerScores.Contains("6500-7499")) { filter.PowerScores.Add("6500-7499"); } if (match.MatchData.LocalPlayer.PowerScore >= 7500 && match.MatchData.LocalPlayer.PowerScore <= 8499 && !filter.PowerScores.Contains("7500-8499")) { filter.PowerScores.Add("7500-8499"); } if (match.MatchData.LocalPlayer.PowerScore >= 8500 && match.MatchData.LocalPlayer.PowerScore <= 9499 && !filter.PowerScores.Contains("8500-9499")) { filter.PowerScores.Add("8500-9499"); } if (match.MatchData.LocalPlayer.PowerScore >= 9500 && match.MatchData.LocalPlayer.PowerScore <= 12999 && !filter.PowerScores.Contains("9500-12999")) { filter.PowerScores.Add("9500-12999"); } if (match.MatchData.LocalPlayer.PowerScore >= 13000 && match.MatchData.LocalPlayer.PowerScore <= 22000 && !filter.PowerScores.Contains("13000+")) { filter.PowerScores.Add("13000+"); } if (match.MatchData.LocalPlayer.PowerScore >= 22000 && !filter.PowerScores.Contains("Leviathan")) { filter.PowerScores.Add("Leviathan"); } if (!filter.ClientVersions.Contains(match.MatchData.ClientVersion)) { filter.ClientVersions.Add((match.MatchData.ClientVersion)); } if (buildRecords.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { if (!string.IsNullOrEmpty(Translate.TranslateString(buildRecords[match.MatchData.LocalPlayer.BuildHash].Cabin.Name, session, translations))) { if (!filter.Cabins.Contains(Translate.TranslateString(buildRecords[match.MatchData.LocalPlayer.BuildHash].Cabin.Name, session, translations))) { filter.Cabins.Add(Translate.TranslateString(buildRecords[match.MatchData.LocalPlayer.BuildHash].Cabin.Name, session, translations)); } } foreach (PartLoader.Weapon weapon in buildRecords[match.MatchData.LocalPlayer.BuildHash].Weapons) { if (!filter.Weapons.Contains(Translate.TranslateString(weapon.Name, session, translations))) { filter.Weapons.Add(Translate.TranslateString(weapon.Name, session, translations)); } } foreach (PartLoader.Movement movement in buildRecords[match.MatchData.LocalPlayer.BuildHash].Movement) { if (!filter.MovementParts.Contains(Translate.TranslateString(movement.Name, session, translations))) { filter.MovementParts.Add(Translate.TranslateString(movement.Name, session, translations)); } } foreach (PartLoader.Module module in buildRecords[match.MatchData.LocalPlayer.BuildHash].Modules) { if (!filter.ModuleParts.Contains(Translate.TranslateString(module.Name, session, translations))) { filter.ModuleParts.Add(Translate.TranslateString(module.Name, session, translations)); } } } }
public static List <Crossout.AspWeb.Models.API.v2.RoundEntry> PopulateRoundEntrys(FileTraceManagment.MatchRecord match) { List <Crossout.AspWeb.Models.API.v2.RoundEntry> rounds = new List <Crossout.AspWeb.Models.API.v2.RoundEntry> { }; Crossout.AspWeb.Models.API.v2.RoundEntry new_round; int i = 0; foreach (FileTraceManagment.RoundRecord round in match.MatchData.RoundRecords) { new_round = new Crossout.AspWeb.Models.API.v2.RoundEntry { }; new_round.match_id = match.MatchData.ServerGUID; new_round.round_id = i; new_round.round_start = round.RoundStart.ToUniversalTime(); new_round.round_end = round.RoundEnd.ToUniversalTime(); new_round.winning_team = round.WinningTeam; new_round.players = new List <Crossout.AspWeb.Models.API.v2.MatchPlayerEntry> { }; new_round.damage_records = new List <Crossout.AspWeb.Models.API.v2.RoundDamageEntry> { }; foreach (FileTraceManagment.Player player in round.Players) { Crossout.AspWeb.Models.API.v2.MatchPlayerEntry new_player = new Crossout.AspWeb.Models.API.v2.MatchPlayerEntry { }; new_player.match_id = match.MatchData.ServerGUID; new_player.round_id = i; new_player.uid = player.UID; new_player.bot = player.Bot; new_player.nickname = player.Nickname; new_player.team = player.Team; new_player.group_id = player.PartyID; new_player.build_hash = player.BuildHash; new_player.power_score = player.PowerScore; new_player.kills = player.Stats.Kills; new_player.assists = player.Stats.Assists; new_player.drone_kills = player.Stats.DroneKills; new_player.deaths = player.Stats.Deaths; new_player.score = player.Stats.Score; new_player.damage = player.Stats.Damage; new_player.damage_taken = player.Stats.DamageTaken; new_player.scores = new List <Crossout.AspWeb.Models.API.v2.ScoreEntry> { }; new_player.medals = new List <Crossout.AspWeb.Models.API.v2.MedalEntry> { }; foreach (FileTraceManagment.Score score in player.Scores) { new_player.scores.Add(new Crossout.AspWeb.Models.API.v2.ScoreEntry { score_type = score.Description, points = score.Points }); } foreach (string stripe in player.Stripes) { if (new_player.medals.Any(x => x.medal == stripe)) { new_player.medals.First(x => x.medal == stripe).amount += 1; } else { new_player.medals.Add(new Crossout.AspWeb.Models.API.v2.MedalEntry { medal = stripe, amount = 1 }); } } new_round.players.Add(new_player); } foreach (FileTraceManagment.RoundDamageRecord damage_record in round.DamageRecords) { if (!round.Players.Any(x => x.Nickname == damage_record.Attacker)) { continue; } if (round.Players.Any(x => x.Nickname == damage_record.Attacker && x.UID == 0)) { continue; } Crossout.AspWeb.Models.API.v2.RoundDamageEntry new_damage_record = new Crossout.AspWeb.Models.API.v2.RoundDamageEntry { }; new_damage_record.uid = round.Players.FirstOrDefault(x => x.Nickname == damage_record.Attacker).UID; new_damage_record.weapon = damage_record.Weapon; new_damage_record.damage = damage_record.Damage; new_round.damage_records.Add(new_damage_record); } rounds.Add(new_round); i++; } return(rounds); }
private void process_match(FileTraceManagment.MatchRecord match) { double value = 0; switch (current_y_axis.id) { case metric.WIN_RATE: value = match.MatchData.WinningTeam == match.MatchData.LocalPlayer.Team ? 1 : 0; break; case metric.MVP: value = match.MatchData.LocalPlayer.Stripes.Any(x => x == "PvpMvpWin") ? 1 : 0; break; case metric.DAMAGE: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Damage; break; case metric.DAMAGE_REC: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.DamageTaken; break; case metric.SCORE: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Score; break; case metric.KILLS: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Kills; break; case metric.ASSISTS: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Assists; break; case metric.DEATHS: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Deaths; break; case metric.KILL_ASSIST: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Kills + match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Assists; break; case metric.DRONE_KILLS: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.DroneKills; break; case metric.MEDALS: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stripes.Count(); break; case metric.GAMES_PLAYED: value = 1; break; case metric.ROUNDS_PLAYED: value = match.MatchData.RoundCount; break; case metric.TIME_SPENT: value = match.MatchData.MatchDurationSeconds; break; case metric.RAM_DAMAGE: foreach (FileTraceManagment.RoundRecord round in match.MatchData.RoundRecords) { foreach (FileTraceManagment.RoundDamageRecord rec in round.DamageRecords.Where(x => x.Attacker == match.MatchData.LocalPlayer.Nickname && x.Weapon == "Ramming")) { value += rec.Damage; } } break; case metric.CABIN_DAMAGE: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.CabinDamage; break; case metric.BODY_DAMAGE: value = match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.Damage - match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].Stats.CabinDamage; break; case metric.EXPERIENCE: value = match.MatchData.MatchRewards.Where(x => x.Key.Contains("xp")).Sum(x => x.Value); if ((int)value == 0) { return; } break; case metric.URANIUM: value = match.MatchData.MatchRewards.Where(x => x.Key == "ClanMoney").Sum(x => x.Value); if (match.MatchData.MatchType != GlobalData.STANDARD_CW_MATCH && match.MatchData.MatchType != GlobalData.LEVIATHIAN_CW_MATCH) { return; } break; case metric.SCRAP: value = match.MatchData.MatchRewards.Where(x => x.Key == "Scrap_Common").Sum(x => x.Value); if ((int)value == 0) { return; } break; case metric.WIRES: value = match.MatchData.MatchRewards.Where(x => x.Key == "Scrap_Rare").Sum(x => x.Value); if ((int)value == 0) { return; } break; case metric.BATTERIES: value = match.MatchData.MatchRewards.Where(x => x.Key == "Accumulators").Sum(x => x.Value); if ((int)value == 0) { return; } break; case metric.COPPER: value = match.MatchData.MatchRewards.Where(x => x.Key == "Platinum").Sum(x => x.Value); if ((int)value == 0) { return; } break; case metric.COUPONS: value = match.MatchData.MatchRewards.Where(x => x.Key == "Supply").Sum(x => x.Value); if ((int)value == 0) { return; } break; case metric.ELECTRONICS: value = match.MatchData.MatchRewards.Where(x => x.Key == "Scrap_Epic").Sum(x => x.Value); if ((int)value == 0) { return; } break; case metric.PLASTIC: value = match.MatchData.MatchRewards.Where(x => x.Key == "Plastic").Sum(x => x.Value); if ((int)value == 0) { return; } break; default: MessageBox.Show("Unable to find metric"); return; } switch (current_x_axis.id) { case grouping.DAY: add_chart_element(match.MatchData.MatchStart.Date.ToString(), value); break; case grouping.WEEK: add_chart_element(match.MatchData.MatchStart.Date.AddDays((-1 * (double)(match.MatchData.MatchStart.Date.DayOfWeek - (int)DayOfWeek.Monday)) + 1).Date.ToString(), value); break; case grouping.MONTH: add_chart_element(match.MatchData.MatchStart.Date.AddDays((-1 * match.MatchData.MatchStart.Date.Day) + 1).Date.ToString(), value); break; case grouping.YEAR: add_chart_element(match.MatchData.MatchStart.Date.AddDays((-1 * match.MatchData.MatchStart.Date.DayOfYear) + 1).Date.ToString(), value); break; case grouping.WEAPON: if (current_y_axis.id == metric.DAMAGE) { Dictionary <string, double> damage_records = new Dictionary <string, double> { }; foreach (FileTraceManagment.RoundRecord round in match.MatchData.RoundRecords) { foreach (FileTraceManagment.RoundDamageRecord rec in round.DamageRecords.Where(x => x.Attacker == match.MatchData.LocalPlayer.Nickname)) { if (!damage_records.ContainsKey(rec.Weapon)) { damage_records.Add(rec.Weapon, rec.Damage); } else { damage_records[rec.Weapon] += rec.Damage; } } } foreach (KeyValuePair <string, double> rec in damage_records) { add_chart_element(Translate.TranslateString(rec.Key, session, translations), rec.Value); } } else { if (build_records.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { foreach (PartLoader.Weapon part in build_records[match.MatchData.LocalPlayer.BuildHash].Weapons) { add_chart_element(Translate.TranslateString(part.Name, session, translations), value); } } } break; case grouping.MOVEMENT: if (build_records.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { foreach (PartLoader.Movement part in build_records[match.MatchData.LocalPlayer.BuildHash].Movement) { add_chart_element(Translate.TranslateString(part.Name, session, translations), value); } } break; case grouping.CABIN: if (build_records.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { if (build_records[match.MatchData.LocalPlayer.BuildHash].Cabin != null) { add_chart_element(Translate.TranslateString(build_records[match.MatchData.LocalPlayer.BuildHash].Cabin.Name, session, translations), value); } } break; case grouping.MODULE: if (build_records.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { foreach (PartLoader.Module part in build_records[match.MatchData.LocalPlayer.BuildHash].Modules) { add_chart_element(Translate.TranslateString(part.Name, session, translations), value); } } break; case grouping.ENGINE: if (build_records.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { if (build_records[match.MatchData.LocalPlayer.BuildHash].Engine != null) { add_chart_element(Translate.TranslateString(build_records[match.MatchData.LocalPlayer.BuildHash].Engine.Name, session, translations), value); } } break; case grouping.PART: if (build_records.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { foreach (string part in build_records[match.MatchData.LocalPlayer.BuildHash].Parts) { add_chart_element(Translate.TranslateString(part, session, translations), value); } } break; case grouping.WEAPON_CAT: break; case grouping.MOVEMENT_CAT: break; case grouping.CABIN_CAT: break; case grouping.MODULE_CAT: break; case grouping.MAP: add_chart_element(Translate.TranslateString(match.MatchData.MapName, session, translations), value); break; case grouping.GAME_MODE: add_chart_element(match.MatchData.MatchTypeDesc, value); break; case grouping.GAME_MODE_CAT: add_chart_element(decode_match_classification(match.MatchData.MatchClassification), value); break; case grouping.GAME_RESULT: add_chart_element(match.MatchData.GameResult, value); break; case grouping.POWER_SCORE: add_chart_element(find_power_score_range(match.MatchData.LocalPlayer.PowerScore), value); break; case grouping.REGION: add_chart_element(decode_game_region(match.MatchData.HostName), value); break; case grouping.SERVER: add_chart_element(match.MatchData.HostName, value); break; case grouping.CLIENT_VERSION: add_chart_element(match.MatchData.ClientVersion, value); break; case grouping.GROUP_SIZE: add_chart_element(match.MatchData.PlayerRecords.Count(x => x.Value.PartyID == match.MatchData.LocalPlayer.PartyID && match.MatchData.LocalPlayer.PartyID != 0).ToString(), value); break; case grouping.SQUAD_MATE: foreach (string player in match.MatchData.PlayerRecords.Where(x => x.Value.PartyID == match.MatchData.LocalPlayer.PartyID && match.MatchData.LocalPlayer.PartyID != 0).Select(x => x.Value.Nickname)) { add_chart_element(player, value); } break; case grouping.OPPONENT: foreach (string player in match.MatchData.PlayerRecords.Where(x => x.Value.Team != match.MatchData.LocalPlayer.Team && x.Value.UID > 0 && x.Value.Nickname != match.MatchData.LocalPlayer.Nickname).Select(x => x.Value.Nickname)) { add_chart_element(player, value); } break; case grouping.ALLY: foreach (string player in match.MatchData.PlayerRecords.Where(x => x.Value.Team == match.MatchData.LocalPlayer.Team && x.Value.UID > 0 && x.Value.Nickname != match.MatchData.LocalPlayer.Nickname).Select(x => x.Value.Nickname)) { add_chart_element(player, value); } break; case grouping.BUILD_HASH: add_chart_element(match.MatchData.PlayerRecords[match.MatchData.LocalPlayer.UID].BuildHash, value); break; case grouping.BUILD_DESC: if (build_records.ContainsKey(match.MatchData.LocalPlayer.BuildHash)) { add_chart_element(build_records[match.MatchData.LocalPlayer.BuildHash].FullDescription, value); } break; case grouping.BOT_ALLY: foreach (string player in match.MatchData.PlayerRecords.Where(x => x.Value.Team == match.MatchData.LocalPlayer.Team && x.Value.UID == 0).Select(x => x.Value.Nickname)) { add_chart_element(player, value); } break; case grouping.BOT_OPPONENT: foreach (string player in match.MatchData.PlayerRecords.Where(x => x.Value.Team != match.MatchData.LocalPlayer.Team && x.Value.UID == 0).Select(x => x.Value.Nickname)) { add_chart_element(player, value); } break; default: MessageBox.Show("Unable to find group"); return; } }