diff --git a/ECommons b/ECommons index 200096e34..bf66e3d69 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 200096e34ef20e9f8d2249086c85e72d1b54f35d +Subproject commit bf66e3d6922325bf6c82ff884021bb9f47ba5e90 diff --git a/RotationSolver.Basic/Configuration/Conditions/ActionCondition.cs b/RotationSolver.Basic/Configuration/Conditions/ActionCondition.cs index baedd6883..a98156479 100644 --- a/RotationSolver.Basic/Configuration/Conditions/ActionCondition.cs +++ b/RotationSolver.Basic/Configuration/Conditions/ActionCondition.cs @@ -67,8 +67,6 @@ protected override bool IsTrueInside(ICustomRotation rotation) break; case ActionConditionType.CanUse: return _action.CanUse(out var act); - break; - } return false; } diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs index 5fc3ebb64..2febbf840 100644 --- a/RotationSolver.Basic/Helpers/ObjectHelper.cs +++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs @@ -318,7 +318,10 @@ internal static bool IsTopPriorityHostile(this IGameObject obj) var fateId = DataCenter.FateId; - if (obj is IBattleChara b && b.StatusList?.Any(StatusHelper.IsPriority) == true) return true; + if (obj is IBattleChara b) + { + if (b.StatusList != null && b.StatusList.Any(StatusHelper.IsPriority)) return true; + } if (Service.Config.ChooseAttackMark && MarkingHelper.AttackSignTargets.FirstOrDefault(id => id != 0) == (long)obj.GameObjectId) return true; diff --git a/RotationSolver.Basic/RotationSolver.Basic.csproj b/RotationSolver.Basic/RotationSolver.Basic.csproj index 887ac1d87..3498597f5 100644 --- a/RotationSolver.Basic/RotationSolver.Basic.csproj +++ b/RotationSolver.Basic/RotationSolver.Basic.csproj @@ -68,7 +68,7 @@ all - + diff --git a/RotationSolver.SourceGenerators/RotationSolver.SourceGenerators.csproj b/RotationSolver.SourceGenerators/RotationSolver.SourceGenerators.csproj index 41718d824..ed135280b 100644 --- a/RotationSolver.SourceGenerators/RotationSolver.SourceGenerators.csproj +++ b/RotationSolver.SourceGenerators/RotationSolver.SourceGenerators.csproj @@ -7,7 +7,7 @@ - + diff --git a/RotationSolver/Updaters/ActionUpdater.cs b/RotationSolver/Updaters/ActionUpdater.cs index 270fc1c22..d7ff19cca 100644 --- a/RotationSolver/Updaters/ActionUpdater.cs +++ b/RotationSolver/Updaters/ActionUpdater.cs @@ -17,15 +17,16 @@ static ActionUpdater() { EzIPC.Init(typeof(ActionUpdater), "RotationSolverReborn.ActionUpdater"); } - [EzIPCEvent] public static Action? NextGCDActionChanged; - [EzIPCEvent] public static Action? NextActionChanged; + [EzIPCEvent] public static Action NextGCDActionChanged = delegate { }; + [EzIPCEvent] public static Action NextActionChanged = delegate { }; private static IAction? _nextAction; - internal static IAction? NextAction + internal static IAction? NextAction { get => _nextAction; - set { - if (_nextAction != value) + set + { + if (_nextAction != value) { _nextAction = value; NextActionChanged?.Invoke(_nextAction?.ID ?? 0);