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

Commit

Permalink
fix: add an maxping option.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 14, 2023
1 parent b806420 commit 06ab250
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public class PluginConfiguration : IPluginConfiguration
public float ControlProgressHeight = 8;
public bool ShowCooldownWindow = false;
public float DistanceForMoving = 1.2f;
public int MaxPing = 300;

public void Save()
{
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ public static float DPSTaken
public static ActionID LastGCD { get; private set; } = 0;

public static ActionID LastAbility { get; private set; } = 0;
public static float Ping => Math.Min(RTT, FetchTime);
public static float Ping => Math.Min(Math.Min(RTT, FetchTime), Service.Config.MaxPing);
public static float RTT { get; set; } = 0.1f;
public static float FetchTime { get; set; } = 0.1f;

Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ internal partial class Strings
public string ConfigWindow_Param_CountDownAhead { get; set; } = "Set the time advance of using casting actions on counting down.";
public string ConfigWindow_Param_SpecialDuration { get; set; } = "Set the duration of special windows set by commands";
public string ConfigWindow_Param_AddDotGCDCount { get; set; } = "Set GCD advance of DOT refresh";
public string ConfigWindow_Param_MaxPing { get; set; } = "Set the Max Ping that RS can get.";
public string ConfigWindow_Param_AutoOffBetweenArea { get; set; } = "Auto turn off when player is between area.";

public string ConfigWindow_Param_AutoOffCutScene { get; set; } = "Auto turn off during cut scene.";
Expand Down
3 changes: 3 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ private void DrawParamBasic()
DrawIntNumber(LocalizationManager.RightLang.ConfigWindow_Param_AddDotGCDCount,
ref Service.Config.AddDotGCDCount, Service.Default.AddDotGCDCount, min: 0, max: 3);

DrawIntNumber(LocalizationManager.RightLang.ConfigWindow_Param_MaxPing,
ref Service.Config.MaxPing, Service.Default.MaxPing, min: 50, max: 500);

ImGui.Spacing();

DrawCheckBox(LocalizationManager.RightLang.ConfigWindow_Param_AutoOffBetweenArea,
Expand Down

0 comments on commit 06ab250

Please sign in to comment.