From 7841da82141912b430bc63e722547a42d6dd17c1 Mon Sep 17 00:00:00 2001 From: Vitalii Mikhailov Date: Mon, 8 Apr 2024 00:17:47 +0300 Subject: [PATCH] Fixed LauncherExVersion --- .../CrashReportCreatorHelper.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/BUTR.CrashReport.Bannerlord.Source/CrashReportCreatorHelper.cs b/src/BUTR.CrashReport.Bannerlord.Source/CrashReportCreatorHelper.cs index 22b3f74..5aadf90 100644 --- a/src/BUTR.CrashReport.Bannerlord.Source/CrashReportCreatorHelper.cs +++ b/src/BUTR.CrashReport.Bannerlord.Source/CrashReportCreatorHelper.cs @@ -109,6 +109,12 @@ public virtual CrashReportMetadataModel GetCrashReportMetadataModel(CrashReportI { var butrLoaderVersion = GetBUTRLoaderVersion(crashReport); var blseVersion = GetBLSEVersion(crashReport); + var launcherExVersion = GetLauncherExVersion(crashReport); + + var additionalMetdata = new List(); + if (!string.IsNullOrEmpty(launcherExVersion)) + additionalMetdata.Add(new MetadataModel { Key = "LauncherExVersion", Value = launcherExVersion }); + return new CrashReportMetadataModel { GameName = "Bannerlord", @@ -122,10 +128,7 @@ public virtual CrashReportMetadataModel GetCrashReportMetadataModel(CrashReportI Runtime = null, - AdditionalMetadata = new MetadataModel[] - { - new MetadataModel { Key = "LauncherExVersion", Value = GetLauncherExVersion(crashReport) }, - }, + AdditionalMetadata = additionalMetdata, }; }