diff --git a/VoidBox/Configuration.cs b/VoidBox/Configuration.cs index 781d4e3..a1935c9 100644 --- a/VoidBox/Configuration.cs +++ b/VoidBox/Configuration.cs @@ -16,7 +16,7 @@ public class Configuration : IPluginConfiguration private static readonly JsonSerializer _jsonSerializer = JsonSerializer.CreateDefault(); [NonSerialized] - private DalamudPluginInterface? _pluginInterface; + private IDalamudPluginInterface? _pluginInterface; [JsonProperty] private Guid _loginGuid; @@ -56,7 +56,7 @@ public class Configuration : IPluginConfiguration } } - internal void Initialize(DalamudPluginInterface pluginInterface) + internal void Initialize(IDalamudPluginInterface pluginInterface) { _pluginInterface = pluginInterface; diff --git a/VoidBox/GameVersion.cs b/VoidBox/GameVersion.cs index 2cc6cb9..c98462d 100644 --- a/VoidBox/GameVersion.cs +++ b/VoidBox/GameVersion.cs @@ -1,4 +1,5 @@ using FFXIVClientStructs.FFXIV.Client.System.Framework; +using System.Text; namespace Ktisis; @@ -7,6 +8,6 @@ public static class GameVersion { public unsafe static string GetCurrent() { var framework = Framework.Instance(); - return framework != null ? framework->GameVersion.Base : string.Empty; + return framework != null ? Encoding.UTF8.GetString(framework->GameVersion) : string.Empty; } } diff --git a/VoidBox/Plugin.cs b/VoidBox/Plugin.cs index 538109d..625cf45 100644 --- a/VoidBox/Plugin.cs +++ b/VoidBox/Plugin.cs @@ -14,7 +14,7 @@ public sealed unsafe class Plugin : IDalamudPlugin { private readonly List _cmds; - public Plugin([RequiredVersion("1.0")] DalamudPluginInterface pluginInterface) + public Plugin(IDalamudPluginInterface pluginInterface) { pluginInterface.Create(); @@ -154,7 +154,7 @@ public sealed unsafe class Plugin : IDalamudPlugin private unsafe delegate nint EnvStateCopyDelegate(EnvState* dest, EnvState* src); - [Signature("E8 ?? ?? ?? ?? 49 3B F5", DetourName = nameof(EnvStateCopyDetour))] + [Signature("E8 ?? ?? ?? ?? 49 3B F5 75 0D", DetourName = nameof(EnvStateCopyDetour))] private Hook _envStateCopyHook = null!; private unsafe nint EnvStateCopyDetour(EnvState* dest, EnvState* src) { diff --git a/VoidBox/Service.cs b/VoidBox/Service.cs index fc67256..2083a16 100644 --- a/VoidBox/Service.cs +++ b/VoidBox/Service.cs @@ -17,7 +17,7 @@ public sealed class Service public static EnvCollection Envs { get; internal set; } = null!; [PluginService] - public static DalamudPluginInterface PluginInterface { get; private set; } = null!; + public static IDalamudPluginInterface PluginInterface { get; private set; } = null!; [PluginService] public static ICommandManager CommandManager { get; private set; } = null!; diff --git a/VoidBox/Structs/Env/EnvState.cs b/VoidBox/Structs/Env/EnvState.cs index bbe6700..d50fefb 100644 --- a/VoidBox/Structs/Env/EnvState.cs +++ b/VoidBox/Structs/Env/EnvState.cs @@ -6,14 +6,14 @@ namespace Ktisis.Structs.Env; [StructLayout(LayoutKind.Explicit, Size = 0x258)] public struct EnvState { - [FieldOffset(0x008)] public uint SkyId; - - [FieldOffset(0x020)] public EnvLighting Lighting; - [FieldOffset(0x094)] public EnvStars Stars; - [FieldOffset(0x0BC)] public EnvFog Fog; - - [FieldOffset(0x104)] public EnvClouds Clouds; - [FieldOffset(0x12C)] public EnvRain Rain; - [FieldOffset(0x160)] public EnvDust Dust; - [FieldOffset(0x194)] public EnvWind Wind; + [FieldOffset(0x008)] public uint SkyId; + + [FieldOffset(0x020)] public EnvLighting Lighting; + [FieldOffset(0x098)] public EnvStars Stars; + [FieldOffset(0x0C0)] public EnvFog Fog; + + [FieldOffset(0x148)] public EnvClouds Clouds; + [FieldOffset(0x170)] public EnvRain Rain; + [FieldOffset(0x1A4)] public EnvDust Dust; + [FieldOffset(0x1D8)] public EnvWind Wind; } diff --git a/VoidBox/VoidBox.csproj b/VoidBox/VoidBox.csproj index 41813a5..a4a5802 100644 --- a/VoidBox/VoidBox.csproj +++ b/VoidBox/VoidBox.csproj @@ -3,7 +3,7 @@ 0x0ade - 0.1.0.6 + 0.1.0.7 @@ -33,7 +33,7 @@ - + $(DalamudLibPath)FFXIVClientStructs.dll false diff --git a/VoidBox/VoidBox.json b/VoidBox/VoidBox.json index 5673e3e..9dd58c9 100644 --- a/VoidBox/VoidBox.json +++ b/VoidBox/VoidBox.json @@ -3,7 +3,7 @@ "InternalName": "VoidBox2782", "Author": "0x0ade", "ApplicableVersion": "any", - "DalamudApiLevel": 9, + "DalamudApiLevel": 10, "Punchline": "Make jump puzzles prettier by adding a skybox to the housing void.", "Description": "Basic plugin to add a skybox to the housing void.", "Tags": [ "skybox", "housing", "void", "jump puzzles" ], diff --git a/VoidBox/packages.lock.json b/VoidBox/packages.lock.json index 8ca7ea5..19fcea9 100644 --- a/VoidBox/packages.lock.json +++ b/VoidBox/packages.lock.json @@ -4,9 +4,9 @@ "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.12, )", - "resolved": "2.1.12", - "contentHash": "Sc0PVxvgg4NQjcI8n10/VfUQBAS4O+Fw2pZrAqBdRMbthYGeogzu5+xmIGCGmsEZ/ukMOBuAqiNiB5qA3MRalg==" + "requested": "[2.1.13, )", + "resolved": "2.1.13", + "contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" } } }