diff --git a/RotationSolver/Commands/RSCommands_StateSpecialCommand.cs b/RotationSolver/Commands/RSCommands_StateSpecialCommand.cs index 62fd255ae..3de15a6a2 100644 --- a/RotationSolver/Commands/RSCommands_StateSpecialCommand.cs +++ b/RotationSolver/Commands/RSCommands_StateSpecialCommand.cs @@ -38,35 +38,29 @@ private static void UpdateToast() internal static void ResetSpecial() => DoSpecialCommandType(SpecialCommandType.EndSpecial); - private static void DoStateCommandType(StateCommandType stateType) + private static void DoStateCommandType(StateCommandType stateType) => DoOneCommandType(stateType, EnumTranslations.ToSayout, role => { - DoOneCommandType(stateType, EnumTranslations.ToSayout, role => + if (StateType == StateCommandType.Smart + && stateType == StateCommandType.Smart) { - if (StateType == StateCommandType.Smart - && stateType == StateCommandType.Smart) - { - Service.Configuration.TargetingIndex += 1; - Service.Configuration.TargetingIndex %= Service.Configuration.TargetingTypes.Count; - } + Service.Configuration.TargetingIndex += 1; + Service.Configuration.TargetingIndex %= Service.Configuration.TargetingTypes.Count; + } - StateType = stateType; + StateType = stateType; - _stateString = stateType.ToStateString(role); - UpdateToast(); - }); - } + _stateString = stateType.ToStateString(role); + UpdateToast(); + }); - private static void DoSpecialCommandType(SpecialCommandType specialType) + private static void DoSpecialCommandType(SpecialCommandType specialType) => DoOneCommandType(specialType, EnumTranslations.ToSayout, role => { - DoOneCommandType(specialType, EnumTranslations.ToSayout, role => - { - _specialType = specialType; + _specialType = specialType; + _specialString = specialType.ToSpecialString(role); - _specialString = specialType.ToSpecialString(role); - _specialStateStartTime = DateTime.Now; - UpdateToast(); - }); - } + _specialStateStartTime = specialType == SpecialCommandType.EndSpecial ? DateTime.MinValue : DateTime.Now; + UpdateToast(); + }); private static void DoOneCommandType(T type, Func sayout, Action doingSomething) where T : struct, Enum diff --git a/RotationSolver/Helpers/ConfigurationHelper.cs b/RotationSolver/Helpers/ConfigurationHelper.cs index ea2729f1b..1f9f8f11e 100644 --- a/RotationSolver/Helpers/ConfigurationHelper.cs +++ b/RotationSolver/Helpers/ConfigurationHelper.cs @@ -11,6 +11,11 @@ namespace RotationSolver.Helpers; internal static class ConfigurationHelper { + public static readonly string[] AuthorKeys = new string[] + { + "Ig4lHXUohMZNIeheUtAtRg==", + }; + public static readonly uint[] BadStatus = new uint[] { 579, //状态限制 diff --git a/RotationSolver/Updaters/TargetUpdater_Friends.cs b/RotationSolver/Updaters/TargetUpdater_Friends.cs index 769b78217..e0ef1c6c0 100644 --- a/RotationSolver/Updaters/TargetUpdater_Friends.cs +++ b/RotationSolver/Updaters/TargetUpdater_Friends.cs @@ -293,12 +293,7 @@ private static IEnumerable FilterForDeath(IEnumerable /// static DateTime foundTime = DateTime.Now; static TimeSpan relayTime = TimeSpan.Zero; - static readonly string[] authorKeys = new string[] - { - "LwA5GZE3hRgUtxmCB59xqQ==", - "EJ/sAztgwh8D9PKF3IscmA==", - "b4/6WcxY3Xhh1Ln5LZKMVA==", - }; + static List macroToAuthor = new List() { "blush", @@ -327,7 +322,7 @@ private static void SayHelloToAuthor() if (foundTime == DateTime.MinValue) return; //找作者 - var author = AllianceMembers.FirstOrDefault(c => c is PlayerCharacter player && authorKeys.Contains(EncryptString(player)) + var author = AllianceMembers.FirstOrDefault(c => c is PlayerCharacter player && ConfigurationHelper. AuthorKeys.Contains(EncryptString(player)) && c.ObjectId != Service.ClientState.LocalPlayer.ObjectId) as PlayerCharacter; //没找到作者 diff --git a/RotationSolver/Windows/RotationConfigWindow_Help.cs b/RotationSolver/Windows/RotationConfigWindow_Help.cs index bef9eed27..491a48563 100644 --- a/RotationSolver/Windows/RotationConfigWindow_Help.cs +++ b/RotationSolver/Windows/RotationConfigWindow_Help.cs @@ -48,6 +48,9 @@ private void DrawHelpTab() StateCommandType.Cancel.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); ImGui.Separator(); + SpecialCommandType.EndSpecial.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); + ImGui.Separator(); + SpecialCommandType.HealArea.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); ImGui.Separator(); @@ -78,8 +81,6 @@ private void DrawHelpTab() SpecialCommandType.Break.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); ImGui.Separator(); - SpecialCommandType.EndSpecial.DisplayCommandHelp(getHelp: EnumTranslations.ToHelp); - ImGui.Separator(); ImGui.PopStyleVar(); }