From 32f251720ccc25f88e6e0c0c56c70f9ba321d674 Mon Sep 17 00:00:00 2001 From: MidoriKami <9083275+MidoriKami@users.noreply.github.com> Date: Wed, 18 Jan 2023 06:14:09 -0800 Subject: [PATCH] Prevent Chat Messages when entering a duty (#17) --- CurrencyAlert/System.cs/CurrencyTracker.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CurrencyAlert/System.cs/CurrencyTracker.cs b/CurrencyAlert/System.cs/CurrencyTracker.cs index 5d5f768..5afb866 100644 --- a/CurrencyAlert/System.cs/CurrencyTracker.cs +++ b/CurrencyAlert/System.cs/CurrencyTracker.cs @@ -6,6 +6,7 @@ using CurrencyAlert.DataModels; using CurrencyAlert.Localization; using Dalamud.Logging; using KamiLib.ChatCommands; +using KamiLib.GameState; namespace CurrencyAlert.System.cs; @@ -45,6 +46,7 @@ public class CurrencyTracker : IDisposable private void OnZoneChange(object? sender, ushort e) { if (!Service.Configuration.ChatNotification) return; + if (Condition.IsBoundByDuty()) return; if (timer.Elapsed.Minutes >= 5 || timer.IsRunning == false) { @@ -68,4 +70,4 @@ public class CurrencyTracker : IDisposable cancellationTokenSource.Cancel(); cancellationTokenSource.Dispose(); } -} \ No newline at end of file +}