Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
fix: Reduce the frequency of high-end rotation error reporting.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Mar 19, 2023
1 parent 26f612f commit 549c0e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion RotationSolver/Commands/RSCommands_Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public static partial class RSCommands
{
static DateTime _fastClickStopwatch = DateTime.Now;
static readonly TimeSpan _fastSpan = new TimeSpan(0, 0, 0, 0, 200);
static byte _loop = 0;
internal static unsafe void DoAnAction(bool isGCD)
{
if (DataCenter.StateType == StateCommandType.Cancel) return;
Expand All @@ -25,7 +26,12 @@ internal static unsafe void DoAnAction(bool isGCD)

if (SocialUpdater.InHighEndDuty && !RotationUpdater.RightNowRotation.IsAllowed(out var str))
{
Service.ToastGui.ShowError(string.Format(LocalizationManager.RightLang.HighEndBan, str));
if(_loop % 5 == 0)
{
Service.ToastGui.ShowError(string.Format(LocalizationManager.RightLang.HighEndBan, str));
}
_loop++;
_loop %= 5;
return;
}

Expand Down

0 comments on commit 549c0e5

Please sign in to comment.