@@ -45,21 +45,21 @@ public sealed class Teleporter : IDisposable
4545 private readonly IAetheryteList aetheryteList ;
4646 private readonly IChatClient chatClient ;
4747 private readonly ICommandManager commandManager ;
48- private readonly IClientState clientState ;
48+ private readonly IObjectTable objectTable ;
4949 private readonly IDalamudPluginInterface pluginInterface ;
5050 private readonly IToastGui toastGui ;
5151 private readonly IFramework framework ;
5252 private readonly PluginConfig config ;
5353 // Huh, cant use volatile here anymore... well hope nothing explodes :)
5454 private Aetheryte ? queuedAetheryte ;
5555
56- public Teleporter ( ICondition condition , IAetheryteList aetheryteList , IChatClient chatClient , ICommandManager commandManager , IClientState clientState , IDalamudPluginInterface pluginInterface , IToastGui toastGui , IFramework framework , PluginConfig config )
56+ public Teleporter ( ICondition condition , IAetheryteList aetheryteList , IChatClient chatClient , ICommandManager commandManager , IObjectTable objectTable , IDalamudPluginInterface pluginInterface , IToastGui toastGui , IFramework framework , PluginConfig config )
5757 {
5858 this . condition = condition ;
5959 this . aetheryteList = aetheryteList ;
6060 this . chatClient = chatClient ;
6161 this . commandManager = commandManager ;
62- this . clientState = clientState ;
62+ this . objectTable = objectTable ;
6363 this . pluginInterface = pluginInterface ;
6464 this . toastGui = toastGui ;
6565 this . framework = framework ;
@@ -191,7 +191,7 @@ private async Task<bool> TeleportToPathsInternal(IEnumerable<ITeleportPath> path
191191
192192 if ( world . HasValue )
193193 {
194- if ( world . Value . RowId == clientState . LocalPlayer ? . CurrentWorld . RowId )
194+ if ( world . Value . RowId == objectTable . LocalPlayer ? . CurrentWorld . RowId )
195195 {
196196 DalamudLog . Log . Debug ( "TeleportToPaths: world == currentWorld" ) ;
197197 }
@@ -209,7 +209,7 @@ private async Task<bool> TeleportToPathsInternal(IEnumerable<ITeleportPath> path
209209 DalamudLog . Log . Debug ( "TeleportToPaths: waiting for {World}" , world . Value . Name . ExtractText ( ) ) ;
210210
211211 // wait until world changed
212- while ( world . Value . RowId != clientState . LocalPlayer ? . CurrentWorld . RowId || IsTeleportUnavailable )
212+ while ( world . Value . RowId != objectTable . LocalPlayer ? . CurrentWorld . RowId || IsTeleportUnavailable )
213213 {
214214 await Task . Delay ( 500 , cancellationToken ) ;
215215 }
0 commit comments