From ceab36ee3b8daed990560a27cf630c9aaf892ebb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A7=8B=E6=B0=B4?= <1123993881@qq.com> Date: Mon, 15 May 2023 23:02:18 +0800 Subject: [PATCH] fix: fixed provoke check. --- Resources/AnimationLockTime.json | 2 ++ Resources/HostileCastingArea.json | 19 ++++++++++++++++++- RotationSolver.Basic/Helpers/TargetFilter.cs | 6 +++--- RotationSolver/Localization/Localization.json | 3 ++- 4 files changed, 25 insertions(+), 5 deletions(-) diff --git a/Resources/AnimationLockTime.json b/Resources/AnimationLockTime.json index e94303aea..6f4105b8c 100644 --- a/Resources/AnimationLockTime.json +++ b/Resources/AnimationLockTime.json @@ -4,6 +4,7 @@ "40": 0.6, "41": 0.6, "42": 0.6, + "43": 0.6, "44": 0.6, "45": 0.6, "46": 0.6, @@ -149,6 +150,7 @@ "7531": 0.6, "7533": 0.6, "7535": 0.6, + "7538": 0.6, "7540": 0.6, "7541": 0.6, "7542": 0.6, diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json index c7d98fa95..96d85579b 100644 --- a/Resources/HostileCastingArea.json +++ b/Resources/HostileCastingArea.json @@ -75,13 +75,30 @@ 30257, 31122, 31139, + 31291, + 31292, + 31293, + 31303, 31376, 31390, + 31769, + 31773, + 31774, + 31780, 31835, 31885, 31910, 31925, 31956, 31978, - 32785 + 32059, + 32100, + 32111, + 32115, + 32116, + 32117, + 32122, + 32785, + 32868, + 32944 ] \ No newline at end of file diff --git a/RotationSolver.Basic/Helpers/TargetFilter.cs b/RotationSolver.Basic/Helpers/TargetFilter.cs index 30eb4ba50..8fbb14379 100644 --- a/RotationSolver.Basic/Helpers/TargetFilter.cs +++ b/RotationSolver.Basic/Helpers/TargetFilter.cs @@ -166,9 +166,7 @@ internal static IEnumerable TankRangeTarget(IEnumerable internal static IEnumerable ProvokeTarget(IEnumerable inputCharas, bool needDistance = false) { - var tankIDS = DataCenter.AllianceMembers.GetJobCategory(JobRole.Tank).Select(member => (ulong)member.ObjectId); var loc = Service.Player.Position; - var id = Service.Player.ObjectId; var targets = inputCharas.Where(target => { @@ -177,7 +175,9 @@ internal static IEnumerable ProvokeTarget(IEnumerable && (target.TargetObject?.IsValid() ?? false)) { //the target is not a tank role - if (!tankIDS.Contains(target.TargetObjectId) && (!needDistance || Vector3.Distance(target.Position, loc) > 5)) + if (Service.ObjectTable.SearchById(target.TargetObjectId) is BattleChara battle + && !battle.IsJobCategory(JobRole.Tank) + && (!needDistance || Vector3.Distance(target.Position, loc) > 5)) { return true; } diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json index ad361667c..9c48fbdb5 100644 --- a/RotationSolver/Localization/Localization.json +++ b/RotationSolver/Localization/Localization.json @@ -55,6 +55,7 @@ "ConfigWindow_Param_CountDownAhead": "Set the time advance of using casting actions on counting down.", "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_AutoOffBetweenArea": "Auto turn off when player is between area.", "ConfigWindow_Param_AutoOffCutScene": "Auto turn off during cut scene.", "ConfigWindow_Param_AutoOffWhenDead": "Auto turn off when dead.", @@ -74,7 +75,7 @@ "ConfigWindow_Param_StopCastingDelay": "Set the range of random delay for stopping casting when target is no need to cast in second.", "ConfigWindow_Param_Display": "Display", "ConfigWindow_Param_Advanced": "Advanced", - "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting.", + "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or has TenChiJin or PhantomFlurry status.", "ConfigWindow_Param_UseStopCasting": "Use stopping casting when target is dead.", "ConfigWindow_Param_ShowActionFlag": "Show action flag.", "ConfigWindow_Param_InDebug": "Debug Mode",