Use a proxy function for OnFrameworkUpdate

This commit is contained in:
Loporrit
2023-12-11 23:47:19 +00:00
parent de9532041e
commit 247008e13d
2 changed files with 16 additions and 2 deletions

View File

@@ -34,10 +34,21 @@ public sealed class Plugin : IDalamudPlugin
private readonly CancellationTokenSource _pluginCts = new();
private readonly Task _hostBuilderRunTask;
public static Plugin Self;
public Action<IFramework> _realOnFrameworkUpdate = null;
// Proxy function in the LoporritSync namespace to avoid confusion in /xlstats
public void OnFrameworkUpdate(IFramework framework)
{
if (_realOnFrameworkUpdate != null)
_realOnFrameworkUpdate(framework);
}
public Plugin(DalamudPluginInterface pluginInterface, ICommandManager commandManager, IDataManager gameData,
IFramework framework, IObjectTable objectTable, IClientState clientState, ICondition condition, IChatGui chatGui,
IGameGui gameGui, IDtrBar dtrBar, IPluginLog pluginLog, ITargetManager targetManager)
{
Plugin.Self = this;
_hostBuilderRunTask = new HostBuilder()
.UseContentRoot(pluginInterface.ConfigDirectory.FullName)
.ConfigureLogging(lb =>