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

Commit

Permalink
fix: increase the up limit about AutoOffAfterCombatTime. Find back …
Browse files Browse the repository at this point in the history
…the option about that.
  • Loading branch information
ArchiDog1998 committed Aug 26, 2023
1 parent 1e07d84 commit 43ebc37
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"ClickingCount": 9806
"ClickingCount": 10201
}
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ public enum PluginConfigBool : byte

[Default(true)] RecordCastingArea,

[Default(true)] AutoOffAfterCombat,
[Default(false)] AutoOpenChest,
[Default(true)] AutoCloseChestWindow,

Expand All @@ -330,7 +331,7 @@ public enum PluginConfigBool : byte

public enum PluginConfigFloat : byte
{
[Default(8f, 0f, 60f)] AutoOffAfterCombatTime,
[Default(8f, 0f, 600f)] AutoOffAfterCombatTime,
[Default(3f, 0f, 8f)] DrawingHeight,
[Default(0.2f, 0.005f, 0.05f)] SampleLength,
[Default(0.1f)] KeyBoardNoiseTimeMin,
Expand Down
1 change: 1 addition & 0 deletions RotationSolver/Localization/ConfigTranslation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ internal static class ConfigTranslation
PluginConfigBool.DownloadRotations => LocalizationManager.RightLang.ConfigWindow_Rotation_DownloadRotations,
PluginConfigBool.AutoUpdateRotations => LocalizationManager.RightLang.ConfigWindow_Rotation_AutoUpdateRotations,
PluginConfigBool.AutoLoadCustomRotations => LocalizationManager.RightLang.ConfigWindow_Rotations_AutoLoadCustomRotations,
PluginConfigBool.AutoOffAfterCombat => LocalizationManager.RightLang.ConfigWindow_Param_AutoOffAfterCombat,

_ => string.Empty,
};
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@
"ConfigWindow_Param_SpecialDuration": "Set the duration of special windows set by commands",
"ConfigWindow_Param_AddDotGCDCount": "Set GCD advance of DOT refresh",
"ConfigWindow_Param_MaxPing": "Set the Max Ping that RS can get.",
"ConfigWindow_Param_AutoOffAfterCombatTime": "Auto turn off when combat is over more than several seconds.",
"ConfigWindow_Param_AutoOffBetweenArea": "Auto turn off when player is moving between areas.",
"ConfigWindow_Param_AutoOffAfterCombat": "Auto turn off when combat is over more than several seconds.",
"ConfigWindow_Param_AutoOffAfterCombatTime": "seconds.",
"ConfigWindow_Param_AutoOffCutScene": "Auto turn off during cutscenes.",
"ConfigWindow_Param_AutoOffWhenDead": "Auto turn off when dead.",
"ConfigWindow_Param_UseWorkTask": "Use work task for acceleration.",
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ internal partial class Strings
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_AutoOffAfterCombatTime { get; set; } = "Auto turn off when combat is over more than several seconds.";
public string ConfigWindow_Param_AutoOffBetweenArea { get; set; } = "Auto turn off when player is moving between areas.";

public string ConfigWindow_Param_AutoOffAfterCombat { get; set; } = "Auto turn off when combat is over more than several seconds.";
public string ConfigWindow_Param_AutoOffAfterCombatTime { get; set; } = "seconds.";
public string ConfigWindow_Param_AutoOffCutScene { get; set; } = "Auto turn off during cutscenes.";

public string ConfigWindow_Param_AutoOffWhenDead { get; set; } = "Auto turn off when dead.";
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/UI/RotationConfigWindow_Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,11 @@ private static void DrawBasicAutoSwitch()
private static readonly ISearchable[] _basicSwitchTurnOff = new ISearchable[]
{
// Turn off
new DragFloatSearchPlugin(PluginConfigFloat.AutoOffAfterCombatTime, 1f),
new CheckBoxSearchPlugin(PluginConfigBool.AutoOffBetweenArea),
new CheckBoxSearchPlugin(PluginConfigBool.AutoOffCutScene),
new CheckBoxSearchPlugin(PluginConfigBool.AutoOffWhenDead),
new CheckBoxSearchPlugin(PluginConfigBool.AutoOffAfterCombat,
new DragFloatSearchPlugin(PluginConfigFloat.AutoOffAfterCombatTime, 1f)),
};
#endregion

Expand Down
5 changes: 4 additions & 1 deletion RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ private static void UpdateCombatTime()
{
_startCombatTime = DateTime.MinValue;

AutoCancelTime = DateTime.Now.AddSeconds(Service.Config.GetValue(PluginConfigFloat.AutoOffAfterCombatTime));
if (Service.Config.GetValue(PluginConfigBool.AutoOffAfterCombat))
{
AutoCancelTime = DateTime.Now.AddSeconds(Service.Config.GetValue(PluginConfigFloat.AutoOffAfterCombatTime));
}
}

if (_startCombatTime == DateTime.MinValue)
Expand Down

0 comments on commit 43ebc37

Please sign in to comment.