From: Liza Carvelli Date: Tue, 1 Apr 2025 17:19:12 +0000 (+0200) Subject: GatheringPathRenderer: API 12 fixes X-Git-Tag: v5.2~1 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=2aaa4b1083e876d7bda9cb931ec8947b7d195a12;p=Questionable.git GatheringPathRenderer: API 12 fixes --- diff --git a/GatheringPathRenderer/RendererPlugin.cs b/GatheringPathRenderer/RendererPlugin.cs index 1fa3548f..e5cef5e8 100644 --- a/GatheringPathRenderer/RendererPlugin.cs +++ b/GatheringPathRenderer/RendererPlugin.cs @@ -35,11 +35,11 @@ public sealed class RendererPlugin : IDalamudPlugin private readonly EditorWindow _editorWindow; private readonly List _gatheringLocations = []; - private EClassJob _currentClassJob; + private EClassJob _currentClassJob = EClassJob.Adventurer; public RendererPlugin(IDalamudPluginInterface pluginInterface, IClientState clientState, ICommandManager commandManager, IDataManager dataManager, ITargetManager targetManager, IChatGui chatGui, - IObjectTable objectTable, IPluginLog pluginLog) + IObjectTable objectTable, IPluginLog pluginLog, IFramework framework) { _pluginInterface = pluginInterface; _clientState = clientState; @@ -60,7 +60,11 @@ public sealed class RendererPlugin : IDalamudPlugin { IsOpen = true }; _windowSystem.AddWindow(configWindow); _windowSystem.AddWindow(_editorWindow); - _currentClassJob = (EClassJob?)_clientState.LocalPlayer?.ClassJob.RowId ?? EClassJob.Adventurer; + + framework.RunOnFrameworkThread(() => + { + _currentClassJob = (EClassJob?)_clientState.LocalPlayer?.ClassJob.RowId ?? EClassJob.Adventurer; + }); _pluginInterface.GetIpcSubscriber("Questionable.ReloadData") .Subscribe(Reload);