Skip to content

Commit 23f598d

Browse files
committed
v14/net10
1 parent 0e026cf commit 23f598d

File tree

20 files changed

+111
-126
lines changed

20 files changed

+111
-126
lines changed

AetheryteLinkInChat.IpcModel/packages.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
"net9.0-windows7.0": {
55
"GitVersion.MsBuild": {
66
"type": "Direct",
7-
"requested": "[6.4.0, )",
8-
"resolved": "6.4.0",
9-
"contentHash": "U3GowPObvH43MBoB+N9HmaP7R9DGOrrGwbuTZIfia6RSFi/7bApoT7RQFMA9QWpZ9pJF6TKysCaxcv7Qwzucqw=="
7+
"requested": "[6.5.1, )",
8+
"resolved": "6.5.1",
9+
"contentHash": "92zAmfGWVtjHM8eR7O+1WWxqP+gulXvVqu3Sb1+KzuImdmxBt/bln/dMRvsIyV69KEiSrtbUoet4HBjG+bOLyw=="
1010
}
1111
}
1212
}

AetheryteLinkInChat/AetheryteLinkInChat.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ public AetheryteLinkInChat(IDalamudPluginInterface pluginInterface) : base(plugi
4141
aetheryteLinkPayload = Dalamud.ChatGui.AddChatLinkHandler(AetheryteLinkCommandId, HandleAetheryteLink);
4242
lifestreamLinkPayload = Dalamud.ChatGui.AddChatLinkHandler(LifestreamLinkCommandId, HandleLifestreamLink);
4343
solver = new AetheryteSolver(Dalamud.DataManager);
44-
teleporter = new Teleporter(Dalamud.Condition, Dalamud.AetheryteList, Divination.Chat, Dalamud.CommandManager, Dalamud.ClientState, Dalamud.PluginInterface, Dalamud.ToastGui, Dalamud.Framework, Config);
45-
ipcProvider = new IpcProvider(pluginInterface, Dalamud.ClientState, teleporter, solver, Dalamud.DataManager);
44+
teleporter = new Teleporter(Dalamud.Condition, Dalamud.AetheryteList, Divination.Chat, Dalamud.CommandManager, Dalamud.ObjectTable, Dalamud.PluginInterface, Dalamud.ToastGui, Dalamud.Framework, Config);
45+
ipcProvider = new IpcProvider(pluginInterface, Dalamud.ObjectTable, teleporter, solver, Dalamud.DataManager);
4646

4747
Dalamud.ChatGui.ChatMessage += OnChatReceived;
4848
Dalamud.CommandManager.AddHandler(TeleportGcCommand,
@@ -93,7 +93,7 @@ private void AppendNearestAetheryteLink(ref SeString message)
9393
solver.AppendGrandCompanyAetheryte(paths,
9494
(uint)Enum.GetValues<GrandCompanyAetheryte>()[Config.PreferredGrandCompanyAetheryte],
9595
message,
96-
Dalamud.ClientState.LocalPlayer?.CurrentWorld.Value,
96+
Dalamud.ObjectTable.LocalPlayer?.CurrentWorld.Value,
9797
Dalamud.ClientState.TerritoryType);
9898
}
9999

@@ -154,7 +154,7 @@ private void AppendNearestAetheryteLink(ref SeString message)
154154

155155
if (Config.EnableLifestreamIntegration && teleporter.IsLifestreamAvailable())
156156
{
157-
var world = solver.DetectWorld(message, Dalamud.ClientState.LocalPlayer?.CurrentWorld.Value);
157+
var world = solver.DetectWorld(message, Dalamud.ObjectTable.LocalPlayer?.CurrentWorld.Value);
158158

159159
payloads.AddRange([
160160
new TextPayload(" ["),

AetheryteLinkInChat/AetheryteLinkInChat.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
<Project Sdk="Dalamud.NET.Sdk/13.1.0">
1+
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
22
<PropertyGroup>
33
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
44
<RootNamespace>Divination.AetheryteLinkInChat</RootNamespace>
5+
<TargetFramework>net10.0-windows</TargetFramework>
56
</PropertyGroup>
67

78
<ItemGroup>

AetheryteLinkInChat/Ipc/IpcProvider.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ namespace Divination.AetheryteLinkInChat.Ipc;
1515
public class IpcProvider : IDisposable
1616
{
1717
private readonly Teleporter teleporter;
18-
private readonly IClientState clientState;
18+
private readonly IObjectTable objectTable;
1919
private readonly AetheryteSolver solver;
2020
private readonly IDataManager dataManager;
2121
private readonly ICallGateProvider<TeleportPayload, bool> teleport;
2222
private readonly CancellationTokenSource cancellation = new();
2323

24-
public IpcProvider(IDalamudPluginInterface pluginInterface, IClientState clientState, Teleporter teleporter, AetheryteSolver solver, IDataManager dataManager)
24+
public IpcProvider(IDalamudPluginInterface pluginInterface, IObjectTable objectTable, Teleporter teleporter, AetheryteSolver solver, IDataManager dataManager)
2525
{
2626
this.teleporter = teleporter;
27-
this.clientState = clientState;
27+
this.objectTable = objectTable;
2828
this.solver = solver;
2929
this.dataManager = dataManager;
3030

@@ -36,7 +36,7 @@ private bool OnTeleport(TeleportPayload payload)
3636
{
3737
DalamudLog.Log.Debug("OnTeleport: {Payload}", payload);
3838

39-
var world = clientState.LocalPlayer?.CurrentWorld.Value;
39+
var world = objectTable.LocalPlayer?.CurrentWorld.Value;
4040
if (payload.WorldId.HasValue)
4141
{
4242
world = dataManager.GetExcelSheet<World>().GetRow(payload.WorldId.Value);

AetheryteLinkInChat/Teleporter.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

AetheryteLinkInChat/packages.lock.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
{
22
"version": 1,
33
"dependencies": {
4-
"net9.0-windows7.0": {
4+
"net10.0-windows7.0": {
55
"DalamudPackager": {
66
"type": "Direct",
7-
"requested": "[13.1.0, )",
8-
"resolved": "13.1.0",
9-
"contentHash": "XdoNhJGyFby5M/sdcRhnc5xTop9PHy+H50PTWpzLhJugjB19EDBiHD/AsiDF66RETM+0qKUdJBZrNuebn7qswQ=="
7+
"requested": "[14.0.1, )",
8+
"resolved": "14.0.1",
9+
"contentHash": "y0WWyUE6dhpGdolK3iKgwys05/nZaVf4ZPtIjpLhJBZvHxkkiE23zYRo7K7uqAgoK/QvK5cqF6l3VG5AbgC6KA=="
1010
},
1111
"DotNet.ReproducibleBuilds": {
1212
"type": "Direct",
13-
"requested": "[1.2.25, )",
14-
"resolved": "1.2.25",
15-
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg=="
13+
"requested": "[1.2.39, )",
14+
"resolved": "1.2.39",
15+
"contentHash": "fcFN01tDTIQqDuTwr1jUQK/geofiwjG5DycJQOnC72i1SsLAk1ELe+apBOuZ11UMQG8YKFZG1FgvjZPbqHyatg=="
1616
},
1717
"GitVersion.MsBuild": {
1818
"type": "Direct",
19-
"requested": "[6.4.0, )",
20-
"resolved": "6.4.0",
21-
"contentHash": "U3GowPObvH43MBoB+N9HmaP7R9DGOrrGwbuTZIfia6RSFi/7bApoT7RQFMA9QWpZ9pJF6TKysCaxcv7Qwzucqw=="
19+
"requested": "[6.5.1, )",
20+
"resolved": "6.5.1",
21+
"contentHash": "92zAmfGWVtjHM8eR7O+1WWxqP+gulXvVqu3Sb1+KzuImdmxBt/bln/dMRvsIyV69KEiSrtbUoet4HBjG+bOLyw=="
2222
},
2323
"ECommons": {
2424
"type": "Transitive",
25-
"resolved": "3.0.1.15",
26-
"contentHash": "y/I5tpUQQHuaEtDfF470tTlVnHt7gT2KaXX4Zh75bR19/n5kOagNs2e9yYv4dsp538eJLcDzRm0+Z7WY9iW0cA=="
25+
"resolved": "3.1.0.5",
26+
"contentHash": "oEpz7wIB4GPEWcYsNKqf3Sny+K4agdFlSo8YKEu6QdEFuPEH6kzwL7UKCKxj327lailQ927fIPPxCFHSAOXIMA=="
2727
},
2828
"aetherytelinkinchat.ipcmodel": {
2929
"type": "Project"
3030
},
3131
"Dalamud.Divination.Common": {
3232
"type": "Project",
3333
"dependencies": {
34-
"ECommons": "[3.0.1.15, )"
34+
"ECommons": "[3.1.0.5, )"
3535
}
3636
}
3737
}

Common/Api/Dalamud/Actor/ActorEx.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ namespace Dalamud.Divination.Common.Api.Dalamud.Actor;
88

99
public static class ActorEx
1010
{
11-
public static async Task<IPlayerCharacter> GetLocalPlayerAsync(this IClientState state, TimeSpan? delay = null, CancellationToken token = default)
11+
public static async Task<IPlayerCharacter> GetLocalPlayerAsync(this IObjectTable objectTable, TimeSpan? delay = null, CancellationToken token = default)
1212
{
1313
delay ??= TimeSpan.FromMilliseconds(200);
1414

1515
while (!token.IsCancellationRequested)
1616
{
17-
var player = state.LocalPlayer;
17+
var player = objectTable.LocalPlayer;
1818
if (player != null)
1919
{
2020
return player;

Common/Api/Input/KeyStrokeManager.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.Collections.Generic;
23
using System.Linq;
34
using System.Threading;
45
using Dalamud.Divination.Common.Api.Dalamud;
@@ -35,7 +36,7 @@ public void Send(string rawKeys)
3536

3637
Thread.Sleep(random.Next(100, 400));
3738

38-
foreach (var key in keys.Reverse())
39+
foreach (var key in ((IEnumerable<byte>)keys).Reverse())
3940
{
4041
Win32Api.SendMessage(handle, Win32Api.WmKeyup, key, 0);
4142
}

Common/Common.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Dalamud.NET.Sdk/13.1.0">
1+
<Project Sdk="Dalamud.NET.Sdk/14.0.1">
22
<PropertyGroup>
33
<AssemblyTitle>Shared library for Divination projects</AssemblyTitle>
44
<Company>Horoscope.dev</Company>
@@ -12,9 +12,10 @@
1212
<RootNamespace>Dalamud.Divination.Common</RootNamespace>
1313
<AssemblyName>Dalamud.Divination.Common</AssemblyName>
1414
<Use_DalamudPackager>false</Use_DalamudPackager>
15+
<TargetFramework>net10.0-windows</TargetFramework>
1516
</PropertyGroup>
1617

1718
<ItemGroup>
18-
<PackageReference Include="ECommons" Version="3.0.1.26" />
19+
<PackageReference Include="ECommons" Version="3.1.0.5" />
1920
</ItemGroup>
2021
</Project>

Common/packages.lock.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
22
"version": 1,
33
"dependencies": {
4-
"net9.0-windows7.0": {
4+
"net10.0-windows7.0": {
55
"DotNet.ReproducibleBuilds": {
66
"type": "Direct",
7-
"requested": "[1.2.25, )",
8-
"resolved": "1.2.25",
9-
"contentHash": "xCXiw7BCxHJ8pF6wPepRUddlh2dlQlbr81gXA72hdk4FLHkKXas7EH/n+fk5UCA/YfMqG1Z6XaPiUjDbUNBUzg=="
7+
"requested": "[1.2.39, )",
8+
"resolved": "1.2.39",
9+
"contentHash": "fcFN01tDTIQqDuTwr1jUQK/geofiwjG5DycJQOnC72i1SsLAk1ELe+apBOuZ11UMQG8YKFZG1FgvjZPbqHyatg=="
1010
},
1111
"ECommons": {
1212
"type": "Direct",
13-
"requested": "[3.0.1.15, )",
14-
"resolved": "3.0.1.15",
15-
"contentHash": "y/I5tpUQQHuaEtDfF470tTlVnHt7gT2KaXX4Zh75bR19/n5kOagNs2e9yYv4dsp538eJLcDzRm0+Z7WY9iW0cA=="
13+
"requested": "[3.1.0.5, )",
14+
"resolved": "3.1.0.5",
15+
"contentHash": "oEpz7wIB4GPEWcYsNKqf3Sny+K4agdFlSo8YKEu6QdEFuPEH6kzwL7UKCKxj327lailQ927fIPPxCFHSAOXIMA=="
1616
},
1717
"GitVersion.MsBuild": {
1818
"type": "Direct",
19-
"requested": "[6.4.0, )",
20-
"resolved": "6.4.0",
21-
"contentHash": "U3GowPObvH43MBoB+N9HmaP7R9DGOrrGwbuTZIfia6RSFi/7bApoT7RQFMA9QWpZ9pJF6TKysCaxcv7Qwzucqw=="
19+
"requested": "[6.5.1, )",
20+
"resolved": "6.5.1",
21+
"contentHash": "92zAmfGWVtjHM8eR7O+1WWxqP+gulXvVqu3Sb1+KzuImdmxBt/bln/dMRvsIyV69KEiSrtbUoet4HBjG+bOLyw=="
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)