fix(client): clamp the sending frequency
This commit is contained in:
parent
9120e6c2e2
commit
52128a0209
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue