Prevent Chat Messages when entering a duty (#17)

main
MidoriKami 2023-01-18 06:14:09 -08:00 committed by GitHub
parent 1f5c326dfb
commit 32f251720c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -6,6 +6,7 @@ using CurrencyAlert.DataModels;
using CurrencyAlert.Localization; using CurrencyAlert.Localization;
using Dalamud.Logging; using Dalamud.Logging;
using KamiLib.ChatCommands; using KamiLib.ChatCommands;
using KamiLib.GameState;
namespace CurrencyAlert.System.cs; namespace CurrencyAlert.System.cs;
@ -45,6 +46,7 @@ public class CurrencyTracker : IDisposable
private void OnZoneChange(object? sender, ushort e) private void OnZoneChange(object? sender, ushort e)
{ {
if (!Service.Configuration.ChatNotification) return; if (!Service.Configuration.ChatNotification) return;
if (Condition.IsBoundByDuty()) return;
if (timer.Elapsed.Minutes >= 5 || timer.IsRunning == false) if (timer.Elapsed.Minutes >= 5 || timer.IsRunning == false)
{ {
@ -68,4 +70,4 @@ public class CurrencyTracker : IDisposable
cancellationTokenSource.Cancel(); cancellationTokenSource.Cancel();
cancellationTokenSource.Dispose(); cancellationTokenSource.Dispose();
} }
} }