Compare commits

...

2 Commits

Author SHA1 Message Date
Anna 4acf59dfd6
chore: bump version to 1.2.11 2023-04-05 00:20:08 -04:00
Anna cf63dfc686
refactor: update for net7 2023-04-05 00:19:41 -04:00
4 changed files with 19 additions and 19 deletions

View File

@ -6,16 +6,16 @@ using Dalamud.Logging;
namespace Tourist {
public class GameFunctions : IDisposable {
private delegate IntPtr VistaUnlockedDelegate(ushort index, int a2, int a3);
private delegate nint VistaUnlockedDelegate(ushort index, int a2, int a3);
private delegate IntPtr CreateVfxDelegate(string name);
private delegate nint CreateVfxDelegate(string name);
private delegate IntPtr PlayVfxDelegate(IntPtr vfx, float idk, int idk2);
private delegate nint PlayVfxDelegate(nint vfx, float idk, int idk2);
internal delegate IntPtr RemoveVfxDelegate(IntPtr vfx);
internal delegate nint RemoveVfxDelegate(nint vfx);
private Plugin Plugin { get; }
private IntPtr SightseeingMaskPointer { get; }
private nint SightseeingMaskPointer { get; }
private CreateVfxDelegate CreateVfx { get; }
private PlayVfxDelegate PlayVfxInternal { get; }
@ -46,7 +46,7 @@ namespace Tourist {
this.VistaUnlockedHook.Dispose();
}
private IntPtr OnVistaUnlock(ushort index, int a2, int a3) {
private nint OnVistaUnlock(ushort index, int a2, int a3) {
try {
this.Plugin.Markers.RemoveVfx(index);
} catch (Exception ex) {
@ -56,7 +56,7 @@ namespace Tourist {
return this.VistaUnlockedHook.Original(index, a2, a3);
}
public unsafe IntPtr SpawnVfx(string name, Vector3 position) {
public unsafe nint SpawnVfx(string name, Vector3 position) {
var vfx = this.CreateVfx(name);
var pos = (float*) (vfx + 80);
@ -75,12 +75,12 @@ namespace Tourist {
return vfx;
}
internal bool PlayVfx(IntPtr vfx) {
return this.PlayVfxInternal(vfx, 0.0f, -1) == IntPtr.Zero;
internal bool PlayVfx(nint vfx) {
return this.PlayVfxInternal(vfx, 0.0f, -1) == nint.Zero;
}
public bool HasVistaUnlocked(short index) {
if (this.SightseeingMaskPointer == IntPtr.Zero) {
if (this.SightseeingMaskPointer == nint.Zero) {
return false;
}

View File

@ -11,8 +11,8 @@ namespace Tourist {
private const string MarkerPath = "bgcommon/world/common/vfx_for_live/eff/b0810_tnsk_y.avfx";
private Plugin Plugin { get; }
private Dictionary<uint, IntPtr> Spawned { get; } = new();
private HashSet<IntPtr> Queue { get; } = new();
private Dictionary<uint, nint> Spawned { get; } = new();
private HashSet<nint> Queue { get; } = new();
public Markers(Plugin plugin) {
this.Plugin = plugin;

View File

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.2.10</Version>
<TargetFramework>net6-windows</TargetFramework>
<Version>1.2.11</Version>
<TargetFramework>net7-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@ -47,7 +47,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.8"/>
<PackageReference Include="DalamudPackager" Version="2.1.11"/>
<PackageReference Include="FFXIVWeather.Lumina" Version="2.2.0"/>
</ItemGroup>

View File

@ -1,12 +1,12 @@
{
"version": 1,
"dependencies": {
"net6.0-windows7.0": {
"net7.0-windows7.0": {
"DalamudPackager": {
"type": "Direct",
"requested": "[2.1.8, )",
"resolved": "2.1.8",
"contentHash": "YqagNXs9InxmqkXzq7kLveImxnodkBEicAhydMXVp7dFjC7xb76U6zGgAax4/BWIWfZeWzr5DJyQSev31kj81A=="
"requested": "[2.1.11, )",
"resolved": "2.1.11",
"contentHash": "9qlAWoRRTiL/geAvuwR/g6Bcbrd/bJJgVnB/RurBiyKs6srsP0bvpoo8IK+Eg8EA6jWeM6/YJWs66w4FIAzqPw=="
},
"FFXIVWeather.Lumina": {
"type": "Direct",