Skip to content

Commit 97ffe3a

Browse files
committed
API13
1 parent ea281f7 commit 97ffe3a

File tree

8 files changed

+21
-50
lines changed

8 files changed

+21
-50
lines changed

XIVComboVX/ChatUtil.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ internal const ushort
2626
ColourGlowOpenConfig = 37;
2727

2828
internal ChatUtil() {
29-
this.openConfig = Service.Interface.AddChatLinkHandler(OpenConfigId, this.onClickChatLink);
30-
this.openIssueTracker = Service.Interface.AddChatLinkHandler(OpenIssueTrackerId, this.onClickChatLink);
29+
this.openConfig = Service.ChatGui.AddChatLinkHandler(OpenConfigId, this.onClickChatLink);
30+
this.openIssueTracker = Service.ChatGui.AddChatLinkHandler(OpenIssueTrackerId, this.onClickChatLink);
3131
}
3232

3333
internal void AddOpenConfigLink(SeStringBuilder sb, string label) {
@@ -85,7 +85,7 @@ public void Dispose() {
8585
return;
8686
this.disposed = true;
8787

88-
Service.Interface.RemoveChatLinkHandler();
88+
Service.ChatGui.RemoveChatLinkHandler();
8989
}
9090

9191
#endregion

XIVComboVX/Config/ComboDetailSetting.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System;
22
using System.Reflection;
33

4-
using ImGuiNET;
4+
using Dalamud.Bindings.ImGui;
55

66
using VariableVixen.XIVComboVX.Attributes;
77

XIVComboVX/Config/ConfigWindow.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
using System.Runtime.InteropServices;
88
using System.Text;
99

10+
using Dalamud.Bindings.ImGui;
1011
using Dalamud.Game.ClientState.Objects.SubKinds;
1112
using Dalamud.Interface;
1213
using Dalamud.Interface.Windowing;
1314
using Dalamud.Utility;
1415

15-
using ImGuiNET;
16-
1716
using VariableVixen.XIVComboVX.Attributes;
1817

1918
namespace VariableVixen.XIVComboVX.Config;
@@ -515,7 +514,7 @@ private void drawPreset(CustomComboPreset preset, CustomComboInfoAttribute info)
515514
? ImGui.SliderScalar(
516515
detail.Label + $"##{detail.Combo}",
517516
detail.ImGuiType,
518-
ptrVal,
517+
ref ptrVal,
519518
ptrMin,
520519
ptrMax,
521520
fmt,
@@ -524,7 +523,7 @@ private void drawPreset(CustomComboPreset preset, CustomComboInfoAttribute info)
524523
: ImGui.InputScalar(
525524
detail.Label + $"##{detail.Combo}",
526525
detail.ImGuiType,
527-
ptrVal,
526+
ref ptrVal,
528527
ptrStep,
529528
ptrStep,
530529
fmt,

XIVComboVX/GameData/GameState.cs

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
11
using System;
22

3+
using Dalamud.Game.NativeWrapper;
4+
35
using FFXIVClientStructs.FFXIV.Component.GUI;
46

57
namespace VariableVixen.XIVComboVX.GameData;
68

79
internal unsafe class GameState: IDisposable {
810
private bool disposed;
911

10-
private AtkUnitBase* chatLogPointer;
12+
private AtkUnitBasePtr chatLogPointer;
1113

12-
internal AtkUnitBase* ChatLog {
14+
internal AtkUnitBasePtr ChatLog {
1315
get {
1416
if (Service.Client.LocalPlayer is null)
1517
return null;
16-
if (this.chatLogPointer is null)
17-
this.chatLogPointer = (AtkUnitBase*)Service.GameGui.GetAddonByName("ChatLog", 1);
18+
if (this.chatLogPointer.IsNull)
19+
this.chatLogPointer = Service.GameGui.GetAddonByName("ChatLog", 1);
1820
return this.chatLogPointer;
1921
}
2022
}
2123

22-
internal bool IsChatVisible {
23-
get {
24-
AtkUnitBase* cl = this.ChatLog;
25-
return cl is not null && cl->IsVisible;
26-
}
27-
}
24+
internal bool IsChatVisible => this.ChatLog.IsVisible;
2825

2926
#region Registration and cleanup
3027

XIVComboVX/Plugin.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private void deferredInit() {
185185
Service.Interface.ActivePluginsChanged += this.onActivePluginsChanged;
186186
}
187187

188-
private void onActivePluginsChanged(PluginListInvalidationKind kind, bool affectedThisPlugin) => CheckForOtherComboPlugins();
188+
private void onActivePluginsChanged(IActivePluginsChangedEventArgs e) => CheckForOtherComboPlugins();
189189

190190
public static int CheckForOtherComboPlugins() {
191191
IExposedPlugin[] others = Service.Interface.InstalledPlugins

XIVComboVX/XIVComboVX.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<Project Sdk="Dalamud.NET.Sdk/12.0.2">
2+
<Project Sdk="Dalamud.NET.Sdk/13.0.0">
33
<PropertyGroup>
44
<Product>XIVComboVX</Product>
55
<Authors>VariableVixen, FrigidWalrus, attick, daemitus</Authors>

XIVComboVX/dalamud.props

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,45 +9,20 @@
99
<Deterministic>false</Deterministic>
1010
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1111
<ProduceReferenceAssembly>false</ProduceReferenceAssembly>
12-
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
1312
</PropertyGroup>
1413

1514
<Import Project="framework.props" />
1615

17-
<ItemGroup>
18-
<Reference Include="Newtonsoft.Json">
19-
<HintPath>$(DalamudLibPath)Newtonsoft.Json.dll</HintPath>
20-
<Private>False</Private>
21-
</Reference>
22-
<Reference Include="Dalamud">
23-
<HintPath>$(DalamudLibPath)Dalamud.dll</HintPath>
24-
<Private>False</Private>
25-
</Reference>
26-
<Reference Include="ImGui.NET">
27-
<HintPath>$(DalamudLibPath)ImGui.NET.dll</HintPath>
28-
<Private>False</Private>
29-
</Reference>
16+
<!--ItemGroup>
3017
<Reference Include="ImGuiScene">
3118
<HintPath>$(DalamudLibPath)ImGuiScene.dll</HintPath>
3219
<Private>False</Private>
3320
</Reference>
34-
<Reference Include="Lumina">
35-
<HintPath>$(DalamudLibPath)Lumina.dll</HintPath>
36-
<Private>False</Private>
37-
</Reference>
38-
<Reference Include="Lumina.Excel">
39-
<HintPath>$(DalamudLibPath)Lumina.Excel.dll</HintPath>
40-
<Private>False</Private>
41-
</Reference>
42-
<Reference Include="FFXIVClientStructs">
43-
<HintPath>$(DalamudLibPath)FFXIVClientStructs.dll</HintPath>
44-
<Private>False</Private>
45-
</Reference>
4621
<Reference Include="InteropGenerator.Runtime">
4722
<HintPath>$(DalamudLibPath)InteropGenerator.Runtime.dll</HintPath>
4823
<Private>False</Private>
4924
</Reference>
50-
</ItemGroup>
25+
</ItemGroup-->
5126

5227
<ItemGroup>
5328
<None Remove="dalamud.props" />

XIVComboVX/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
"DalamudPackager": {
66
"type": "Direct",
7-
"requested": "[12.0.0, )",
8-
"resolved": "12.0.0",
9-
"contentHash": "J5TJLV3f16T/E2H2P17ClWjtfEBPpq3yxvqW46eN36JCm6wR+EaoaYkqG9Rm5sHqs3/nK/vKjWWyvEs/jhKoXw=="
7+
"requested": "[13.0.0, )",
8+
"resolved": "13.0.0",
9+
"contentHash": "Mb3cUDSK/vDPQ8gQIeuCw03EMYrej1B4J44a1AvIJ9C759p9XeqdU9Hg4WgOmlnlPe0G7ILTD32PKSUpkQNa8w=="
1010
},
1111
"DotNet.ReproducibleBuilds": {
1212
"type": "Direct",

0 commit comments

Comments
 (0)