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

Commit

Permalink
fix: fixed raising issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Feb 19, 2024
1 parent f3e0422 commit eb86c34
Show file tree
Hide file tree
Showing 12 changed files with 48 additions and 17 deletions.
6 changes: 5 additions & 1 deletion Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,5 +486,9 @@
10827,
10799,
19937,
19944
19944,
21297,
21628,
20265,
20253
]
4 changes: 2 additions & 2 deletions Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ClickingCount": 65516,
"SayingHelloCount": 51,
"ClickingCount": 65987,
"SayingHelloCount": 53,
"SaidUsers": []
}
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/ActionTargetInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ private readonly bool CanGetTarget(GameObject target, GameObject subTarget)
BattleChara? FindBeAttackedTarget()
{
if (!gameObjects.Any()) return null;
var attachedT = gameObjects.Where(tank => tank.TargetObject?.TargetObject == tank);
var attachedT = gameObjects.Where(ObjectHelper.IsTargetOnSelf);

if (!attachedT.Any())
{
Expand Down
5 changes: 4 additions & 1 deletion RotationSolver.Basic/Helpers/ObjectHelper.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.SubKinds;
using ECommons.DalamudServices;
using ECommons.GameFunctions;
using ECommons.GameHelpers;
Expand Down Expand Up @@ -176,7 +177,9 @@ public static unsafe bool IsEnemy(this GameObject obj)
/// <returns></returns>
public static unsafe bool IsAlliance(this GameObject obj)
=> obj != null && obj.ObjectId is not 0 and not GameObject.InvalidGameObjectId
&& ActionManager.CanUseActionOnTarget((uint)ActionID.CurePvE, obj.Struct());
&& ((DataCenter.Territory?.IsPvpZone ?? false)
? ActionManager.CanUseActionOnTarget((uint)ActionID.CurePvE, obj.Struct())
: obj is PlayerCharacter);

public static bool IsParty(this GameObject gameObject)
{
Expand Down
1 change: 1 addition & 0 deletions RotationSolver.Basic/Helpers/StatusHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ public static bool IsDangerous(this Status status)
{
if (!status.CanDispel()) return false;
if (status.StackCount > 2) return true;
if (status.RemainingTime > 20) return true;
return OtherConfiguration.DangerousStatus.Any(id => id == status.StatusId);
}

Expand Down
4 changes: 4 additions & 0 deletions RotationSolver.Basic/Rotations/Basic/AstrologianRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ static partial void ModifyMinorArcanaPvE(ref ActionSetting setting)
setting.ActionCheck = () => InCombat;
}

static partial void ModifyAspectedHeliosPvE(ref ActionSetting setting)
{
setting.StatusProvide = [StatusID.AspectedHelios];
}
static partial void ModifyTheArrowPvE(ref ActionSetting setting)
{
setting.TargetStatusProvide = StatusHelper.AstCardStatus;
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/DarkKnightRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,12 @@ static partial void ModifyShadowbringerPvE(ref ActionSetting setting)
static partial void ModifyShadowWallPvE(ref ActionSetting setting)
{
setting.StatusProvide = StatusHelper.RampartStatus;
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

static partial void ModifyDarkMindPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

static partial void ModifyOblationPvE(ref ActionSetting setting)
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/GunbreakerRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,12 @@ static partial void ModifyAuroraPvE(ref ActionSetting setting)
static partial void ModifyNebulaPvE(ref ActionSetting setting)
{
setting.StatusProvide = StatusHelper.RampartStatus;
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

static partial void ModifyCamouflagePvE(ref ActionSetting setting)
{
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

private protected sealed override IBaseAction TankStance => RoyalGuardPvE;
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver.Basic/Rotations/Basic/PaladinRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@ static partial void ModifyFightOrFlightPvE(ref ActionSetting setting)
static partial void ModifySentinelPvE(ref ActionSetting setting)
{
setting.StatusProvide = StatusHelper.RampartStatus;
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

static partial void ModifyBulwarkPvE(ref ActionSetting setting)
{
setting.StatusProvide = StatusHelper.RampartStatus;
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

static partial void ModifyCoverPvE(ref ActionSetting setting)
Expand All @@ -99,7 +99,7 @@ static partial void ModifyIntervenePvE(ref ActionSetting setting)

static partial void ModifyHolySheltronPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => OathGauge >= 50 && Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = () => OathGauge >= 50 && Player.IsTargetOnSelf();
}


Expand Down
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Rotations/Basic/WarriorRotation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ static partial void ModifyBerserkPvE(ref ActionSetting setting)
static partial void ModifyVengeancePvE(ref ActionSetting setting)
{
setting.StatusProvide = StatusHelper.RampartStatus;
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

static partial void ModifyRawIntuitionPvE(ref ActionSetting setting)
{
setting.ActionCheck = () => Player.TargetObject?.TargetObject == Player;
setting.ActionCheck = Player.IsTargetOnSelf;
}

static partial void ModifyHolmgangPvE(ref ActionSetting setting)
Expand Down
22 changes: 21 additions & 1 deletion RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
{
"RotationSolver.Data.UiString.ConfigWindowHeader": "Rotation Solver Settings v",
"RotationSolver.Data.UiString.Commands_Rotation": "Open config window."
"RotationSolver.Data.UiString.Commands_Rotation": "Open config window.",
"RotationSolver.Data.UiString.ConfigWindow_About_Punchline": "Analyses PvE combat information in every frame and finds the best action.",
"RotationSolver.Data.UiString.ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!",
"RotationSolver.Data.UiString.ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"RotationSolver.Data.UiString.ConfigWindow_ConditionSetDesc": "The condition set you chose, click to modify.",
"RotationSolver.Data.UiString.ConfigWindow_Searching": "Search... ",
"RotationSolver.Data.UiString.ConfigWindow_About_Description": "This means almost all the information available in one frame in combat, including the status of all players in the party, the status of any hostile targets, skill cooldowns, the MP and HP of characters, the location of characters, casting status of the hostile target, combo, combat duration, player level, etc.\n\nThen, it will highlight the best action on the hot bar, or help you to click on it.",
"RotationSolver.Data.UiString.ConfigWindow_About_Warning": "It is designed for GENERAL COMBAT, not for savage or ultimate. Use it carefully.",
"RotationSolver.Data.UiString.ConfigWindow_About_ClickingCount": "Rotation Solver helped you by clicking actions {0:N0} times.",
"RotationSolver.Data.UiString.ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!",
"RotationSolver.Data.UiString.ConfigWindow_About_Macros": "Macro",
"RotationSolver.Data.UiString.ConfigWindow_About_Compatibility": "Compatibility",
"RotationSolver.Data.UiString.ConfigWindow_About_Supporters": "Supporters",
"RotationSolver.Data.UiString.ConfigWindow_About_Links": "Links",
"RotationSolver.UI.RotationConfigWindowTab.Debug": "Debug",
"InDebugName": "Debug Mode",
"InDebugDescription": "",
"RotationSolver.UI.RotationConfigWindowTab.Basic": "Basic settings",
"RotationSolver.UI.RotationConfigWindowTab.Rotations": "All rotations that RS has loaded.",
"RotationSolver.UI.RotationConfigWindowTab.Target": "The way to find the targets, hostiles or friends.",
"RotationSolver.UI.RotationConfigWindowTab.UI": "Settings about the user interface."
}
3 changes: 1 addition & 2 deletions RotationSolver/Updaters/StateUpdater.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using ECommons.DalamudServices;
using ECommons.GameHelpers;
using ECommons.GameHelpers;
using RotationSolver.Basic.Configuration.Conditions;

namespace RotationSolver.Updaters;
Expand Down

0 comments on commit eb86c34

Please sign in to comment.