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

Commit

Permalink
fix: removed Is Target dying and Is target boss property.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Nov 3, 2023
1 parent 3a8fb6c commit 7dca494
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 22 deletions.
1 change: 1 addition & 0 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,7 @@
"29401": 2.5,
"29709": 0.1,
"29711": 0.6,
"29731": 0.1,
"30800": 0.1,
"31323": 2.1,
"31338": 2.1,
Expand Down
3 changes: 2 additions & 1 deletion Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,5 +458,6 @@
35725,
34943,
34921,
35113
35113,
34947
]
2 changes: 1 addition & 1 deletion Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"ClickingCount": 47041,
"ClickingCount": 49362,
"SaidUsers": []
}
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Actions/BaseAction_Cooldown.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public bool WillHaveOneCharge(float remain)
/// <summary>
///
/// </summary>
public unsafe bool IsCoolingDown => CoolDownDetail == null ? false : CoolDownDetail->IsActive != 0;
public unsafe bool IsCoolingDown => CoolDownDetail != null && CoolDownDetail->IsActive != 0;

private float RecastTimeRemain => RecastTime - RecastTimeElapsedRaw;

Expand Down
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Actions/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ private bool TargetPartyAndHostile(float range, bool mustUse, out BattleChara ta
#region Target party
private bool TargetParty(float range, int aoeCount, bool mustUse, out BattleChara target)
{
if (_action.PrimaryCostType == 3 && _action.PrimaryCostValue == 24 || (ActionID)ID == ActionID.AngelWhisper)
if (_action.PrimaryCostType == 3 && _action.PrimaryCostValue == 24
|| (ActionID)ID is ActionID.AngelWhisper or ActionID.VariantRaise or ActionID.VariantRaise2)
{
return TargetDeath(out target);
}
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/Basic/SCH_Base.cs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ public abstract class SCH_Base : CustomRotation
/// </summary>
public static IBaseAction ChainStratagem { get; } = new BaseAction(ActionID.ChainStratagem)
{
ActionCheck = (b, m) => InCombat && IsTargetBoss && IsLongerThan(10),
ActionCheck = (b, m) => InCombat && IsLongerThan(10),
};

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ protected virtual bool MoveBackAbility(out IAction act)
[RotationDesc(DescType.HealSingleAbility)]
protected virtual bool HealSingleAbility(out IAction act)
{
if(PvP_Recuperate.CanUse(out act)) return true;
if (PvP_Recuperate.CanUse(out act)) return true;
act = null; return false;
}

Expand Down
2 changes: 1 addition & 1 deletion RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ or Job.RDM
/// </summary>
public static IBaseAction PvP_StandardIssueElixir { get; } = new BaseAction(ActionID.PvP_StandardIssueElixir, ActionOption.Heal)
{
ActionCheck = (t, m) => !InCombat
ActionCheck = (t, m) => !HasHostilesInMaxRange
&& (t.CurrentMp != t.MaxMp || t.CurrentHp != t.MaxHp),
};

Expand Down
10 changes: 0 additions & 10 deletions RotationSolver.Basic/Rotations/CustomRotation_OtherInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@ public abstract partial class CustomRotation
/// </summary>
protected static BattleChara Target => Svc.Targets.Target is BattleChara b ? b : Player;

/// <summary>
/// Shortcut for Target.IsDying();
/// </summary>
public static bool IsTargetDying => Target?.IsDying() ?? false;

/// <summary>
/// Shortcut for Target.IsBoss();
/// </summary>
public static bool IsTargetBoss => Target?.IsBoss() ?? false;

/// <summary>
/// Is there any hostile target in range? 25 for ranged jobs and healer, 3 for melee and tank.
/// </summary>
Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Localization/Localization.json
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@
"IsFullParty": "Is Full Party",
"PartyMembersMinHP": "Min HP in party members.",
"PartyMembersAverHP": "Average HP in party members.",
"IsTargetDying": "Is target going to die",
"IsTargetBoss": "Is target a boss",
"HasHostilesInRange": "Has hostiles in Range",
"HasHostilesInMaxRange": "Has hostiles in 25 yalms",
"NumberOfHostilesInRange": "The number of hostiles in Range",
Expand Down
2 changes: 0 additions & 2 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -434,8 +434,6 @@ internal class Strings
{ nameof(CustomRotation.IsFullParty), "Is Full Party"},
{ nameof(CustomRotation.PartyMembersMinHP), "Min HP in party members."},
{ nameof(CustomRotation.PartyMembersAverHP), "Average HP in party members."},
{ nameof(CustomRotation.IsTargetDying), "Is target going to die"},
{ nameof(CustomRotation.IsTargetBoss), "Is target a boss"},
{ nameof(CustomRotation.HasHostilesInRange), "Has hostiles in Range"},
{ nameof(CustomRotation.HasHostilesInMaxRange), "Has hostiles in 25 yalms"},
{ nameof(CustomRotation.NumberOfHostilesInRange), "The number of hostiles in Range"},
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/UI/RotationConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2360,7 +2360,8 @@ private static unsafe void DrawIcon()
//ImGui.Text(DataCenter.TerritoryContentType.ToString());

var controller = UIState.Instance()->LimitBreakController;
ImGui.Text($"LB: {controller.CurrentValue}");
var a = *(uint*)((IntPtr)(void*)&controller + 0);
ImGui.Text($"LB: CurrentValue {controller.CurrentValue}, Bar Value {*(int*)&controller.BarValue}, Bar Count {controller.BarCount}");
}

private static void DrawAction(ActionID id, string type)
Expand Down

0 comments on commit 7dca494

Please sign in to comment.