check for modified game files on connection and throw an error
This commit is contained in:
@@ -22,6 +22,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
|||||||
private readonly List<uint> _classJobIdsIgnoredForPets = [30];
|
private readonly List<uint> _classJobIdsIgnoredForPets = [30];
|
||||||
private readonly IClientState _clientState;
|
private readonly IClientState _clientState;
|
||||||
private readonly ICondition _condition;
|
private readonly ICondition _condition;
|
||||||
|
private readonly IDataManager _gameData;
|
||||||
private readonly IFramework _framework;
|
private readonly IFramework _framework;
|
||||||
private readonly IGameGui _gameGui;
|
private readonly IGameGui _gameGui;
|
||||||
private readonly ILogger<DalamudUtilService> _logger;
|
private readonly ILogger<DalamudUtilService> _logger;
|
||||||
@@ -46,6 +47,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
|||||||
_framework = framework;
|
_framework = framework;
|
||||||
_gameGui = gameGui;
|
_gameGui = gameGui;
|
||||||
_condition = condition;
|
_condition = condition;
|
||||||
|
_gameData = gameData;
|
||||||
Mediator = mediator;
|
Mediator = mediator;
|
||||||
_performanceCollector = performanceCollector;
|
_performanceCollector = performanceCollector;
|
||||||
WorldData = new(() =>
|
WorldData = new(() =>
|
||||||
@@ -77,6 +79,7 @@ public class DalamudUtilService : IHostedService, IMediatorSubscriber
|
|||||||
public bool IsOnFrameworkThread => _framework.IsInFrameworkUpdateThread;
|
public bool IsOnFrameworkThread => _framework.IsInFrameworkUpdateThread;
|
||||||
public bool IsZoning => _condition[ConditionFlag.BetweenAreas] || _condition[ConditionFlag.BetweenAreas51];
|
public bool IsZoning => _condition[ConditionFlag.BetweenAreas] || _condition[ConditionFlag.BetweenAreas51];
|
||||||
public bool IsInCombatOrPerforming { get; private set; } = false;
|
public bool IsInCombatOrPerforming { get; private set; } = false;
|
||||||
|
public bool HasModifiedGameFiles => _gameData.HasModifiedGameDataFiles;
|
||||||
|
|
||||||
public Lazy<Dictionary<ushort, string>> WorldData { get; private set; }
|
public Lazy<Dictionary<ushort, string>> WorldData { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -204,6 +204,14 @@ public sealed partial class ApiController : DisposableMediatorSubscriberBase, IM
|
|||||||
Dalamud.Interface.Internal.Notifications.NotificationType.Warning));
|
Dalamud.Interface.Internal.Notifications.NotificationType.Warning));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_dalamudUtil.HasModifiedGameFiles)
|
||||||
|
{
|
||||||
|
Mediator.Publish(new NotificationMessage("Modified Game Files detected",
|
||||||
|
"Mare has detected modified game files in your FFXIV installation. You will be able to connect, but the synchronization functionality might be (partially) broken. " +
|
||||||
|
"Exit the game and repair it through XIVLauncher to get rid of this message.",
|
||||||
|
Dalamud.Interface.Internal.Notifications.NotificationType.Error));
|
||||||
|
}
|
||||||
|
|
||||||
await LoadIninitialPairs().ConfigureAwait(false);
|
await LoadIninitialPairs().ConfigureAwait(false);
|
||||||
await LoadOnlinePairs().ConfigureAwait(false);
|
await LoadOnlinePairs().ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user