fix(client): clamp the sending frequency

This commit is contained in:
Anna 2023-10-13 02:21:01 -04:00
parent 9120e6c2e2
commit 52128a0209
Signed by: anna
GPG Key ID: D0943384CD9F87D1
1 changed files with 2 additions and 1 deletions

View File

@ -60,7 +60,8 @@ public sealed class Plugin : IDalamudPlugin {
}
private void FrameworkUpdate(IFramework framework) {
if (this.Stopwatch.Elapsed < TimeSpan.FromSeconds(this.Config.UpdateFrequency) || this.ClientState.LocalPlayer is not { } localPlayer) {
var freq = Math.Max(1, Math.Min(60, this.Config.UpdateFrequency));
if (this.Stopwatch.Elapsed < TimeSpan.FromSeconds(freq) || this.ClientState.LocalPlayer is not { } localPlayer) {
return;
}