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

Commit

Permalink
fix: fixed provoke check.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed May 15, 2023
1 parent 28aecc9 commit ceab36e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
19 changes: 18 additions & 1 deletion Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
6 changes: 3 additions & 3 deletions RotationSolver.Basic/Helpers/TargetFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ internal static IEnumerable<BattleChara> TankRangeTarget(IEnumerable<BattleChara
/// <returns></returns>
internal static IEnumerable<BattleChara> ProvokeTarget(IEnumerable<BattleChara> 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 =>
{
Expand All @@ -177,7 +175,9 @@ internal static IEnumerable<BattleChara> ProvokeTarget(IEnumerable<BattleChara>
&& (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;
}
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.",
Expand All @@ -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",
Expand Down

0 comments on commit ceab36e

Please sign in to comment.