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

Commit

Permalink
fix: endspecial entry string.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 20, 2023
1 parent 6bebf14 commit ca971fc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 31 deletions.
38 changes: 16 additions & 22 deletions RotationSolver/Commands/RSCommands_StateSpecialCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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>(T type, Func<T, JobRole, string> sayout, Action<JobRole> doingSomething)
where T : struct, Enum
Expand Down
5 changes: 5 additions & 0 deletions RotationSolver/Helpers/ConfigurationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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, //状态限制
Expand Down
9 changes: 2 additions & 7 deletions RotationSolver/Updaters/TargetUpdater_Friends.cs
Original file line number Diff line number Diff line change
Expand Up @@ -293,12 +293,7 @@ private static IEnumerable<BattleChara> FilterForDeath(IEnumerable<BattleChara>
/// </summary>
static DateTime foundTime = DateTime.Now;
static TimeSpan relayTime = TimeSpan.Zero;
static readonly string[] authorKeys = new string[]
{
"LwA5GZE3hRgUtxmCB59xqQ==",
"EJ/sAztgwh8D9PKF3IscmA==",
"b4/6WcxY3Xhh1Ln5LZKMVA==",
};

static List<string> macroToAuthor = new List<string>()
{
"blush",
Expand Down Expand Up @@ -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;

//没找到作者
Expand Down
5 changes: 3 additions & 2 deletions RotationSolver/Windows/RotationConfigWindow_Help.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit ca971fc

Please sign in to comment.