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

Commit

Permalink
fix: must use auto off when after combat.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Aug 23, 2023
1 parent f5cb4e6 commit 20cbdf5
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 10 deletions.
1 change: 0 additions & 1 deletion RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ public enum PluginConfigBool : byte

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

[Default(true)] ShowBeneficialPositions,
[Default(false)] HideWarning,
Expand Down
1 change: 0 additions & 1 deletion RotationSolver/Localization/ConfigTranslation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ internal static class ConfigTranslation
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: 1 addition & 2 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ 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_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_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 between area.";

public string ConfigWindow_Param_AutoOffCutScene { get; set; } = "Auto turn off during cut scene.";
Expand Down
3 changes: 1 addition & 2 deletions RotationSolver/UI/RotationConfigWindow_Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -302,11 +302,10 @@ 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
6 changes: 2 additions & 4 deletions RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,8 @@ private static void UpdateCombatTime()
else if (last && !DataCenter.InCombat)
{
_startCombatTime = DateTime.MinValue;
if (Service.Config.GetValue(PluginConfigBool.AutoOffAfterCombat))
{
_cancelTime = DateTime.Now.AddSeconds(Service.Config.GetValue(PluginConfigFloat.AutoOffAfterCombatTime));
}

_cancelTime = DateTime.Now.AddSeconds(Service.Config.GetValue(PluginConfigFloat.AutoOffAfterCombatTime));
}

if (_startCombatTime == DateTime.MinValue)
Expand Down

0 comments on commit 20cbdf5

Please sign in to comment.