diff --git a/client/Configuration.cs b/client/Configuration.cs index 0e21e78..de7f12e 100644 --- a/client/Configuration.cs +++ b/client/Configuration.cs @@ -10,6 +10,8 @@ public class Configuration : IPluginConfiguration { public HashSet BannedTerritories { get; set; } = new(); public bool DisableTrials = true; public bool DisableDeepDungeon = true; + public bool DisableInCutscene = true; + public bool DisableInGpose = true; public bool RemoveGlow = true; public bool AutoViewer; public bool AutoViewerClose = true; diff --git a/client/Messages.cs b/client/Messages.cs index da6ebd9..05d9537 100644 --- a/client/Messages.cs +++ b/client/Messages.cs @@ -1,5 +1,6 @@ using System.Numerics; using Dalamud.Game; +using Dalamud.Game.ClientState.Conditions; using Dalamud.Logging; using Lumina.Excel.GeneratedSheets; using Newtonsoft.Json; @@ -17,6 +18,7 @@ internal class Messages : IDisposable { "bg/ex2/02_est_e3/common/vfx/eff/b0941trp1f_o.avfx", }; + private Plugin Plugin { get; } private SemaphoreSlim CurrentMutex { get; } = new(1, 1); @@ -26,6 +28,21 @@ internal class Messages : IDisposable { private HashSet Trials { get; } = new(); private HashSet DeepDungeons { get; } = new(); + private bool CutsceneActive { + get { + var condition = this.Plugin.Condition; + return condition[ConditionFlag.OccupiedInCutSceneEvent] + || condition[ConditionFlag.WatchingCutscene78]; + } + } + + private bool GposeActive { + get { + var condition = this.Plugin.Condition; + return condition[ConditionFlag.WatchingCutscene]; + } + } + internal Messages(Plugin plugin) { this.Plugin = plugin; @@ -102,6 +119,14 @@ internal class Messages : IDisposable { return; } + if (this.Plugin.Config.DisableInCutscene && this.CutsceneActive) { + return; + } + + if (this.Plugin.Config.DisableInGpose && this.GposeActive) { + return; + } + this.RemoveVfx(null, null); Task.Run(async () => { diff --git a/client/Ui/MainWindowTabs/Settings.cs b/client/Ui/MainWindowTabs/Settings.cs index 1d18167..cd91a40 100644 --- a/client/Ui/MainWindowTabs/Settings.cs +++ b/client/Ui/MainWindowTabs/Settings.cs @@ -115,6 +115,8 @@ internal class Settings : ITab { private void DrawGeneral(ref bool anyChanged, ref bool vfx) { anyChanged |= vfx |= ImGui.Checkbox("Disable in trials", ref this.Plugin.Config.DisableTrials); anyChanged |= vfx |= ImGui.Checkbox("Disable in Deep Dungeons", ref this.Plugin.Config.DisableDeepDungeon); + anyChanged |= vfx |= ImGui.Checkbox("Disable in cutscenes", ref this.Plugin.Config.DisableInCutscene); + anyChanged |= vfx |= ImGui.Checkbox("Disable in /gpose", ref this.Plugin.Config.DisableInGpose); anyChanged |= vfx |= ImGui.Checkbox("Remove glow effect from signs", ref this.Plugin.Config.RemoveGlow); var tt = this.Plugin.DataManager.GetExcelSheet();