diff --git a/Plugin/EngageTimer.csproj b/Plugin/EngageTimer.csproj index 537ba52..6b2f783 100644 --- a/Plugin/EngageTimer.csproj +++ b/Plugin/EngageTimer.csproj @@ -67,9 +67,9 @@ - + - + diff --git a/Plugin/EngageTimer.yaml b/Plugin/EngageTimer.yaml index 4e19750..850035a 100644 --- a/Plugin/EngageTimer.yaml +++ b/Plugin/EngageTimer.yaml @@ -33,5 +33,4 @@ image_urls: category_tags: - jobs changelog: |- - - Option to hide the stopwatch/floating window in cutscenes - - Enabling light effect animation would show an error texture and required a plugin restart to be loaded properly \ No newline at end of file + - API11 update diff --git a/Plugin/Game/SFXPlay.cs b/Plugin/Game/SFXPlay.cs index 5e25544..e783a96 100644 --- a/Plugin/Game/SFXPlay.cs +++ b/Plugin/Game/SFXPlay.cs @@ -14,34 +14,16 @@ // along with this program. If not, see . using System; -using Dalamud.Utility.Signatures; +using System.Diagnostics; +using FFXIVClientStructs.FFXIV.Client.UI; namespace EngageTimer.Game; -/** - * thanks aers - * sig taken from https://github.com/philpax/plogonscript/blob/main/PlogonScript/Script/Bindings/Sound.cs - * https://github.com/0ceal0t/JobBars/blob/2c9bef8dd4f0bf9ebc91c07e03da6c841ac2bd35/JobBars/Helper/UiHelper.GameFunctions.cs#L61 - * --- - * https://discord.com/channels/581875019861328007/653504487352303619/988123102116450335 - */ -internal unsafe class GameSound -{ - [Signature("E8 ?? ?? ?? ?? 48 63 45 80")] - public readonly delegate* unmanaged PlaySoundEffect = null; - - public GameSound() - { - Plugin.GameInterop.InitializeFromAttributes(this); - } -} - public class SfxPlay { public const uint FirstSeSfx = 37 - 1; public const uint SmallTick = 29; public const uint CdTick = 48; - private readonly GameSound _gameSound = new(); public SfxPlay() { @@ -53,11 +35,11 @@ public SfxPlay() SoundEffect(0); // should be cursor sound } - public unsafe void SoundEffect(uint id) + public void SoundEffect(uint id) { // var s = new Stopwatch(); // s.Start(); - _gameSound.PlaySoundEffect(id, IntPtr.Zero, IntPtr.Zero, 0); + UIGlobals.PlaySoundEffect(id, IntPtr.Zero, IntPtr.Zero, 0); // s.Stop(); // Plugin.Logger.Debug("Sound play took " + s.ElapsedMilliseconds + "ms"); } diff --git a/Plugin/packages.lock.json b/Plugin/packages.lock.json index d0ffd4f..9725a29 100644 --- a/Plugin/packages.lock.json +++ b/Plugin/packages.lock.json @@ -4,9 +4,9 @@ "net8.0-windows7.0": { "DalamudPackager": { "type": "Direct", - "requested": "[2.1.13, )", - "resolved": "2.1.13", - "contentHash": "rMN1omGe8536f4xLMvx9NwfvpAc9YFFfeXJ1t4P4PE6Gu8WCIoFliR1sh07hM+bfODmesk/dvMbji7vNI+B/pQ==" + "requested": "[11.0.0, )", + "resolved": "11.0.0", + "contentHash": "bjT7XUlhIJSmsE/O76b7weUX+evvGQctbQB8aKXt94o+oPWxHpCepxAGMs7Thow3AzCyqWs7cOpp9/2wcgRRQA==" }, "EmbedIO": { "type": "Direct", @@ -19,9 +19,9 @@ }, "JetBrains.Annotations": { "type": "Direct", - "requested": "[2023.3.0, )", - "resolved": "2023.3.0", - "contentHash": "PHfnvdBUdGaTVG9bR/GEfxgTwWM0Z97Y6X3710wiljELBISipSfF5okn/vz+C2gfO+ihoEyVPjaJwn8ZalVukA==" + "requested": "[2024.3.0, )", + "resolved": "2024.3.0", + "contentHash": "ox5pkeLQXjvJdyAB4b2sBYAlqZGLh3PjSnP1bQNVx72ONuTJ9+34/+Rq91Fc0dG29XG9RgZur9+NcP4riihTug==" }, "System.ValueTuple": { "type": "Direct",