diff --git a/Dalamud/Data/DataManager.cs b/Dalamud/Data/DataManager.cs index 8cdb58dcd..d27fbf109 100644 --- a/Dalamud/Data/DataManager.cs +++ b/Dalamud/Data/DataManager.cs @@ -84,6 +84,19 @@ public sealed class DataManager : IDisposable, IServiceType } Log.Information("Lumina is ready: {0}", this.GameData.DataPath); + + try + { + var tsInfo = + JsonConvert.DeserializeObject( + dalamudStartInfo.TroubleshootingPackData); + this.HasModifiedGameDataFiles = + tsInfo?.IndexIntegrity is LauncherTroubleshootingInfo.IndexIntegrityResult.Failed or LauncherTroubleshootingInfo.IndexIntegrityResult.Exception; + } + catch + { + // ignored + } } this.IsDataReady = true; @@ -144,6 +157,11 @@ public sealed class DataManager : IDisposable, IServiceType /// public bool IsDataReady { get; private set; } + /// + /// Gets a value indicating whether the game data files have been modified by another third-party tool. + /// + public bool HasModifiedGameDataFiles { get; private set; } + #region Lumina Wrappers /// @@ -345,4 +363,19 @@ public sealed class DataManager : IDisposable, IServiceType { this.luminaCancellationTokenSource.Cancel(); } + + private class LauncherTroubleshootingInfo + { + public enum IndexIntegrityResult + { + Failed, + Exception, + NoGame, + ReferenceNotFound, + ReferenceFetchFailure, + Success, + } + + public IndexIntegrityResult IndexIntegrity { get; set; } + } }