From fa204bf5f59497eb708c74fee102eec5258ee1b3 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sun, 17 Dec 2023 22:26:59 -0500
Subject: [PATCH 01/73] remove redundant ismoving checks
---
RotationSolver.Basic/Rotations/Basic/SAM_Base.cs | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs b/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
index 1a1901db9..3dbae613f 100644
--- a/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
@@ -156,7 +156,6 @@ public static bool IsMoonTimeLessThanFlower
public static IBaseAction OgiNamikiri { get; } = new BaseAction(ActionID.OgiNamikiri)
{
StatusNeed = new[] { StatusID.OgiNamikiriReady },
- ActionCheck = (b, m) => !IsMoving
};
///
@@ -174,7 +173,7 @@ public static bool IsMoonTimeLessThanFlower
///
public static IBaseAction Higanbana { get; } = new BaseAction(ActionID.Higanbana, ActionOption.Dot | ActionOption.UseResources)
{
- ActionCheck = (b, m) => !IsMoving && SenCount == 1,
+ ActionCheck = (b, m) => SenCount == 1,
TargetStatus = new[] { StatusID.Higanbana },
};
@@ -183,7 +182,7 @@ public static bool IsMoonTimeLessThanFlower
///
public static IBaseAction TenkaGoken { get; } = new BaseAction(ActionID.TenkaGoken, ActionOption.UseResources)
{
- ActionCheck = (b, m) => !IsMoving && SenCount == 2,
+ ActionCheck = (b, m) => SenCount == 2,
};
///
@@ -191,7 +190,7 @@ public static bool IsMoonTimeLessThanFlower
///
public static IBaseAction MidareSetsugekka { get; } = new BaseAction(ActionID.MidareSetsugekka, ActionOption.UseResources)
{
- ActionCheck = (b, m) => !IsMoving && SenCount == 3,
+ ActionCheck = (b, m) => SenCount == 3,
};
///
@@ -394,4 +393,4 @@ protected override bool DefenseSingleAbility(out IAction act)
if (ThirdEye.CanUse(out act)) return true;
return base.DefenseSingleAbility(out act);
}
-}
\ No newline at end of file
+}
From 95cc120e57a84a8c863f6bf05931df9ffbf9c137 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sun, 17 Dec 2023 22:24:06 -0500
Subject: [PATCH 02/73] duplicate check for reprisal
---
RotationSolver.Basic/Rotations/CustomRotation_Actions.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
index 7fe995a0c..0503f56f2 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
@@ -1,4 +1,4 @@
-using ECommons.ExcelServices;
+using ECommons.ExcelServices;
using RotationSolver.Basic.Traits;
namespace RotationSolver.Basic.Rotations;
@@ -137,7 +137,9 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
///
///
///
- public static IBaseAction Reprisal { get; } = new RoleAction(ActionID.Reprisal, new JobRole[] { JobRole.Tank });
+ public static IBaseAction Reprisal { get; } = new RoleAction(ActionID.Reprisal, new JobRole[] { JobRole.Tank }) {
+ FilterForHostiles = b => b.Where(tar => !tar.HasStatus(false, (StatusID)1193))
+ };
///
///
From 34481d6a95930eab763498dc0e81c15069820f45 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Tue, 19 Dec 2023 17:21:32 -0500
Subject: [PATCH 03/73] put it in the enum
---
RotationSolver.Basic/Data/StatusID.cs | 5 +++++
RotationSolver.Basic/Rotations/CustomRotation_Actions.cs | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Data/StatusID.cs b/RotationSolver.Basic/Data/StatusID.cs
index 6f12f3ee7..4386416f0 100644
--- a/RotationSolver.Basic/Data/StatusID.cs
+++ b/RotationSolver.Basic/Data/StatusID.cs
@@ -35,6 +35,11 @@ public enum StatusID : ushort
///
Thunder4 = 1210,
+ ///
+ ///
+ ///
+ Reprisal = 1193,
+
///
///
///
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
index 0503f56f2..423026044 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
@@ -138,7 +138,7 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
///
///
public static IBaseAction Reprisal { get; } = new RoleAction(ActionID.Reprisal, new JobRole[] { JobRole.Tank }) {
- FilterForHostiles = b => b.Where(tar => !tar.HasStatus(false, (StatusID)1193))
+ FilterForHostiles = b => b.Where(tar => !tar.HasStatus(false, StatusID.Reprisal))
};
///
From 5c7bbab6e39239651c6750f0c0f6f6e586efd09a Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sun, 17 Dec 2023 22:22:04 -0500
Subject: [PATCH 04/73] fix aoeCount in manual mode
---
RotationSolver.Basic/Actions/BaseAction_Target.cs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/RotationSolver.Basic/Actions/BaseAction_Target.cs b/RotationSolver.Basic/Actions/BaseAction_Target.cs
index 4cc9488ee..86c92a74e 100644
--- a/RotationSolver.Basic/Actions/BaseAction_Target.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_Target.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Objects.SubKinds;
+using Dalamud.Logging;
using ECommons.DalamudServices;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
@@ -107,7 +108,8 @@ internal static bool TankBreakOtherCheck(Job id)
///
public bool FindTarget(bool mustUse, byte aoeCount, out BattleChara target, out BattleChara[] affectedTargets)
{
- aoeCount = Math.Max(aoeCount, mustUse ? (byte)1 : AOECount);
+ if (aoeCount == 0)
+ aoeCount = mustUse ? (byte)1 : AOECount;
Position = Player.Object.Position;
var player = Player.Object;
@@ -442,7 +444,7 @@ private bool TargetHostileManual(BattleChara b, bool mustUse, int aoeCount, out
if (!CanUseTo(b)) return false;
if (ChoiceTarget(TargetFilterFuncEot(new BattleChara[] { b }, mustUse), mustUse) == null) return false;
- if (IsSingleTarget)
+ if (IsSingleTarget || aoeCount == 1)
{
if (!mustUse)
{
From d6552d655310b9811269dc05b40fca295d48d5d6 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sun, 17 Dec 2023 22:25:06 -0500
Subject: [PATCH 05/73] BLU: preserve aoe count
---
RotationSolver.Basic/Rotations/Basic/BLU_Base.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs b/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
index a5a1cc80d..8f0971ef1 100644
--- a/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
@@ -185,7 +185,7 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
act = null;
if (!OnSlot) return false;
- return base.CanUse(out act, option | CanUseOption.IgnoreClippingCheck, gcdCountForAbility);
+ return base.CanUse(out act, option | CanUseOption.IgnoreClippingCheck, aoeCount, gcdCountForAbility);
}
}
From ebde0a7dfe35b7df0634509e212a044e51efefa0 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Wed, 20 Dec 2023 09:25:59 -0500
Subject: [PATCH 06/73] oops
---
RotationSolver.Basic/Actions/BaseAction_Target.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/RotationSolver.Basic/Actions/BaseAction_Target.cs b/RotationSolver.Basic/Actions/BaseAction_Target.cs
index 86c92a74e..d0045a508 100644
--- a/RotationSolver.Basic/Actions/BaseAction_Target.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_Target.cs
@@ -1,5 +1,4 @@
using Dalamud.Game.ClientState.Objects.SubKinds;
-using Dalamud.Logging;
using ECommons.DalamudServices;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
From 9468b93d070374c2d7cf780a155f159875ce0a28 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Thu, 21 Dec 2023 13:43:59 -0500
Subject: [PATCH 07/73] instance specific invuln checks
---
RotationSolver/Updaters/TargetUpdater.cs | 27 ++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 81ccc99c5..9e6b731c1 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -4,6 +4,7 @@
using ECommons.ExcelServices;
using ECommons.GameFunctions;
using ECommons.GameHelpers;
+using ECommons.MathHelpers;
using FFXIVClientStructs.FFXIV.Client.UI;
using Lumina.Excel.GeneratedSheets;
using RotationSolver.Basic.Configuration;
@@ -170,6 +171,8 @@ private static IEnumerable GetHostileTargets(IEnumerable names = Array.Empty();
if (OtherConfiguration.NoHostileNames.TryGetValue(Svc.ClientState.TerritoryType, out var ns1))
names = names.Union(ns1);
@@ -521,4 +524,28 @@ private static void UpdateNamePlate(IEnumerable allTargets)
}
DataCenter.TreasureCharas = charas.ToArray();
}
+
+ // status checks that can't easily be represented in config
+ private static bool CheckTargetableOther(BattleChara b) {
+ // Labyrinth of the Ancients
+ if (Svc.ClientState.TerritoryType == 174 && b.Name.ToString() == "Thanatos") {
+ // thanatos can only be damaged by players with Astral Realignment (398)
+ return Player.Status.Any(s => s.StatusId == 398);
+ // TODO: Allagan Bomb is also invulnerable until everything else is dead, but that's harder to check
+ }
+
+ // The Puppets' Bunker
+ if (Svc.ClientState.TerritoryType == 917) {
+ // second boss has one of three buffs corresponding to an alliance letter
+ // player needs the matching buff
+ var minibossBuff = b.StatusList.Where(x => x.StatusId == 2409 || x.StatusId == 2410 || x.StatusId == 2411).FirstOrDefault();
+ // 2288 -> 2409
+ // 2289 -> 2410
+ // 2290 -> 2411
+ if (minibossBuff != null)
+ return Player.Status.Any(s => s.StatusId == minibossBuff.StatusId - 121);
+ }
+
+ return true;
+ }
}
From 9154ba12b25ec0b15a7e2bbedf3df06a5d2fa5b9 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Thu, 21 Dec 2023 14:52:25 -0500
Subject: [PATCH 08/73] i love variables
---
RotationSolver/Updaters/TargetUpdater.cs | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 9e6b731c1..b0900cd4c 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -538,12 +538,14 @@ private static bool CheckTargetableOther(BattleChara b) {
if (Svc.ClientState.TerritoryType == 917) {
// second boss has one of three buffs corresponding to an alliance letter
// player needs the matching buff
- var minibossBuff = b.StatusList.Where(x => x.StatusId == 2409 || x.StatusId == 2410 || x.StatusId == 2411).FirstOrDefault();
- // 2288 -> 2409
- // 2289 -> 2410
- // 2290 -> 2411
- if (minibossBuff != null)
- return Player.Status.Any(s => s.StatusId == minibossBuff.StatusId - 121);
+ var minibossBuff = b.StatusList.FirstOrDefault(x => x.StatusId == 2409 || x.StatusId == 2410 || x.StatusId == 2411);
+ if (minibossBuff != null) {
+ // 2288 -> 2409
+ // 2289 -> 2410
+ // 2290 -> 2411
+ var playerBuff = minibossBuff.StatusId - 121;
+ return Player.Status.Any(s => s.StatusId == playerBuff);
+ }
}
return true;
From fa61ec4472ee5c73096e0bffbdff45669c7eea4f Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Thu, 21 Dec 2023 14:54:03 -0500
Subject: [PATCH 09/73] remove using
---
RotationSolver/Updaters/TargetUpdater.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index b0900cd4c..6d91e34fa 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -4,7 +4,6 @@
using ECommons.ExcelServices;
using ECommons.GameFunctions;
using ECommons.GameHelpers;
-using ECommons.MathHelpers;
using FFXIVClientStructs.FFXIV.Client.UI;
using Lumina.Excel.GeneratedSheets;
using RotationSolver.Basic.Configuration;
From b33148d80d6c6c022819e218f79b661e289c9625 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Thu, 21 Dec 2023 15:12:10 -0500
Subject: [PATCH 10/73] wtf i love c# now
---
RotationSolver/Updaters/TargetUpdater.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 6d91e34fa..63bcd2139 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -537,7 +537,7 @@ private static bool CheckTargetableOther(BattleChara b) {
if (Svc.ClientState.TerritoryType == 917) {
// second boss has one of three buffs corresponding to an alliance letter
// player needs the matching buff
- var minibossBuff = b.StatusList.FirstOrDefault(x => x.StatusId == 2409 || x.StatusId == 2410 || x.StatusId == 2411);
+ var minibossBuff = b.StatusList.FirstOrDefault(x => x.StatusId is 2409 or 2410 or 2411);
if (minibossBuff != null) {
// 2288 -> 2409
// 2289 -> 2410
From 8858ec3545431d2d4f22bc3876afe167b58b8d33 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Thu, 21 Dec 2023 18:26:29 -0500
Subject: [PATCH 11/73] refactor 1
---
RotationSolver.Basic/DataCenter.cs | 8 +++
.../Rotations/CustomRotation_Ability.cs | 51 ++++++++++++++-----
.../Rotations/CustomRotation_GCD.cs | 41 ++++++++++++---
.../Rotations/CustomRotation_Invoke.cs | 32 ++++++------
RotationSolver/Updaters/TargetUpdater.cs | 8 ++-
5 files changed, 102 insertions(+), 38 deletions(-)
diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs
index c7c2f21ce..9d96c87e1 100644
--- a/RotationSolver.Basic/DataCenter.cs
+++ b/RotationSolver.Basic/DataCenter.cs
@@ -296,6 +296,14 @@ public static void SetSpecialType(SpecialCommandType specialType)
() => (Service.Config.GetValue(PluginConfigFloat.HostileDelayMin),
Service.Config.GetValue(PluginConfigFloat.HostileDelayMax)));
+ public static ObjectListDelay HostileTargetsCastingAOE { get; } = new ObjectListDelay(
+ () => (Service.Config.GetValue(PluginConfigFloat.HostileDelayMin),
+ Service.Config.GetValue(PluginConfigFloat.HostileDelayMax)));
+
+ public static ObjectListDelay HostileTargetsCastingToTank { get; } = new ObjectListDelay(
+ () => (Service.Config.GetValue(PluginConfigFloat.HostileDelayMin),
+ Service.Config.GetValue(PluginConfigFloat.HostileDelayMax)));
+
public static IEnumerable AllHostileTargets { get; internal set; } = Array.Empty();
public static IEnumerable TarOnMeTargets { get; internal set; } = Array.Empty();
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 75c040783..5cd3dc3c1 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -4,7 +4,7 @@ namespace RotationSolver.Basic.Rotations;
public abstract partial class CustomRotation
{
- private bool Ability(IAction nextGCD, out IAction act, bool helpDefenseAOE, bool helpDefenseSingle)
+ private bool Ability(IAction nextGCD, out IAction act, IEnumerable hostilesCastingAOE, IEnumerable hostilesCastingST)
{
act = DataCenter.CommandNextAction;
@@ -39,7 +39,7 @@ private bool Ability(IAction nextGCD, out IAction act, bool helpDefenseAOE, bool
if (GeneralHealAbility(out act)) return true;
if (DataCenter.IsSpeed && SpeedAbility(out act)) return true;
- if (AutoDefense(role, helpDefenseAOE, helpDefenseSingle, out act)) return true;
+ if (AutoDefense(role, hostilesCastingAOE, hostilesCastingST, out act)) return true;
BaseAction.OtherOption |= CanUseOption.EmptyOrSkipCombo;
if (MovingAbility(out act)) return true;
@@ -138,8 +138,8 @@ private bool GeneralHealAbility(out IAction act)
act = null;
BaseAction.OtherOption |= CanUseOption.MustUse;
- if (DataCenter.IsDefenseArea && DefenseAreaAbility(out act)) return true;
- if (DataCenter.IsDefenseSingle && DefenseSingleAbility(out act)) return true;
+ if (DataCenter.IsDefenseArea && DefenseAreaAbility(out act, Array.Empty())) return true;
+ if (DataCenter.IsDefenseSingle && DefenseSingleAbility(out act, Array.Empty())) return true;
BaseAction.OtherOption &= ~CanUseOption.MustUse;
@@ -169,7 +169,7 @@ private bool GeneralHealAbility(out IAction act)
return false;
}
- private bool AutoDefense(JobRole role, bool helpDefenseAOE, bool helpDefenseSingle, out IAction act)
+ private bool AutoDefense(JobRole role, IEnumerable hostilesCastingAOE, IEnumerable hostilesCastingST, out IAction act)
{
act = null;
if (!InCombat || !HasHostilesInRange)
@@ -191,12 +191,12 @@ private bool AutoDefense(JobRole role, bool helpDefenseAOE, bool helpDefenseSing
//No using defense abilities.
if (!Service.Config.GetValue(PluginConfigBool.UseDefenseAbility)) return false;
- if (helpDefenseAOE)
+ if (hostilesCastingAOE.Any())
{
- if (DefenseAreaAbility(out act)) return true;
+ if (DefenseAreaAbility(out act, hostilesCastingAOE)) return true;
if (role is JobRole.Melee or JobRole.RangedPhysical or JobRole.RangedMagical)
{
- if (DefenseSingleAbility(out act)) return true;
+ if (DefenseSingleAbility(out act, hostilesCastingAOE)) return true;
}
}
@@ -215,18 +215,18 @@ private bool AutoDefense(JobRole role, bool helpDefenseAOE, bool helpDefenseSing
&& Player.GetHealthRatio() <= Service.Config.GetValue(DataCenter.Job, JobConfigFloat.HealthForAutoDefense)
&& movingHere && attacked)
{
- if (DefenseSingleAbility(out act)) return true;
+ if (DefenseSingleAbility(out act, hostilesCastingST)) return true;
if (ArmsLength.CanUse(out act)) return true;
}
//Big damage casting action.
if (DataCenter.IsHostileCastingToTank)
{
- if (DefenseSingleAbility(out act)) return true;
+ if (DefenseSingleAbility(out act, hostilesCastingST)) return true;
}
}
- if (helpDefenseSingle && DefenseSingleAbility(out act)) return true;
+ if (hostilesCastingST.Any() && DefenseSingleAbility(out act, hostilesCastingST)) return true;
return false;
}
@@ -348,9 +348,35 @@ protected virtual bool HealAreaAbility(out IAction act)
/// The ability that defenses single character.
///
/// Result action.
+ /// Hostiles casting single-target actions/tankbusters. May be empty, e.g. during a forced DefenseSingle window.
/// Can we use it.
[RotationDesc(DescType.DefenseSingleAbility)]
+ protected virtual bool DefenseSingleAbility(out IAction act, IEnumerable hostiles)
+ {
+ act = null; return false;
+ }
+
+ ///
+ /// The ability that defenses single character.
+ ///
+ /// Result action.
+ /// Can we use it.
+ [Obsolete("Use DefenseSingleAbility(act, hostiles)")]
+ [RotationDesc(DescType.DefenseSingleAbility)]
protected virtual bool DefenseSingleAbility(out IAction act)
+ {
+ return DefenseSingleAbility(out act, Array.Empty());
+ }
+
+ ///
+ /// The ability that defense area.
+ ///
+ /// Result action.
+ /// Hostiles casting AOE actions. May be empty, e.g. during a forced DefenseArea window.
+ /// Can we use it.
+
+ [RotationDesc(DescType.DefenseAreaAbility)]
+ protected virtual bool DefenseAreaAbility(out IAction act, IEnumerable hostiles)
{
act = null; return false;
}
@@ -361,10 +387,11 @@ protected virtual bool DefenseSingleAbility(out IAction act)
/// Result action.
/// Can we use it.
+ [Obsolete("Use DefenseAreaAbility(act, hostiles)")]
[RotationDesc(DescType.DefenseAreaAbility)]
protected virtual bool DefenseAreaAbility(out IAction act)
{
- act = null; return false;
+ return DefenseAreaAbility(out act, Array.Empty());
}
///
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
index 5446c746a..40f4b20c4 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
@@ -5,7 +5,7 @@ namespace RotationSolver.Basic.Rotations;
public abstract partial class CustomRotation
{
private static DateTime _nextTimeToHeal = DateTime.MinValue;
- private IAction GCD(bool helpDefenseAOE, bool helpDefenseSingle)
+ private IAction GCD(IEnumerable hostilesCastingAOE, IEnumerable hostilesCastingST)
{
IAction act = DataCenter.CommandNextAction;
@@ -49,12 +49,12 @@ private IAction GCD(bool helpDefenseAOE, bool helpDefenseSingle)
BaseAction.AutoHealCheck = false;
}
}
- if (IsDefenseArea && DefenseAreaGCD(out act)) return act;
- if (IsDefenseSingle && DefenseSingleGCD(out act)) return act;
+ if (IsDefenseArea && DefenseAreaGCD(out act, Array.Empty())) return act;
+ if (IsDefenseSingle && DefenseSingleGCD(out act, Array.Empty())) return act;
//Auto Defense
- if (DataCenter.SetAutoStatus(AutoStatus.DefenseArea, helpDefenseAOE) && DefenseAreaGCD(out act)) return act;
- if (DataCenter.SetAutoStatus(AutoStatus.DefenseSingle, helpDefenseSingle) && DefenseSingleGCD(out act)) return act;
+ if (DataCenter.SetAutoStatus(AutoStatus.DefenseArea, hostilesCastingAOE.Any()) && DefenseAreaGCD(out act, hostilesCastingAOE)) return act;
+ if (DataCenter.SetAutoStatus(AutoStatus.DefenseSingle, hostilesCastingST.Any()) && DefenseSingleGCD(out act, hostilesCastingST)) return act;
//Esuna
if (DataCenter.SetAutoStatus(AutoStatus.Esuna, (IsEsunaStanceNorth
@@ -250,28 +250,55 @@ protected virtual bool HealAreaGCD(out IAction act)
/// Defense single gcd.
///
///
+ /// The attacking hostiles.
///
[RotationDesc(DescType.DefenseSingleGCD)]
- protected virtual bool DefenseSingleGCD(out IAction act)
+ protected virtual bool DefenseSingleGCD(out IAction act, IEnumerable hostiles)
{
if (LostStoneskin.CanUse(out act)) return true;
act = null; return false;
}
+ ///
+ /// Defense single gcd.
+ ///
+ ///
+ ///
+ [Obsolete("Use DefenseSingleGCD(act, hostiles)")]
+ [RotationDesc(DescType.DefenseSingleGCD)]
+ protected virtual bool DefenseSingleGCD(out IAction act)
+ {
+ return DefenseSingleGCD(out act, Array.Empty());
+ }
+
+
///
/// Defense area gcd.
///
///
+ /// The attacking hostiles.
///
[RotationDesc(DescType.DefenseAreaGCD)]
- protected virtual bool DefenseAreaGCD(out IAction act)
+ protected virtual bool DefenseAreaGCD(out IAction act, IEnumerable hostiles)
{
if (LostStoneskin2.CanUse(out act)) return true;
act = null; return false;
}
+ ///
+ /// Defense area gcd.
+ ///
+ ///
+ ///
+ [Obsolete("Use DefenseAreaGCD(act, hostiles)")]
+ [RotationDesc(DescType.DefenseAreaGCD)]
+ protected virtual bool DefenseAreaGCD(out IAction act)
+ {
+ return DefenseAreaGCD(out act, Array.Empty());
+ }
+
///
/// General GCD.
///
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs b/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
index 0c59991cd..c07997505 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
@@ -84,9 +84,9 @@ private void UpdateActions(JobRole role)
BaseAction.OtherOption &= ~CanUseOption.IgnoreClippingCheck;
}
- ActionDefenseAreaGCD = DefenseAreaGCD(out act) ? act : null;
+ ActionDefenseAreaGCD = DefenseAreaGCD(out act, Array.Empty()) ? act : null;
- ActionDefenseSingleGCD = DefenseSingleGCD(out act) ? act : null;
+ ActionDefenseSingleGCD = DefenseSingleGCD(out act, Array.Empty()) ? act : null;
EsunaStanceNorthGCD = role switch
{
@@ -102,9 +102,9 @@ private void UpdateActions(JobRole role)
BaseAction.OtherOption |= CanUseOption.IgnoreClippingCheck;
- ActionDefenseAreaAbility = DefenseAreaAbility(out act) ? act : null;
+ ActionDefenseAreaAbility = DefenseAreaAbility(out act, Array.Empty()) ? act : null;
- ActionDefenseSingleAbility = DefenseSingleAbility(out act) ? act : null;
+ ActionDefenseSingleAbility = DefenseSingleAbility(out act, Array.Empty()) ? act : null;
EsunaStanceNorthAbility = role switch
{
@@ -175,23 +175,21 @@ private IAction Invoke(out IAction gcdAction)
return CountDownAction(countDown);
}
- var helpDefenseAOE = Service.Config.GetValue(Configuration.PluginConfigBool.UseDefenseAbility) && DataCenter.IsHostileCastingAOE;
+ var hostilesCastingAOE = Service.Config.GetValue(Configuration.PluginConfigBool.UseDefenseAbility)
+ ? DataCenter.HostileTargetsCastingAOE.AsEnumerable()
+ : Array.Empty();
- bool helpDefenseSingle = false;
+ IEnumerable hostilesCastingST = null;
if (ClassJob.GetJobRole() == JobRole.Healer || ClassJob.RowId == (uint)ECommons.ExcelServices.Job.PLD)
{
- if (DataCenter.PartyTanks.Any((tank) =>
- {
- var attackingTankObj = DataCenter.HostileTargets.Where(t => t.TargetObjectId == tank.ObjectId);
-
- if (attackingTankObj.Count() != 1) return false;
-
- return DataCenter.IsHostileCastingToTank;
- })) helpDefenseSingle = true;
+ hostilesCastingST = DataCenter.HostileTargetsCastingToTank.IntersectBy(
+ DataCenter.PartyTanks.Select(t => (ulong)t.ObjectId),
+ t => t.TargetObjectId
+ );
}
BaseAction.OtherOption = CanUseOption.IgnoreClippingCheck;
- gcdAction = GCD(helpDefenseAOE, helpDefenseSingle);
+ gcdAction = GCD(hostilesCastingAOE, hostilesCastingST);
BaseAction.OtherOption = CanUseOption.None;
if (gcdAction != null)
@@ -199,14 +197,14 @@ private IAction Invoke(out IAction gcdAction)
if (DataCenter.NextAbilityToNextGCD < DataCenter.MinAnimationLock + DataCenter.Ping
|| DataCenter.WeaponTotal < DataCenter.CastingTotal) return gcdAction;
- if (Ability(gcdAction, out IAction ability, helpDefenseAOE, helpDefenseSingle)) return ability;
+ if (Ability(gcdAction, out IAction ability, hostilesCastingAOE, hostilesCastingST)) return ability;
return gcdAction;
}
else
{
BaseAction.OtherOption = CanUseOption.IgnoreClippingCheck;
- if (Ability(Addle, out IAction ability, helpDefenseAOE, helpDefenseSingle)) return ability;
+ if (Ability(Addle, out IAction ability, hostilesCastingAOE, hostilesCastingST)) return ability;
BaseAction.OtherOption = CanUseOption.None;
return null;
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 81ccc99c5..a36425410 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -61,6 +61,7 @@ internal static void ClearTarget()
DataCenter.DeathPeopleParty.Delay(empty);
DataCenter.WeakenPeople.Delay(empty);
DataCenter.HostileTargets.Delay(empty);
+ DataCenter.HostileTargetsCastingAOE.Delay(empty);
DataCenter.CanInterruptTargets.Delay(empty);
}
@@ -155,8 +156,11 @@ private unsafe static void UpdateHostileTargets(IEnumerable allTarg
DataCenter.MobsTime = DataCenter.HostileTargets.Count(o => o.DistanceToPlayer() <= JobRange && o.CanSee())
>= Service.Config.GetValue(PluginConfigInt.AutoDefenseNumber);
- DataCenter.IsHostileCastingToTank = IsCastingTankVfx() || DataCenter.HostileTargets.Any(IsHostileCastingTank);
- DataCenter.IsHostileCastingAOE = IsCastingAreaVfx() || DataCenter.HostileTargets.Any(IsHostileCastingArea);
+ DataCenter.HostileTargetsCastingToTank.Delay(DataCenter.HostileTargets.Where(IsHostileCastingTank));
+ DataCenter.HostileTargetsCastingAOE.Delay(DataCenter.HostileTargets.Where(IsHostileCastingArea));
+
+ DataCenter.IsHostileCastingToTank = IsCastingTankVfx() || DataCenter.HostileTargetsCastingToTank.Any();
+ DataCenter.IsHostileCastingAOE = IsCastingAreaVfx() || DataCenter.HostileTargetsCastingAOE.Any();
DataCenter.CanProvoke = _provokeDelay.Delay(TargetFilter.ProvokeTarget(DataCenter.HostileTargets, true).Count() != DataCenter.HostileTargets.Count());
}
From 5dd2010257e73c76786118c80fd584aeaa27ac8e Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Thu, 21 Dec 2023 18:38:57 -0500
Subject: [PATCH 12/73] forgot 1 update
---
RotationSolver/Updaters/TargetUpdater.cs | 1 +
1 file changed, 1 insertion(+)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index a36425410..16c47bf93 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -62,6 +62,7 @@ internal static void ClearTarget()
DataCenter.WeakenPeople.Delay(empty);
DataCenter.HostileTargets.Delay(empty);
DataCenter.HostileTargetsCastingAOE.Delay(empty);
+ DataCenter.HostileTargetsCastingToTank.Delay(empty);
DataCenter.CanInterruptTargets.Delay(empty);
}
From 47c0ba0f439b18ef6bc45286b5652aaf8f07b811 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Thu, 21 Dec 2023 18:42:16 -0500
Subject: [PATCH 13/73] shouldnt use that there
---
RotationSolver.Basic/Rotations/CustomRotation_Ability.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 5cd3dc3c1..0dcbf88da 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -215,7 +215,7 @@ private bool AutoDefense(JobRole role, IEnumerable hostilesCastingA
&& Player.GetHealthRatio() <= Service.Config.GetValue(DataCenter.Job, JobConfigFloat.HealthForAutoDefense)
&& movingHere && attacked)
{
- if (DefenseSingleAbility(out act, hostilesCastingST)) return true;
+ if (DefenseSingleAbility(out act, Array.Empty())) return true;
if (ArmsLength.CanUse(out act)) return true;
}
From ecce60d462cce795a1af2c9269940c16ab0ccd93 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Fri, 22 Dec 2023 15:17:33 -0500
Subject: [PATCH 14/73] it typechecks
---
RotationSolver.Basic/Configuration/Configs.cs | 7 ++
.../Configuration/OtherConfiguration.cs | 5 +-
RotationSolver.Basic/Data/ActionID.cs | 24 +++-
RotationSolver.Basic/Data/StatusID.cs | 24 +++-
.../Rotations/CustomRotation_Ability.cs | 1 +
.../Rotations/CustomRotation_Actions.cs | 116 ++++++++++++++----
.../Rotations/CustomRotation_GCD.cs | 10 +-
.../UI/RotationConfigWindow_Config.cs | 8 ++
8 files changed, 158 insertions(+), 37 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 395d4e029..34a62b062 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -357,6 +357,12 @@ public enum PluginConfigBool : byte
[Default(false)] TargetAllForFriendly,
[Default(false)] ShowCooldownWindow,
+ [Default(true)] UseLostActions,
+ [Default(true)] UseLostFlareStarOnBosses,
+ [Default(false)] UseLostFlareStarOnMobs,
+ [Default(true)] UseLostAssassinationOnMobs,
+ [Default(true)] LostReflectAutoRefresh,
+
[Default(true)] RecordCastingArea,
[Default(true)] AutoOffAfterCombat,
@@ -443,6 +449,7 @@ public enum PluginConfigFloat : byte
[Default(24f, 0f, 90f), Unit(ConfigUnitType.Degree)] MoveTargetAngle,
[Default(90f, 10f, 1800f), Unit(ConfigUnitType.Seconds)] BossTimeToKill,
[Default(10f, 0f, 60f), Unit(ConfigUnitType.Seconds)] DyingTimeToKill,
+ [Default(15f, 0f, 1800f), Unit(ConfigUnitType.Seconds)] LostAssassinationTimeToKill,
[Default(16f, 9.6f, 96f), Unit(ConfigUnitType.Pixels)] CooldownFontSize,
diff --git a/RotationSolver.Basic/Configuration/OtherConfiguration.cs b/RotationSolver.Basic/Configuration/OtherConfiguration.cs
index baa9773a6..dac050568 100644
--- a/RotationSolver.Basic/Configuration/OtherConfiguration.cs
+++ b/RotationSolver.Basic/Configuration/OtherConfiguration.cs
@@ -48,6 +48,9 @@ public class OtherConfiguration
{ (uint) ActionID.SteelCyclone, 2},
{ (uint) ActionID.VariantSpiritDart, 1 },
{ (uint) ActionID.VariantSpiritDart2, 1 },
+ { (uint) ActionID.LostRampage, 1 },
+ { (uint) ActionID.LostBurst, 1 },
+ { (uint) ActionID.LostFlarestar, 1 }
};
public static Dictionary ActionTTK = new()
@@ -259,4 +262,4 @@ private static void InitOne(ref T value, string name, bool download = true)
}
}
#pragma warning restore CA2211
-#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
\ No newline at end of file
+#pragma warning restore CS1591 // Missing XML comment for publicly visible type or member
diff --git a/RotationSolver.Basic/Data/ActionID.cs b/RotationSolver.Basic/Data/ActionID.cs
index 8dd72c2b2..48c2b80a4 100644
--- a/RotationSolver.Basic/Data/ActionID.cs
+++ b/RotationSolver.Basic/Data/ActionID.cs
@@ -5208,6 +5208,21 @@ public enum ActionID : uint
///
LostBurst = 23909,
+ ///
+ ///
+ ///
+ LostProtect = 20719,
+
+ ///
+ ///
+ ///
+ LostShell = 20710,
+
+ ///
+ ///
+ ///
+ LostReflect = 20711,
+
///
///
///
@@ -5216,12 +5231,17 @@ public enum ActionID : uint
///
///
///
- LostProtect = 20719,
+ LostFontOfPower = 20717,
///
///
///
- LostShell = 20710,
+ BannerOfHonoredSacrifice = 20721,
+
+ ///
+ ///
+ ///
+ LostAssassination = 23914,
///
///
diff --git a/RotationSolver.Basic/Data/StatusID.cs b/RotationSolver.Basic/Data/StatusID.cs
index 6f12f3ee7..2d8899d70 100644
--- a/RotationSolver.Basic/Data/StatusID.cs
+++ b/RotationSolver.Basic/Data/StatusID.cs
@@ -1336,23 +1336,43 @@ public enum StatusID : ushort
///
///
///
- LostSpellforge = 2338,
+ SpiritOfTheBeast = 2324,
///
///
///
- MagicalAversion = 2370,
+ BannerOfHonoredSacrifice = 2327,
+
+ ///
+ ///
+ ///
+ LostReflect = 2337,
+
+ ///
+ ///
+ ///
+ LostSpellforge = 2338,
///
///
///
LostSteelsting = 2339,
+ ///
+ ///
+ ///
+ LostFontOfPower = 2346,
+
///
///
///
PhysicalAversion = 2369,
+ ///
+ ///
+ ///
+ MagicalAversion = 2370,
+
///
///
///
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 75c040783..afbb56b45 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -406,6 +406,7 @@ protected virtual bool AttackAbility(out IAction act)
if (VariantSpiritDart2.CanUse(out act, CanUseOption.MustUse)) return true;
if (VariantRampart.CanUse(out act)) return true;
if (VariantRampart2.CanUse(out act)) return true;
+ if (LostAssassination.CanUse(out act)) return true;
return false;
}
}
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
index 7fe995a0c..dbf7fdb82 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
@@ -1,5 +1,6 @@
using ECommons.ExcelServices;
using RotationSolver.Basic.Traits;
+using RotationSolver.Basic.Configuration;
namespace RotationSolver.Basic.Rotations;
@@ -98,7 +99,7 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
public static IBaseAction SecondWind { get; } = new RoleAction(ActionID.SecondWind,
new JobRole[] { JobRole.RangedPhysical, JobRole.Melee }, ActionOption.Heal)
{
- ActionCheck = (b, m) => Player?.GetHealthRatio() < Service.Config.GetValue(DataCenter.Job, Configuration.JobConfigFloat.HealthSingleAbility) && InCombat,
+ ActionCheck = (b, m) => Player?.GetHealthRatio() < Service.Config.GetValue(DataCenter.Job, JobConfigFloat.HealthSingleAbility) && InCombat,
};
///
@@ -390,8 +391,8 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
public static IBaseAction LostSpellforge { get; } = new BaseAction(ActionID.LostSpellforge,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostSpellforge },
- ActionCheck = (b, m) => LostSpellforge.Target?.HasStatus(false, StatusID.MagicalAversion) ?? false,
+ TargetStatus = new StatusID[] { StatusID.LostSpellforge },
+ // TargetStatusIsGlobal = true,
ChoiceTarget = (targets, mustUse) => targets.FirstOrDefault(t => (Job)t.ClassJob.Id switch
{
Job.WAR
@@ -419,8 +420,8 @@ or Job.RDM
public static IBaseAction LostSteelsting { get; } = new BaseAction(ActionID.LostSteelsting,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostSteelsting },
- ActionCheck = (b, m) => LostSteelsting.Target?.HasStatus(false, StatusID.PhysicalAversion) ?? false,
+ TargetStatus = new StatusID[] { StatusID.LostSteelsting },
+ // TargetStatusIsGlobal = true,
ChoiceTarget = (targets, mustUse) => targets.FirstOrDefault(t => (Job)t.ClassJob.Id switch
{
Job.WHM
@@ -444,21 +445,53 @@ or Job.RDM
///
///
///
- public static IBaseAction LostRampage { get; } = new BaseAction(ActionID.LostRampage,
- ActionOption.DutyAction | ActionOption.Friendly)
- {
- StatusProvide = new StatusID[] { StatusID.LostRampage },
- ActionCheck = (b, m) => LostRampage.Target?.HasStatus(false, StatusID.PhysicalAversion) ?? false,
+ public static IBaseAction LostRampage { get; } = new RoleAction(
+ ActionID.LostRampage,
+ new JobRole[] { JobRole.Melee, JobRole.Tank, JobRole.RangedPhysical },
+ ActionOption.DutyAction
+ ) {
+ TargetStatus = new StatusID[] { StatusID.LostRampage },
+ // TargetStatusIsGlobal = true,
+ FilterForHostiles = (targets) => targets.Where(tar =>
+ ObjectHelper.CanInterrupt(tar) ||
+ (tar.IsBossFromIcon() && tar.HasStatus(false, StatusID.PhysicalAversion)))
};
///
///
///
- public static IBaseAction LostBurst { get; } = new BaseAction(ActionID.LostBurst,
- ActionOption.DutyAction | ActionOption.Friendly)
- {
- StatusProvide = new StatusID[] { StatusID.LostBurst },
- ActionCheck = (b, m) => LostBurst.Target?.HasStatus(false, StatusID.MagicalAversion) ?? false,
+ public static IBaseAction LostBurst { get; } = new RoleAction(
+ ActionID.LostBurst,
+ new JobRole[] { JobRole.Healer, JobRole.RangedMagical },
+ ActionOption.DutyAction
+ ) {
+ TargetStatus = new StatusID[] { StatusID.LostBurst },
+ // TargetStatusIsGlobal = true,
+ FilterForHostiles = (targets) => targets.Where(tar =>
+ ObjectHelper.CanInterrupt(tar) ||
+ (tar.IsBossFromIcon() && tar.HasStatus(false, StatusID.MagicalAversion))),
+ };
+
+ ///
+ ///
+ ///
+ public static IBaseAction LostAssassination { get; } = new RoleAction(
+ ActionID.LostAssassination,
+ new JobRole[] { JobRole.Melee, JobRole.Tank, JobRole.RangedPhysical },
+ ActionOption.DutyAction
+ ) {
+ ActionCheck = (tar, mustUse) => {
+ if (tar.IsBossFromIcon()) {
+ // use for Lost Font of Power on bosses
+ return Player.HasStatus(true, StatusID.SpiritOfTheBeast) && !tar.IsDying();
+ } else if (Service.Config.GetValue(PluginConfigBool.UseLostAssassinationOnMobs)) {
+ // use to instakill tanky mobs
+ var ttk = Service.Config.GetValue(PluginConfigFloat.LostAssassinationTimeToKill);
+ return tar.FindEnemyPositional() == EnemyPositional.Rear && tar.GetTimeToKill(true) >= ttk;
+ }
+
+ return false;
+ }
};
///
@@ -467,7 +500,8 @@ or Job.RDM
public static IBaseAction LostBravery { get; } = new BaseAction(ActionID.LostBravery,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostBravery },
+ TargetStatus = new StatusID[] { StatusID.LostBravery },
+ // TargetStatusIsGlobal = true,
};
///
@@ -476,7 +510,8 @@ or Job.RDM
public static IBaseAction LostProtect { get; } = new BaseAction(ActionID.LostProtect,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostProtect, StatusID.LostProtect2 },
+ TargetStatus = new StatusID[] { StatusID.LostProtect, StatusID.LostProtect2 },
+ // TargetStatusIsGlobal = true,
};
///
@@ -485,7 +520,8 @@ or Job.RDM
public static IBaseAction LostShell { get; } = new BaseAction(ActionID.LostShell,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostShell, StatusID.LostShell2 },
+ TargetStatus = new StatusID[] { StatusID.LostShell, StatusID.LostShell2 },
+ // TargetStatusIsGlobal = true,
};
///
@@ -494,7 +530,8 @@ or Job.RDM
public static IBaseAction LostProtect2 { get; } = new BaseAction(ActionID.LostProtect2,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostProtect2 },
+ TargetStatus = new StatusID[] { StatusID.LostProtect2 },
+ // TargetStatusIsGlobal = true,
};
///
@@ -503,7 +540,8 @@ or Job.RDM
public static IBaseAction LostShell2 { get; } = new BaseAction(ActionID.LostShell2,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostShell2 },
+ TargetStatus = new StatusID[] { StatusID.LostShell2 },
+ // TargetStatusIsGlobal = true,
};
///
@@ -512,7 +550,8 @@ or Job.RDM
public static IBaseAction LostBubble { get; } = new BaseAction(ActionID.LostBubble,
ActionOption.DutyAction | ActionOption.Friendly)
{
- StatusProvide = new StatusID[] { StatusID.LostBubble },
+ TargetStatus = new StatusID[] { StatusID.LostBubble },
+ // TargetStatusIsGlobal = true,
};
///
@@ -522,7 +561,8 @@ or Job.RDM
ActionOption.DutyAction | ActionOption.Defense)
{
ChoiceTarget = TargetFilter.FindAttackedTarget,
- StatusProvide = new StatusID[] { StatusID.LostStoneskin },
+ TargetStatus = new StatusID[] { StatusID.LostStoneskin },
+ // TargetStatusIsGlobal = true,
};
///
@@ -540,7 +580,21 @@ or Job.RDM
public static IBaseAction LostFlarestar { get; } = new BaseAction(ActionID.LostFlarestar,
ActionOption.DutyAction)
{
- StatusProvide = new StatusID[] { StatusID.LostFlarestar },
+ FilterForHostiles = (tars) => tars.Where(t =>
+ Service.Config.GetValue(PluginConfigBool.UseLostFlareStarOnMobs) ||
+ (t.IsBossFromIcon() && Service.Config.GetValue(PluginConfigBool.UseLostFlareStarOnBosses))),
+ TargetStatus = new StatusID[] { StatusID.LostFlarestar },
+ // TargetStatusIsGlobal = true,
+ };
+
+ ///
+ ///
+ ///
+ public static IBaseAction LostReflect { get; } = new BaseAction(ActionID.LostReflect, ActionOption.DutyAction | ActionOption.Friendly) {
+ ChoiceTarget = (tars, mustUse) => tars.FirstOrDefault(b =>
+ Service.Config.GetValue(PluginConfigBool.LostReflectAutoRefresh) &&
+ b.HasStatus(true, StatusID.LostReflect) &&
+ b.WillStatusEndGCD(1, 0, true, StatusID.LostReflect))
};
///
@@ -549,7 +603,21 @@ or Job.RDM
public static IBaseAction LostSeraphStrike { get; } = new BaseAction(ActionID.LostSeraphStrike,
ActionOption.DutyAction)
{
- StatusProvide = new StatusID[] { StatusID.LostSeraphStrike },
+ TargetStatus = new StatusID[] { StatusID.LostSeraphStrike },
+ };
+
+ ///
+ ///
+ ///
+ public static IBaseAction LostFontOfPower { get; } = new BaseAction(ActionID.LostFontOfPower, ActionOption.DutyAction) {
+ StatusProvide = new StatusID[] { StatusID.LostFontOfPower },
+ };
+
+ ///
+ ///
+ ///
+ public static IBaseAction BannerOfHonoredSacrifice { get; } = new BaseAction(ActionID.BannerOfHonoredSacrifice, ActionOption.DutyAction) {
+ StatusProvide = new StatusID[] { StatusID.BannerOfHonoredSacrifice },
};
#endregion
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
index 5446c746a..834732e77 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
@@ -183,22 +183,16 @@ private static bool EsunaAction(out IAction act, CanUseOption option = CanUseOpt
protected virtual bool EmergencyGCD(out IAction act)
{
#region Bozja
- if (LostSpellforge.CanUse(out act)) return true;
- if (LostSteelsting.CanUse(out act)) return true;
+ if (LostFlarestar.CanUse(out act)) return true;
if (LostRampage.CanUse(out act)) return true;
if (LostBurst.CanUse(out act)) return true;
-
+ if (LostReflect.CanUse(out act)) return true;
if (LostBravery.CanUse(out act)) return true;
if (LostBubble.CanUse(out act)) return true;
if (LostShell2.CanUse(out act)) return true;
if (LostShell.CanUse(out act)) return true;
if (LostProtect2.CanUse(out act)) return true;
if (LostProtect.CanUse(out act)) return true;
-
- //Add your own logic here.
- //if (LostFlarestar.CanUse(out act)) return true;
- //if (LostSeraphStrike.CanUse(out act)) return true;
-
#endregion
#region PvP
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index 6484d00d0..b03be2607 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -834,6 +834,14 @@ private static void DrawAutoActionCondition()
new CheckBoxSearchPlugin(PluginConfigBool.AutoSpeedOutOfCombat),
}),
+
+ new CheckBoxSearchPlugin(PluginConfigBool.UseLostActions, new ISearchable[] {
+ new CheckBoxSearchPlugin(PluginConfigBool.UseLostFlareStarOnBosses),
+ new CheckBoxSearchPlugin(PluginConfigBool.UseLostFlareStarOnMobs),
+ new CheckBoxSearchPlugin(PluginConfigBool.UseLostAssassinationOnMobs,
+ new DragFloatSearchPlugin(PluginConfigFloat.LostAssassinationTimeToKill, 0.5f)),
+ new CheckBoxSearchPlugin(PluginConfigBool.LostReflectAutoRefresh)
+ }),
};
#endregion
From 6e8bfce010b5dfe91b6da1ae00ca72678898e539 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Fri, 22 Dec 2023 15:35:32 -0500
Subject: [PATCH 15/73] update config descriptions
---
RotationSolver/Localization/ConfigTranslation.cs | 6 ++++++
RotationSolver/Localization/Strings.cs | 8 +++++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 64f18fec2..8f43f190b 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -118,6 +118,11 @@ internal static class ConfigTranslation
PluginConfigBool.HealWhenNothingTodo => LocalizationManager.RightLang.ConfigWindow_Param_HealWhenNothingTodo,
PluginConfigBool.UseResourcesAction => LocalizationManager.RightLang.ConfigWindow_Auto_UseResourcesAction,
PluginConfigBool.OnlyHealSelfWhenNoHealer => LocalizationManager.RightLang.ConfigWindow_Auto_OnlyHealSelfWhenNoHealer,
+ PluginConfigBool.UseLostActions => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostActions,
+ PluginConfigBool.UseLostFlareStarOnBosses => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostFlareStarOnBosses,
+ PluginConfigBool.UseLostFlareStarOnMobs => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostFlareStarOnMobs,
+ PluginConfigBool.UseLostAssassinationOnMobs => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostAssassinationOnMobs,
+ PluginConfigBool.LostReflectAutoRefresh => LocalizationManager.RightLang.ConfigWindow_Auto_LostReflectAutoRefresh,
// target
PluginConfigBool.AddEnemyListToHostile => LocalizationManager.RightLang.ConfigWindow_Param_AddEnemyListToHostile,
@@ -204,6 +209,7 @@ internal static class ConfigTranslation
PluginConfigFloat.AutoHealTimeToKill => LocalizationManager.RightLang.ConfigWindow_Auto_AutoHealTimeToKill,
PluginConfigFloat.ProvokeDelayMin => LocalizationManager.RightLang.ConfigWindow_Auto_ProvokeDelay,
PluginConfigFloat.HealthForGuard => LocalizationManager.RightLang.ConfigWindow_Param_HealthForGuard,
+ PluginConfigFloat.LostAssassinationTimeToKill => LocalizationManager.RightLang.ConfigWindow_Auto_LostAssassinationTimeToKill,
// target
PluginConfigFloat.BossTimeToKill => LocalizationManager.RightLang.ConfigWindow_Param_BossTimeToKill,
PluginConfigFloat.DyingTimeToKill => LocalizationManager.RightLang.ConfigWindow_Param_DyingTimeToKill,
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index 15b7436ef..00fa5569a 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -792,6 +792,12 @@ internal class Strings
public string ConfigWindow_Auto_UseResourcesAction { get; set; } = "Use actions that use resources";
public string ConfigWindow_Auto_OnlyHealSelfWhenNoHealer { get; set; } = "Only Heal self When Not a healer";
+ public string ConfigWindow_Auto_UseLostActions { get; set; } = "Use Lost Actions (Bozja)";
+ public string ConfigWindow_Auto_UseLostFlareStarOnBosses { get; set; } = "Use Lost Flare Star on bosses";
+ public string ConfigWindow_Auto_UseLostFlareStarOnMobs { get; set; } = "Use Lost Flare Star on mobs";
+ public string ConfigWindow_Auto_UseLostAssassinationOnMobs { get; set; } = "Use Lost Assassination to kill non-boss targets";
+ public string ConfigWindow_Auto_LostReflectAutoRefresh { get; set; } = "Automatically refresh Lost Reflect before it expires";
+ public string ConfigWindow_Auto_LostAssassinationTimeToKill { get; set; } = "Expected TTK required to use Lost Assassination on target";
public string ConfigWindow_Auto_HealthForAutoDefense { get; set; } = "HP Ratio about defense single of Tanks";
public string ConfigWindow_Basic_SayHelloToUsers { get; set; } = "Say hello to the users of Rotation Solver.";
@@ -838,4 +844,4 @@ internal class Strings
public string ConfigWindow_Condition_DutyName { get; set; } = "Duty Name";
public string ConfigWindow_Condition_TargetWarning { get; set; } = "You'd better not use it. Because this target isn't the action's target. Try to pick it from action.";
-}
\ No newline at end of file
+}
From 2119a770db056320b97ac0204099faaaed5336f0 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Fri, 22 Dec 2023 15:44:54 -0500
Subject: [PATCH 16/73] move conditional
---
RotationSolver.Basic/Rotations/CustomRotation_Actions.cs | 5 ++---
RotationSolver.Basic/Rotations/CustomRotation_GCD.cs | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
index dbf7fdb82..64fb4ef3d 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
@@ -592,9 +592,8 @@ or Job.RDM
///
public static IBaseAction LostReflect { get; } = new BaseAction(ActionID.LostReflect, ActionOption.DutyAction | ActionOption.Friendly) {
ChoiceTarget = (tars, mustUse) => tars.FirstOrDefault(b =>
- Service.Config.GetValue(PluginConfigBool.LostReflectAutoRefresh) &&
- b.HasStatus(true, StatusID.LostReflect) &&
- b.WillStatusEndGCD(1, 0, true, StatusID.LostReflect))
+ b.HasStatus(true, StatusID.LostReflect) &&
+ b.WillStatusEndGCD(1, 0, true, StatusID.LostReflect))
};
///
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
index 834732e77..83a5280f6 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
@@ -186,7 +186,7 @@ protected virtual bool EmergencyGCD(out IAction act)
if (LostFlarestar.CanUse(out act)) return true;
if (LostRampage.CanUse(out act)) return true;
if (LostBurst.CanUse(out act)) return true;
- if (LostReflect.CanUse(out act)) return true;
+ if (Service.Config.GetValue(PluginConfigBool.LostReflectAutoRefresh) && LostReflect.CanUse(out act)) return true;
if (LostBravery.CanUse(out act)) return true;
if (LostBubble.CanUse(out act)) return true;
if (LostShell2.CanUse(out act)) return true;
From 257eaadd6d71a14586901f843d76320f47460dbf Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Fri, 22 Dec 2023 15:51:24 -0500
Subject: [PATCH 17/73] remove flare star boss option as it is redundant
---
RotationSolver.Basic/Configuration/Configs.cs | 1 -
RotationSolver.Basic/Rotations/CustomRotation_Actions.cs | 4 +---
RotationSolver/Localization/ConfigTranslation.cs | 1 -
RotationSolver/Localization/Strings.cs | 3 +--
RotationSolver/UI/RotationConfigWindow_Config.cs | 1 -
5 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 34a62b062..c227f0e5c 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -358,7 +358,6 @@ public enum PluginConfigBool : byte
[Default(false)] ShowCooldownWindow,
[Default(true)] UseLostActions,
- [Default(true)] UseLostFlareStarOnBosses,
[Default(false)] UseLostFlareStarOnMobs,
[Default(true)] UseLostAssassinationOnMobs,
[Default(true)] LostReflectAutoRefresh,
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
index 64fb4ef3d..2099dff2a 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
@@ -580,9 +580,7 @@ or Job.RDM
public static IBaseAction LostFlarestar { get; } = new BaseAction(ActionID.LostFlarestar,
ActionOption.DutyAction)
{
- FilterForHostiles = (tars) => tars.Where(t =>
- Service.Config.GetValue(PluginConfigBool.UseLostFlareStarOnMobs) ||
- (t.IsBossFromIcon() && Service.Config.GetValue(PluginConfigBool.UseLostFlareStarOnBosses))),
+ FilterForHostiles = (tars) => tars.Where(t => t.IsBossFromIcon() || Service.Config.GetValue(PluginConfigBool.UseLostFlareStarOnMobs)),
TargetStatus = new StatusID[] { StatusID.LostFlarestar },
// TargetStatusIsGlobal = true,
};
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 8f43f190b..910f08fbf 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -119,7 +119,6 @@ internal static class ConfigTranslation
PluginConfigBool.UseResourcesAction => LocalizationManager.RightLang.ConfigWindow_Auto_UseResourcesAction,
PluginConfigBool.OnlyHealSelfWhenNoHealer => LocalizationManager.RightLang.ConfigWindow_Auto_OnlyHealSelfWhenNoHealer,
PluginConfigBool.UseLostActions => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostActions,
- PluginConfigBool.UseLostFlareStarOnBosses => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostFlareStarOnBosses,
PluginConfigBool.UseLostFlareStarOnMobs => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostFlareStarOnMobs,
PluginConfigBool.UseLostAssassinationOnMobs => LocalizationManager.RightLang.ConfigWindow_Auto_UseLostAssassinationOnMobs,
PluginConfigBool.LostReflectAutoRefresh => LocalizationManager.RightLang.ConfigWindow_Auto_LostReflectAutoRefresh,
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index 00fa5569a..5adb05034 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -793,8 +793,7 @@ internal class Strings
public string ConfigWindow_Auto_UseResourcesAction { get; set; } = "Use actions that use resources";
public string ConfigWindow_Auto_OnlyHealSelfWhenNoHealer { get; set; } = "Only Heal self When Not a healer";
public string ConfigWindow_Auto_UseLostActions { get; set; } = "Use Lost Actions (Bozja)";
- public string ConfigWindow_Auto_UseLostFlareStarOnBosses { get; set; } = "Use Lost Flare Star on bosses";
- public string ConfigWindow_Auto_UseLostFlareStarOnMobs { get; set; } = "Use Lost Flare Star on mobs";
+ public string ConfigWindow_Auto_UseLostFlareStarOnMobs { get; set; } = "Use Lost Flare Star on non-boss targets";
public string ConfigWindow_Auto_UseLostAssassinationOnMobs { get; set; } = "Use Lost Assassination to kill non-boss targets";
public string ConfigWindow_Auto_LostReflectAutoRefresh { get; set; } = "Automatically refresh Lost Reflect before it expires";
public string ConfigWindow_Auto_LostAssassinationTimeToKill { get; set; } = "Expected TTK required to use Lost Assassination on target";
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index b03be2607..ed2369c2d 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -836,7 +836,6 @@ private static void DrawAutoActionCondition()
}),
new CheckBoxSearchPlugin(PluginConfigBool.UseLostActions, new ISearchable[] {
- new CheckBoxSearchPlugin(PluginConfigBool.UseLostFlareStarOnBosses),
new CheckBoxSearchPlugin(PluginConfigBool.UseLostFlareStarOnMobs),
new CheckBoxSearchPlugin(PluginConfigBool.UseLostAssassinationOnMobs,
new DragFloatSearchPlugin(PluginConfigFloat.LostAssassinationTimeToKill, 0.5f)),
From ba7085740863163e7671265ed2b8395c075f31ef Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Fri, 22 Dec 2023 15:54:47 -0500
Subject: [PATCH 18/73] pain
---
RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs b/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
index c07997505..4edb29418 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Invoke.cs
@@ -179,7 +179,7 @@ private IAction Invoke(out IAction gcdAction)
? DataCenter.HostileTargetsCastingAOE.AsEnumerable()
: Array.Empty();
- IEnumerable hostilesCastingST = null;
+ IEnumerable hostilesCastingST = Array.Empty();
if (ClassJob.GetJobRole() == JobRole.Healer || ClassJob.RowId == (uint)ECommons.ExcelServices.Job.PLD)
{
hostilesCastingST = DataCenter.HostileTargetsCastingToTank.IntersectBy(
From 10b9d82cb9513efb0b25fa2f734d9517d95e7a7a Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sat, 23 Dec 2023 12:06:03 -0500
Subject: [PATCH 19/73] i feel silly
---
RotationSolver.Basic/DataCenter.cs | 8 ++-----
.../Rotations/CustomRotation_Ability.cs | 17 +++++++--------
.../Rotations/CustomRotation_GCD.cs | 21 +++++++++----------
RotationSolver/Updaters/TargetUpdater.cs | 9 ++++----
4 files changed, 25 insertions(+), 30 deletions(-)
diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs
index 9d96c87e1..36c5c3e50 100644
--- a/RotationSolver.Basic/DataCenter.cs
+++ b/RotationSolver.Basic/DataCenter.cs
@@ -296,13 +296,9 @@ public static void SetSpecialType(SpecialCommandType specialType)
() => (Service.Config.GetValue(PluginConfigFloat.HostileDelayMin),
Service.Config.GetValue(PluginConfigFloat.HostileDelayMax)));
- public static ObjectListDelay HostileTargetsCastingAOE { get; } = new ObjectListDelay(
- () => (Service.Config.GetValue(PluginConfigFloat.HostileDelayMin),
- Service.Config.GetValue(PluginConfigFloat.HostileDelayMax)));
+ public static IEnumerable HostileTargetsCastingAOE { get; internal set; } = Array.Empty();
- public static ObjectListDelay HostileTargetsCastingToTank { get; } = new ObjectListDelay(
- () => (Service.Config.GetValue(PluginConfigFloat.HostileDelayMin),
- Service.Config.GetValue(PluginConfigFloat.HostileDelayMax)));
+ public static IEnumerable HostileTargetsCastingToTank { get; internal set; } = Array.Empty();
public static IEnumerable AllHostileTargets { get; internal set; } = Array.Empty();
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 0dcbf88da..91610effc 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -1,4 +1,5 @@
-using RotationSolver.Basic.Configuration;
+using Dalamud.Logging;
+using RotationSolver.Basic.Configuration;
namespace RotationSolver.Basic.Rotations;
@@ -348,12 +349,12 @@ protected virtual bool HealAreaAbility(out IAction act)
/// The ability that defenses single character.
///
/// Result action.
- /// Hostiles casting single-target actions/tankbusters. May be empty, e.g. during a forced DefenseSingle window.
+ /// Hostiles casting single-target actions/tankbusters. Empty during a forced DefenseSingle window.
/// Can we use it.
[RotationDesc(DescType.DefenseSingleAbility)]
protected virtual bool DefenseSingleAbility(out IAction act, IEnumerable hostiles)
{
- act = null; return false;
+ return DefenseSingleAbility(out act);
}
///
@@ -361,24 +362,23 @@ protected virtual bool DefenseSingleAbility(out IAction act, IEnumerable
/// Result action.
/// Can we use it.
- [Obsolete("Use DefenseSingleAbility(act, hostiles)")]
[RotationDesc(DescType.DefenseSingleAbility)]
protected virtual bool DefenseSingleAbility(out IAction act)
{
- return DefenseSingleAbility(out act, Array.Empty());
+ act = null; return false;
}
///
/// The ability that defense area.
///
/// Result action.
- /// Hostiles casting AOE actions. May be empty, e.g. during a forced DefenseArea window.
+ /// Hostiles casting AOE actions. Empty during a forced DefenseArea window.
/// Can we use it.
[RotationDesc(DescType.DefenseAreaAbility)]
protected virtual bool DefenseAreaAbility(out IAction act, IEnumerable hostiles)
{
- act = null; return false;
+ return DefenseAreaAbility(out act);
}
///
@@ -387,11 +387,10 @@ protected virtual bool DefenseAreaAbility(out IAction act, IEnumerableResult action.
/// Can we use it.
- [Obsolete("Use DefenseAreaAbility(act, hostiles)")]
[RotationDesc(DescType.DefenseAreaAbility)]
protected virtual bool DefenseAreaAbility(out IAction act)
{
- return DefenseAreaAbility(out act, Array.Empty());
+ act = null; return false;
}
///
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
index 40f4b20c4..09ffc8c21 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
@@ -1,4 +1,5 @@
-using RotationSolver.Basic.Configuration;
+using Dalamud.Logging;
+using RotationSolver.Basic.Configuration;
namespace RotationSolver.Basic.Rotations;
@@ -255,9 +256,7 @@ protected virtual bool HealAreaGCD(out IAction act)
[RotationDesc(DescType.DefenseSingleGCD)]
protected virtual bool DefenseSingleGCD(out IAction act, IEnumerable hostiles)
{
- if (LostStoneskin.CanUse(out act)) return true;
-
- act = null; return false;
+ return DefenseSingleGCD(out act);
}
///
@@ -265,11 +264,12 @@ protected virtual bool DefenseSingleGCD(out IAction act, IEnumerable
///
///
- [Obsolete("Use DefenseSingleGCD(act, hostiles)")]
[RotationDesc(DescType.DefenseSingleGCD)]
protected virtual bool DefenseSingleGCD(out IAction act)
{
- return DefenseSingleGCD(out act, Array.Empty());
+ if (LostStoneskin.CanUse(out act)) return true;
+
+ act = null; return false;
}
@@ -282,9 +282,7 @@ protected virtual bool DefenseSingleGCD(out IAction act)
[RotationDesc(DescType.DefenseAreaGCD)]
protected virtual bool DefenseAreaGCD(out IAction act, IEnumerable hostiles)
{
- if (LostStoneskin2.CanUse(out act)) return true;
-
- act = null; return false;
+ return DefenseAreaGCD(out act);
}
///
@@ -292,11 +290,12 @@ protected virtual bool DefenseAreaGCD(out IAction act, IEnumerable
///
///
///
- [Obsolete("Use DefenseAreaGCD(act, hostiles)")]
[RotationDesc(DescType.DefenseAreaGCD)]
protected virtual bool DefenseAreaGCD(out IAction act)
{
- return DefenseAreaGCD(out act, Array.Empty());
+ if (LostStoneskin2.CanUse(out act)) return true;
+
+ act = null; return false;
}
///
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 16c47bf93..c9e0f0abf 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -1,5 +1,6 @@
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.SubKinds;
+using Dalamud.Logging;
using ECommons.DalamudServices;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
@@ -55,14 +56,14 @@ internal static void ClearTarget()
= DataCenter.AllianceMembers
= DataCenter.AllianceTanks
= DataCenter.DyingPeople
+ = DataCenter.HostileTargetsCastingAOE
+ = DataCenter.HostileTargetsCastingToTank
= empty;
DataCenter.DeathPeopleAll.Delay(empty);
DataCenter.DeathPeopleParty.Delay(empty);
DataCenter.WeakenPeople.Delay(empty);
DataCenter.HostileTargets.Delay(empty);
- DataCenter.HostileTargetsCastingAOE.Delay(empty);
- DataCenter.HostileTargetsCastingToTank.Delay(empty);
DataCenter.CanInterruptTargets.Delay(empty);
}
@@ -157,8 +158,8 @@ private unsafe static void UpdateHostileTargets(IEnumerable allTarg
DataCenter.MobsTime = DataCenter.HostileTargets.Count(o => o.DistanceToPlayer() <= JobRange && o.CanSee())
>= Service.Config.GetValue(PluginConfigInt.AutoDefenseNumber);
- DataCenter.HostileTargetsCastingToTank.Delay(DataCenter.HostileTargets.Where(IsHostileCastingTank));
- DataCenter.HostileTargetsCastingAOE.Delay(DataCenter.HostileTargets.Where(IsHostileCastingArea));
+ DataCenter.HostileTargetsCastingToTank = DataCenter.HostileTargets.Where(IsHostileCastingTank);
+ DataCenter.HostileTargetsCastingAOE = DataCenter.HostileTargets.Where(IsHostileCastingArea);
DataCenter.IsHostileCastingToTank = IsCastingTankVfx() || DataCenter.HostileTargetsCastingToTank.Any();
DataCenter.IsHostileCastingAOE = IsCastingAreaVfx() || DataCenter.HostileTargetsCastingAOE.Any();
From 1fa324ab853fabf513338e451f24d9126cb07ed4 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sat, 23 Dec 2023 12:10:15 -0500
Subject: [PATCH 20/73] make Third Eye timing aware
---
RotationSolver.Basic/Helpers/ObjectHelper.cs | 5 +++++
RotationSolver.Basic/Rotations/Basic/SAM_Base.cs | 9 ++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs
index c844f4048..0e9848e2a 100644
--- a/RotationSolver.Basic/Helpers/ObjectHelper.cs
+++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs
@@ -134,6 +134,11 @@ internal static bool CanInterrupt(this BattleChara b)
return _effectRangeCheck[id] = true;
}
+ public static float RemainingCastTime(this BattleChara b)
+ {
+ return b.IsCasting ? b.TotalCastTime - b.CurrentCastTime : 999.99f;
+ }
+
///
/// Is object a dummy.
///
diff --git a/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs b/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
index 1a1901db9..4a602f59b 100644
--- a/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/SAM_Base.cs
@@ -389,9 +389,12 @@ protected sealed override bool DefenseAreaAbility(out IAction act)
///
[RotationDesc(ActionID.ThirdEye)]
- protected override bool DefenseSingleAbility(out IAction act)
+ protected override bool DefenseSingleAbility(out IAction act, IEnumerable hostiles)
{
- if (ThirdEye.CanUse(out act)) return true;
+ // Third Eye's buff duration is 4s
+ if (!hostiles.Any() || hostiles.Any(h => h.RemainingCastTime() < 4))
+ if (ThirdEye.CanUse(out act))
+ return true;
return base.DefenseSingleAbility(out act);
}
-}
\ No newline at end of file
+}
From e6906d05f31159aa79d7e42b108613c10c3f90bf Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sat, 23 Dec 2023 12:18:56 -0500
Subject: [PATCH 21/73] take out old logging
---
RotationSolver.Basic/Rotations/CustomRotation_Ability.cs | 3 +--
RotationSolver.Basic/Rotations/CustomRotation_GCD.cs | 3 +--
RotationSolver/Updaters/TargetUpdater.cs | 1 -
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 91610effc..e4093e9c8 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -1,5 +1,4 @@
-using Dalamud.Logging;
-using RotationSolver.Basic.Configuration;
+using RotationSolver.Basic.Configuration;
namespace RotationSolver.Basic.Rotations;
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
index 09ffc8c21..4cc89eab3 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_GCD.cs
@@ -1,5 +1,4 @@
-using Dalamud.Logging;
-using RotationSolver.Basic.Configuration;
+using RotationSolver.Basic.Configuration;
namespace RotationSolver.Basic.Rotations;
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index c9e0f0abf..543dc2922 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -1,6 +1,5 @@
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.SubKinds;
-using Dalamud.Logging;
using ECommons.DalamudServices;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
From d8e7ddaea2a6c56117b471b4f5832c8f4e8f72c0 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sat, 23 Dec 2023 12:55:08 -0500
Subject: [PATCH 22/73] clarify comment
---
RotationSolver.Basic/Rotations/CustomRotation_Ability.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index e4093e9c8..30be1ad1e 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -348,7 +348,7 @@ protected virtual bool HealAreaAbility(out IAction act)
/// The ability that defenses single character.
///
/// Result action.
- /// Hostiles casting single-target actions/tankbusters. Empty during a forced DefenseSingle window.
+ /// Hostiles casting single-target actions (tankbusters). If the player is on a DPS job, this list may also include hostiles casting AOE actions (raidwides). Empty during a forced DefenseSingle window.
/// Can we use it.
[RotationDesc(DescType.DefenseSingleAbility)]
protected virtual bool DefenseSingleAbility(out IAction act, IEnumerable hostiles)
From 779a25cfc7cf08d5ae22ba77eddae410cd40334b Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sun, 24 Dec 2023 17:32:32 -0500
Subject: [PATCH 23/73] use data IDs, add allagan bomb
---
RotationSolver/Updaters/TargetUpdater.cs | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 63bcd2139..4068c6e02 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -527,10 +527,18 @@ private static void UpdateNamePlate(IEnumerable allTargets)
// status checks that can't easily be represented in config
private static bool CheckTargetableOther(BattleChara b) {
// Labyrinth of the Ancients
- if (Svc.ClientState.TerritoryType == 174 && b.Name.ToString() == "Thanatos") {
- // thanatos can only be damaged by players with Astral Realignment (398)
- return Player.Status.Any(s => s.StatusId == 398);
- // TODO: Allagan Bomb is also invulnerable until everything else is dead, but that's harder to check
+ if (Svc.ClientState.TerritoryType == 174) {
+ // Thanatos
+ if (b.DataId == 2350) {
+ // can only be damaged by players with Astral Realignment
+ return Player.Status.Any(s => s.StatusId == 398);
+ }
+
+ // Allagan Bomb
+ if (b.DataId == 2407) {
+ // can only be damaged when every other enemy is dead
+ return DataCenter.NumberOfAllHostilesInMaxRange == 1;
+ }
}
// The Puppets' Bunker
From d8894ab7ecbbc76ce37c9c372e7c87dc115818f8 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Mon, 25 Dec 2023 13:16:05 -0500
Subject: [PATCH 24/73] setting dot flag fixes target check
---
RotationSolver.Basic/Rotations/CustomRotation_Actions.cs | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
index 2099dff2a..4eb45fe72 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Actions.cs
@@ -448,7 +448,7 @@ or Job.RDM
public static IBaseAction LostRampage { get; } = new RoleAction(
ActionID.LostRampage,
new JobRole[] { JobRole.Melee, JobRole.Tank, JobRole.RangedPhysical },
- ActionOption.DutyAction
+ ActionOption.DutyAction | ActionOption.Eot
) {
TargetStatus = new StatusID[] { StatusID.LostRampage },
// TargetStatusIsGlobal = true,
@@ -463,7 +463,7 @@ or Job.RDM
public static IBaseAction LostBurst { get; } = new RoleAction(
ActionID.LostBurst,
new JobRole[] { JobRole.Healer, JobRole.RangedMagical },
- ActionOption.DutyAction
+ ActionOption.DutyAction | ActionOption.Eot
) {
TargetStatus = new StatusID[] { StatusID.LostBurst },
// TargetStatusIsGlobal = true,
@@ -578,7 +578,7 @@ or Job.RDM
///
///
public static IBaseAction LostFlarestar { get; } = new BaseAction(ActionID.LostFlarestar,
- ActionOption.DutyAction)
+ ActionOption.DutyAction | ActionOption.Dot)
{
FilterForHostiles = (tars) => tars.Where(t => t.IsBossFromIcon() || Service.Config.GetValue(PluginConfigBool.UseLostFlareStarOnMobs)),
TargetStatus = new StatusID[] { StatusID.LostFlarestar },
From dc7ffd75d0421f9cc143b2b5a62546b4841f2b3e Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Sat, 30 Dec 2023 14:55:18 -0500
Subject: [PATCH 25/73] solo target
---
RotationSolver.Basic/Configuration/Configs.cs | 1 +
RotationSolver.Basic/DataCenter.cs | 18 ++++++++++++++++++
.../Rotations/Basic/BLU_Base.cs | 2 +-
.../Localization/ConfigTranslation.cs | 1 +
RotationSolver/Localization/Strings.cs | 3 ++-
.../UI/RotationConfigWindow_Config.cs | 1 +
RotationSolver/Updaters/TargetUpdater.cs | 6 +++++-
7 files changed, 29 insertions(+), 3 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 395d4e029..c2ab5695c 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -280,6 +280,7 @@ public enum PluginConfigBool : byte
[Default(true)] RaisePlayerByCasting,
[Default(true)] RaiseBrinkOfDeath,
+ [Default(true)] TargetAllSolo,
[Default(true)] AddEnemyListToHostile,
[Default(false)] OnlyAttackInEnemyList,
[Default(false)] UseTinctures,
diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs
index c7c2f21ce..4de8409d3 100644
--- a/RotationSolver.Basic/DataCenter.cs
+++ b/RotationSolver.Basic/DataCenter.cs
@@ -28,6 +28,18 @@ internal static BattleChara HostileTarget
}
}
+ private static readonly HashSet _forayAreas = new() {
+ // Eureka zones
+ 732, 763, 795, 827,
+
+ // Bozjan Southern Front (includes CLL)
+ 920,
+ // Delubrum Reginae + Savage
+ 936, 937,
+ // Zadnor (includes Dalriada)
+ 975,
+ };
+
internal static Queue MapEffects { get; } = new(64);
internal static Queue ObjectEffects { get; } = new(64);
internal static Queue VfxNewData { get; } = new(64);
@@ -117,6 +129,12 @@ public static bool SetAutoStatus(AutoStatus status, bool keep)
}
public static HashSet DisabledActionSequencer { get; set; } = new HashSet();
+ internal static bool InSoloDuty() {
+ return Svc.Condition[ConditionFlag.BoundByDuty56]
+ && PartyMembers.Count(p => p.GetHealthRatio() > 0) == 1
+ && !_forayAreas.Contains(Territory.RowId);
+ }
+
private static List NextActs = new();
public static IAction ActionSequencerAction { private get; set; }
public static IAction CommandNextAction
diff --git a/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs b/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
index a5a1cc80d..989e0d449 100644
--- a/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
+++ b/RotationSolver.Basic/Rotations/Basic/BLU_Base.cs
@@ -904,7 +904,7 @@ public override bool CanUse(out IAction act, CanUseOption option = CanUseOption.
public static IBLUAction BasicInstinct { get; } = new BLUAction(ActionID.BasicInstinct)
{
StatusProvide = new StatusID[] { StatusID.BasicInstinct },
- ActionCheck = (b, m) => Svc.Condition[Dalamud.Game.ClientState.Conditions.ConditionFlag.BoundByDuty56] && DataCenter.PartyMembers.Count(p => p.GetHealthRatio() > 0) == 1,
+ ActionCheck = (b, m) => DataCenter.InSoloDuty()
};
static IBaseAction AethericMimicry { get; } = new BaseAction(ActionID.AethericMimicry, ActionOption.Friendly)
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 64f18fec2..e1cfcd102 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -122,6 +122,7 @@ internal static class ConfigTranslation
// target
PluginConfigBool.AddEnemyListToHostile => LocalizationManager.RightLang.ConfigWindow_Param_AddEnemyListToHostile,
PluginConfigBool.OnlyAttackInEnemyList => LocalizationManager.RightLang.ConfigWindow_Param_OnlyAttackInEnemyList,
+ PluginConfigBool.TargetAllSolo => LocalizationManager.RightLang.ConfigWindow_Param_TargetAllSolo,
PluginConfigBool.ChooseAttackMark => LocalizationManager.RightLang.ConfigWindow_Param_ChooseAttackMark,
PluginConfigBool.CanAttackMarkAOE => LocalizationManager.RightLang.ConfigWindow_Param_CanAttackMarkAOE,
PluginConfigBool.FilterStopMark => LocalizationManager.RightLang.ConfigWindow_Param_FilterStopMark,
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index 15b7436ef..a038b5b4b 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -220,6 +220,7 @@ internal class Strings
public string ConfigWindow_Param_TargetToHostileType2 { get; set; } = "Previously engaged targets or all targets that are in range\n(engages on countdown timer and resets when out of combat)";
public string ConfigWindow_Param_TargetToHostileType3 { get; set; } = "Previously engaged targets (engages on countdown timer)";
public string ConfigWindow_Param_AddEnemyListToHostile { get; set; } = "Add enemy list to the hostile targets.";
+ public string ConfigWindow_Param_TargetAllSolo { get; set; } = "Force 'All targets' behavior while in solo duties.";
public string ConfigWindow_Param_OnlyAttackInEnemyList { get; set; } = "Only attack the targets in enemy list.";
public string ConfigWindow_Param_ChooseAttackMark { get; set; } = "Priority attack targets with attack markers";
public string ConfigWindow_Param_CanAttackMarkAOE { get; set; } = "Allowed use of AoE to attack more mobs.";
@@ -838,4 +839,4 @@ internal class Strings
public string ConfigWindow_Condition_DutyName { get; set; } = "Duty Name";
public string ConfigWindow_Condition_TargetWarning { get; set; } = "You'd better not use it. Because this target isn't the action's target. Try to pick it from action.";
-}
\ No newline at end of file
+}
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index 6484d00d0..52982d609 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -883,6 +883,7 @@ private static void DrawTargetConfig()
PvPFilter = JobFilter.NoJob,
},
+ new CheckBoxSearchPlugin(PluginConfigBool.TargetAllSolo),
new CheckBoxSearchPlugin(PluginConfigBool.AddEnemyListToHostile, new CheckBoxSearchPlugin(PluginConfigBool.OnlyAttackInEnemyList)),
new CheckBoxSearchPlugin(PluginConfigBool.FilterStopMark),
new CheckBoxSearchPlugin(PluginConfigBool.ChooseAttackMark, new ISearchable[]
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 81ccc99c5..ae11665a2 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -183,7 +183,11 @@ private static IEnumerable GetHostileTargets(IEnumerable 0 || (DataCenter.Territory?.IsPvpZone ?? false))
+ if (type == TargetHostileType.AllTargetsCanAttack
+ || Service.CountDownTime > 0
+ || (DataCenter.Territory?.IsPvpZone ?? false)
+ || Service.Config.GetValue(PluginConfigBool.TargetAllSolo) && DataCenter.InSoloDuty()
+ )
{
return allAttackableTargets;
}
From de0c258026aca4e78d87d1448a349ba4dea33797 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Tue, 2 Jan 2024 22:27:31 +0000
Subject: [PATCH 26/73] Update publish.yml
---
.github/workflows/publish.yml | 28 +++++++++++++---------------
1 file changed, 13 insertions(+), 15 deletions(-)
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b58dd93dc..b60597065 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -17,7 +17,19 @@ jobs:
submodules: true
- name: Get Tag Name
- run: echo "tag=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')" >> $GITHUB_ENV
+ run: |
+ tag=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')
+ echo "tag=$tag" >> $GITHUB_ENV
+
+ if [[ "$tag" == *"-test" ]]; then
+ branch="testing"
+ tag=$(echo $tag | sed 's/-test//')
+ else
+ branch="latest"
+ fi
+
+ echo "branch=$branch" >> $GITHUB_ENV
+ echo "tag=$tag" >> $GITHUB_ENV
- name: Set up .NET
uses: actions/setup-dotnet@v3
@@ -35,20 +47,6 @@ jobs:
- name: Build Project
run: dotnet build --configuration Release RotationSolver/RotationSolver.csproj -p:AssemblyVersion=${{ env.tag }}
- - name: Get Tag Name
- run: |
- tag=$(echo ${{ github.ref }} | sed 's/refs\/tags\/v//')
- echo "tag=$tag" >> $GITHUB_ENV
-
- if [[ "$tag" == *"-test" ]]; then
- branch="testing"
- tag=$(echo $tag | sed 's/-test//')
- else
- branch="latest"
- fi
-
- echo "branch=$branch" >> $GITHUB_ENV
- echo "tag=$tag" >> $GITHUB_ENV
- name: Publish Version
uses: PunishXIV/dynamis-action@v1
id: dynamis
From 56d6daffa115c0280e377456989ef19bbfe767ac Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Tue, 2 Jan 2024 18:03:46 -0500
Subject: [PATCH 27/73] fix enmity list offset
---
RotationSolver/Updaters/TargetUpdater.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 81ccc99c5..1d8ce0ea3 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -225,7 +225,7 @@ private static unsafe uint[] GetEnemies()
var addon = addons.FirstOrDefault();
var enemy = (AddonEnemyList*)addon;
- var numArray = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework.Instance()->GetUiModule()->GetRaptureAtkModule()->AtkModule.AtkArrayDataHolder.NumberArrays[19];
+ var numArray = FFXIVClientStructs.FFXIV.Client.System.Framework.Framework.Instance()->GetUiModule()->GetRaptureAtkModule()->AtkModule.AtkArrayDataHolder.NumberArrays[21];
List list = new(enemy->EnemyCount);
for (var i = 0; i < enemy->EnemyCount; i++)
{
From 24a1ae8909355d0ddbf41243b270b8d34cf35009 Mon Sep 17 00:00:00 2001
From: xan <149614526+xanunderscore@users.noreply.github.com>
Date: Tue, 2 Jan 2024 18:06:11 -0500
Subject: [PATCH 28/73] change default
---
RotationSolver.Basic/Configuration/Configs.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index c2ab5695c..b6d4b219b 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -280,7 +280,7 @@ public enum PluginConfigBool : byte
[Default(true)] RaisePlayerByCasting,
[Default(true)] RaiseBrinkOfDeath,
- [Default(true)] TargetAllSolo,
+ [Default(false)] TargetAllSolo,
[Default(true)] AddEnemyListToHostile,
[Default(false)] OnlyAttackInEnemyList,
[Default(false)] UseTinctures,
From aba35fd62e6166a8fb9a78358d034acd9c9f6fce Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Wed, 10 Jan 2024 16:09:39 +0000
Subject: [PATCH 29/73] removed the greeting system
---
RotationSolver.Basic/Configuration/Configs.cs | 3 -
.../Configuration/RotationSolverRecord.cs | 10 -
RotationSolver/Commands/RSCommands_Actions.cs | 20 --
.../Localization/ConfigTranslation.cs | 3 -
RotationSolver/Localization/Localization.json | 5 -
RotationSolver/Localization/de.json | 5 -
RotationSolver/Localization/es.json | 5 -
RotationSolver/Localization/fr.json | 5 -
RotationSolver/Localization/ja.json | 5 -
RotationSolver/Localization/zh.json | 5 -
.../UI/RotationConfigWindow_Config.cs | 28 --
RotationSolver/Updaters/MajorUpdater.cs | 13 +-
RotationSolver/Updaters/SocialUpdater.cs | 253 +-----------------
RotationSolver/Updaters/TargetUpdater.cs | 11 -
14 files changed, 8 insertions(+), 363 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 395d4e029..d0b667ca3 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -369,9 +369,6 @@ public enum PluginConfigBool : byte
[Default(true)] HealWhenNothingTodo,
[Default(true)] UseResourcesAction,
- [Default(true)] SayHelloToAll,
- [Default(true)] SayHelloToUsers,
- [Default(false)] JustSayHelloOnce,
[Default(false)] UseAdditionalConditions,
[Default(false)] OnlyHealSelfWhenNoHealer,
diff --git a/RotationSolver.Basic/Configuration/RotationSolverRecord.cs b/RotationSolver.Basic/Configuration/RotationSolverRecord.cs
index 7601db0bb..d195279ed 100644
--- a/RotationSolver.Basic/Configuration/RotationSolverRecord.cs
+++ b/RotationSolver.Basic/Configuration/RotationSolverRecord.cs
@@ -9,14 +9,4 @@ public class RotationSolverRecord
/// How many times have rs clicked for you.
///
public uint ClickingCount { get; set; } = 0;
-
- ///
- /// How many times have you greeted the other users.
- ///
- public uint SayingHelloCount { get; set; } = 0;
-
- ///
- /// The users that already said hello.
- ///
- public HashSet SaidUsers { get; set; } = new HashSet();
}
diff --git a/RotationSolver/Commands/RSCommands_Actions.cs b/RotationSolver/Commands/RSCommands_Actions.cs
index ddf9183d1..1448a3296 100644
--- a/RotationSolver/Commands/RSCommands_Actions.cs
+++ b/RotationSolver/Commands/RSCommands_Actions.cs
@@ -50,26 +50,6 @@ public static void DoAction()
ControlWindow.DidTime = DateTime.Now;
}
- if (nextAction is BaseAction act1 && act1.IsPvP && !act1.IsFriendly
- && !act1.IsTargetArea
- && act1.Target is PlayerCharacter p/* && p != Player.Object*/)
- {
- var hash = SocialUpdater.EncryptString(p);
-
- //Don't attack authors and contributors!!
- if (RotationUpdater.AuthorHashes.ContainsKey(hash)
- || DownloadHelper.ContributorsHash.Contains(hash))
- {
- Svc.Chat.PrintError($"Please don't attack RS developers with RS by {act1}!");
- return;
- }
- }
-
-#if DEBUG
- //if (nextAction is BaseAction acti)
- // Svc.Log.Debug($"Will Do {acti}");
-#endif
-
if (Service.Config.GetValue(PluginConfigBool.KeyBoardNoise))
{
PreviewUpdater.PulseActionBar(nextAction.AdjustedID);
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 64f18fec2..6bb842181 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -59,9 +59,6 @@ internal static class ConfigTranslation
PluginConfigBool.ToggleManual => LocalizationManager.RightLang.ConfigWindow_Param_ToggleManual,
PluginConfigBool.ToggleAuto => LocalizationManager.RightLang.ConfigWindow_Param_ToggleAuto,
PluginConfigBool.UseStopCasting => LocalizationManager.RightLang.ConfigWindow_Param_UseStopCasting,
- PluginConfigBool.SayHelloToUsers => LocalizationManager.RightLang.ConfigWindow_Basic_SayHelloToUsers,
- PluginConfigBool.SayHelloToAll => LocalizationManager.RightLang.ConfigWindow_Basic_SayHelloToAll,
- PluginConfigBool.JustSayHelloOnce => LocalizationManager.RightLang.ConfigWindow_Basic_JustSayHelloOnce,
PluginConfigBool.UseAdditionalConditions => LocalizationManager.RightLang.ConfigWindow_Basic_UseAdditionalConditions,
// UI
diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json
index f214eab16..0d4e1b878 100644
--- a/RotationSolver/Localization/Localization.json
+++ b/RotationSolver/Localization/Localization.json
@@ -544,7 +544,6 @@
"ConfigWindow_Basic_ClickingDuration": "The clicking duration, RS will try to click at this moment.",
"ConfigWindow_Basic_WeaponDelay": "This is the clipping time.\nGCD is over. However, RS forgets to click the next action.",
"ConfigWindow_About_ClickingCount": "Rotation Solver helped you by clicking actions {0:N0} times.",
- "ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!",
"ConfigWindow_Auto_AutoHealTimeToKill": "Stop healing when time to kill is lower then...",
"ConfigWindow_UI_ShowHostiles": "Show the hostile target icon",
"ConfigWindow_UI_HostileIconHeight": "Hostile Icon height from position",
@@ -566,10 +565,6 @@
"ConfigWindow_Auto_UseResourcesAction": "Use actions that use resources",
"ConfigWindow_Auto_OnlyHealSelfWhenNoHealer": "Only Heal self When Not a healer",
"ConfigWindow_Auto_HealthForAutoDefense": "HP Ratio about defense single of Tanks",
- "ConfigWindow_Basic_SayHelloToUsers": "Say hello to the users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToAll": "Say hello to all users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToUsersDesc": "It can only be disabled for users, not authors and contributors.\nIf you want to be greeted by other users, please DM ArchiTed in Discord Server with your Hash!",
- "ConfigWindow_Basic_JustSayHelloOnce": "Just say hello once to the same user.",
"ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!",
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
diff --git a/RotationSolver/Localization/de.json b/RotationSolver/Localization/de.json
index 99bacfab5..fb81eddd1 100644
--- a/RotationSolver/Localization/de.json
+++ b/RotationSolver/Localization/de.json
@@ -544,7 +544,6 @@
"ConfigWindow_Basic_ClickingDuration": "The clicking duration, RS will try to click at this moment.",
"ConfigWindow_Basic_WeaponDelay": "This is the clipping time.\nGCD is over. However, RS forgets to click the next action.",
"ConfigWindow_About_ClickingCount": "Rotation Solver helped you by clicking actions {0:N0} times.",
- "ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!",
"ConfigWindow_Auto_AutoHealTimeToKill": "Stop healing when time to kill is lower then...",
"ConfigWindow_UI_ShowHostiles": "Show the hostile target icon",
"ConfigWindow_UI_HostileIconHeight": "Hostile Icon height from position",
@@ -566,10 +565,6 @@
"ConfigWindow_Auto_UseResourcesAction": "Use actions that use resources",
"ConfigWindow_Auto_OnlyHealSelfWhenNoHealer": "Only Heal self When Not a healer",
"ConfigWindow_Auto_HealthForAutoDefense": "HP Ratio about defense single of Tanks",
- "ConfigWindow_Basic_SayHelloToUsers": "Say hello to the users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToAll": "Say hello to all users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToUsersDesc": "It can only be disabled for users, not authors and contributors.\nIf you want to be greeted by other users, please DM ArchiTed in Discord Server with your Hash!",
- "ConfigWindow_Basic_JustSayHelloOnce": "Just say hello once to the same user.",
"ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!",
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
diff --git a/RotationSolver/Localization/es.json b/RotationSolver/Localization/es.json
index a6a748b91..9ae296680 100644
--- a/RotationSolver/Localization/es.json
+++ b/RotationSolver/Localization/es.json
@@ -544,7 +544,6 @@
"ConfigWindow_Basic_ClickingDuration": "The clicking duration, RS will try to click at this moment.",
"ConfigWindow_Basic_WeaponDelay": "This is the clipping time.\nGCD is over. However, RS forgets to click the next action.",
"ConfigWindow_About_ClickingCount": "Rotation Solver helped you by clicking actions {0:N0} times.",
- "ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!",
"ConfigWindow_Auto_AutoHealTimeToKill": "Stop healing when time to kill is lower then...",
"ConfigWindow_UI_ShowHostiles": "Show the hostile target icon",
"ConfigWindow_UI_HostileIconHeight": "Hostile Icon height from position",
@@ -566,10 +565,6 @@
"ConfigWindow_Auto_UseResourcesAction": "Use actions that use resources",
"ConfigWindow_Auto_OnlyHealSelfWhenNoHealer": "Only Heal self When Not a healer",
"ConfigWindow_Auto_HealthForAutoDefense": "HP Ratio about defense single of Tanks",
- "ConfigWindow_Basic_SayHelloToUsers": "Say hello to the users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToAll": "Say hello to all users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToUsersDesc": "It can only be disabled for users, not authors and contributors.\nIf you want to be greeted by other users, please DM ArchiTed in Discord Server with your Hash!",
- "ConfigWindow_Basic_JustSayHelloOnce": "Just say hello once to the same user.",
"ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!",
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
diff --git a/RotationSolver/Localization/fr.json b/RotationSolver/Localization/fr.json
index 85165eabf..3e10d1f6f 100644
--- a/RotationSolver/Localization/fr.json
+++ b/RotationSolver/Localization/fr.json
@@ -544,7 +544,6 @@
"ConfigWindow_Basic_ClickingDuration": "The clicking duration, RS will try to click at this moment.",
"ConfigWindow_Basic_WeaponDelay": "This is the clipping time.\nGCD is over. However, RS forgets to click the next action.",
"ConfigWindow_About_ClickingCount": "Rotation Solver helped you by clicking actions {0:N0} times.",
- "ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!",
"ConfigWindow_Auto_AutoHealTimeToKill": "Stop healing when time to kill is lower then...",
"ConfigWindow_UI_ShowHostiles": "Show the hostile target icon",
"ConfigWindow_UI_HostileIconHeight": "Hostile Icon height from position",
@@ -566,10 +565,6 @@
"ConfigWindow_Auto_UseResourcesAction": "Use actions that use resources",
"ConfigWindow_Auto_OnlyHealSelfWhenNoHealer": "Only Heal self When Not a healer",
"ConfigWindow_Auto_HealthForAutoDefense": "HP Ratio about defense single of Tanks",
- "ConfigWindow_Basic_SayHelloToUsers": "Say hello to the users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToAll": "Say hello to all users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToUsersDesc": "It can only be disabled for users, not authors and contributors.\nIf you want to be greeted by other users, please DM ArchiTed in Discord Server with your Hash!",
- "ConfigWindow_Basic_JustSayHelloOnce": "Just say hello once to the same user.",
"ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!",
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
diff --git a/RotationSolver/Localization/ja.json b/RotationSolver/Localization/ja.json
index 8ec367e7b..24ca55c2b 100644
--- a/RotationSolver/Localization/ja.json
+++ b/RotationSolver/Localization/ja.json
@@ -544,7 +544,6 @@
"ConfigWindow_Basic_ClickingDuration": "The clicking duration, RS will try to click at this moment.",
"ConfigWindow_Basic_WeaponDelay": "This is the clipping time.\nGCD is over. However, RS forgets to click the next action.",
"ConfigWindow_About_ClickingCount": "Rotation Solverは、アクションにおいて {0:N0} 回あなたを助けました。",
- "ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!",
"ConfigWindow_Auto_AutoHealTimeToKill": "Stop healing when time to kill is lower then...",
"ConfigWindow_UI_ShowHostiles": "Show the hostile target icon",
"ConfigWindow_UI_HostileIconHeight": "Hostile Icon height from position",
@@ -566,10 +565,6 @@
"ConfigWindow_Auto_UseResourcesAction": "Use actions that use resources",
"ConfigWindow_Auto_OnlyHealSelfWhenNoHealer": "Only Heal self When Not a healer",
"ConfigWindow_Auto_HealthForAutoDefense": "HP Ratio about defense single of Tanks",
- "ConfigWindow_Basic_SayHelloToUsers": "Say hello to the users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToAll": "Say hello to all users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToUsersDesc": "It can only be disabled for users, not authors and contributors.\nIf you want to be greeted by other users, please DM ArchiTed in Discord Server with your Hash!",
- "ConfigWindow_Basic_JustSayHelloOnce": "Just say hello once to the same user.",
"ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!",
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
diff --git a/RotationSolver/Localization/zh.json b/RotationSolver/Localization/zh.json
index f8a7dc970..5c859e6df 100644
--- a/RotationSolver/Localization/zh.json
+++ b/RotationSolver/Localization/zh.json
@@ -544,7 +544,6 @@
"ConfigWindow_Basic_ClickingDuration": "The clicking duration, RS will try to click at this moment.",
"ConfigWindow_Basic_WeaponDelay": "这是缩短时间。\nGCD结束了。但是,RS忘记点击下一个技能。",
"ConfigWindow_About_ClickingCount": "Rotation Solver 帮助您点击 {0:N0} 次技能。",
- "ConfigWindow_About_SayHelloCount": "You have said hello to other users {0:N0} times!",
"ConfigWindow_Auto_AutoHealTimeToKill": "Stop healing when time to kill is lower then...",
"ConfigWindow_UI_ShowHostiles": "Show the hostile target icon",
"ConfigWindow_UI_HostileIconHeight": "Hostile Icon height from position",
@@ -566,10 +565,6 @@
"ConfigWindow_Auto_UseResourcesAction": "Use actions that use resources",
"ConfigWindow_Auto_OnlyHealSelfWhenNoHealer": "Only Heal self When Not a healer",
"ConfigWindow_Auto_HealthForAutoDefense": "HP Ratio about defense single of Tanks",
- "ConfigWindow_Basic_SayHelloToUsers": "Say hello to the users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToAll": "Say hello to all users of Rotation Solver.",
- "ConfigWindow_Basic_SayHelloToUsersDesc": "It can only be disabled for users, not authors and contributors.\nIf you want to be greeted by other users, please DM ArchiTed in Discord Server with your Hash!",
- "ConfigWindow_Basic_JustSayHelloOnce": "Just say hello once to the same user.",
"ConfigWindow_About_Clicking100k": "Well, you must be a lazy player!",
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index 6484d00d0..3e43424b0 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -340,30 +340,6 @@ private static void DrawBasicOthers()
{
searchable?.Draw(Job);
}
-
- if (Service.Config.GetValue(PluginConfigBool.SayHelloToAll))
- {
- var str = SocialUpdater.EncryptString(Player.Object);
- ImGui.SetNextItemWidth(ImGui.CalcTextSize(str).X + 10);
- ImGui.InputText("That is your HASH:", ref str, 100);
-
- if (!DownloadHelper.ContributorsHash.Contains(str)
- && !DownloadHelper.UsersHash.Contains(str)
- && !RotationUpdater.AuthorHashes.ContainsKey(str))
- {
- if (ImGui.Button("DM your Hash to ArchiTed for being greeted."))
- {
- ImGui.SetClipboardText(str);
- Notify.Success($"Your hash \"{str}\" copied to clipboard.");
- Util.OpenLink("https://discord.com/users/1007293294100877322");
- }
- }
- }
- else
- {
- ImGui.TextColored(ImGuiColors.DalamudRed, "The author of RS loves being greeted by you!");
- }
-
}
private static readonly ISearchable[] _basicTimer = new ISearchable[]
@@ -397,10 +373,6 @@ private static void DrawBasicOthers()
new DragFloatRangeSearchPlugin(PluginConfigFloat.NotInCombatDelayMin, PluginConfigFloat.NotInCombatDelayMax, 0.002f),
new CheckBoxSearchPlugin(PluginConfigBool.UseAdditionalConditions),
-
- new CheckBoxSearchPlugin(PluginConfigBool.SayHelloToAll,
- new CheckBoxSearchPlugin(PluginConfigBool.SayHelloToUsers),
- new CheckBoxSearchPlugin(PluginConfigBool.JustSayHelloOnce)),
};
private static readonly ISearchable[] _basicSwitchTurnOn = new ISearchable[]
diff --git a/RotationSolver/Updaters/MajorUpdater.cs b/RotationSolver/Updaters/MajorUpdater.cs
index 7e00bf48e..33b0cea5e 100644
--- a/RotationSolver/Updaters/MajorUpdater.cs
+++ b/RotationSolver/Updaters/MajorUpdater.cs
@@ -32,6 +32,12 @@ internal static class MajorUpdater
private unsafe static void FrameworkUpdate(IFramework framework)
{
+ if (!_showedWarning)
+ {
+ _showedWarning = true;
+ ShowWarning();
+ }
+
PainterManager.ActionIds.Clear();
RotationSolverPlugin.UpdateDisplayWindow();
if (!IsValid)
@@ -43,15 +49,8 @@ private unsafe static void FrameworkUpdate(IFramework framework)
return;
}
- if (!_showedWarning)
- {
- _showedWarning = true;
- ShowWarning();
- }
-
try
{
- SocialUpdater.UpdateSocial();
PreviewUpdater.UpdatePreview();
if (Service.Config.GetValue(PluginConfigBool.TeachingMode) && ActionUpdater.NextAction != null)
diff --git a/RotationSolver/Updaters/SocialUpdater.cs b/RotationSolver/Updaters/SocialUpdater.cs
index 4314f396c..c62e86c69 100644
--- a/RotationSolver/Updaters/SocialUpdater.cs
+++ b/RotationSolver/Updaters/SocialUpdater.cs
@@ -1,59 +1,15 @@
-using Dalamud.Game.ClientState.Conditions;
-using Dalamud.Game.ClientState.Objects.SubKinds;
-using Dalamud.Game.Text.SeStringHandling;
-using Dalamud.Game.Text.SeStringHandling.Payloads;
-using ECommons.DalamudServices;
+using ECommons.DalamudServices;
using ECommons.GameHelpers;
-using FFXIVClientStructs.FFXIV.Client.UI;
using Lumina.Excel.GeneratedSheets;
using RotationSolver.Basic.Configuration;
using RotationSolver.Commands;
-using RotationSolver.Helpers;
using RotationSolver.Localization;
-using System.Diagnostics.CodeAnalysis;
-using System.Security.Cryptography;
-using System.Text;
namespace RotationSolver.Updaters;
internal class SocialUpdater
{
- private static readonly List _macroToAuthor = new()
- {
- "blush",
- "hug",
- "thumbsup",
- "yes",
- "clap",
- "cheer",
- "stroke",
- };
-
- private static readonly HashSet saidAuthors = new();
-
- static bool _canSaying = false;
-
- public static string GetDutyName(TerritoryType territory)
- {
- return territory.ContentFinderCondition?.Value?.Name?.RawString;
- }
-
- static bool CanSocial
- {
- get
- {
- if (Svc.Condition[ConditionFlag.OccupiedInQuestEvent]
- || Svc.Condition[ConditionFlag.WaitingForDuty]
- || Svc.Condition[ConditionFlag.WaitingForDutyFinder]
- || Svc.Condition[ConditionFlag.OccupiedInCutSceneEvent]
- || Svc.Condition[ConditionFlag.BetweenAreas]
- || Svc.Condition[ConditionFlag.BetweenAreas51]) return false;
-
- if (!Player.Interactable) return false;
-
- return Svc.Condition[ConditionFlag.BoundByDuty];
- }
- }
+ public static string GetDutyName(TerritoryType territory) => territory.ContentFinderCondition?.Value?.Name?.RawString;
internal static void Enable()
{
@@ -70,8 +26,6 @@ static async void DutyState_DutyCompleted(object sender, ushort e)
await Task.Delay(new Random().Next(4000, 6000));
- Service.Config.GlobalConfig.DutyEnd.AddMacro();
-
if (Service.Config.GetValue(PluginConfigBool.AutoOffWhenDutyCompleted))
{
RSCommands.CancelState();
@@ -83,7 +37,6 @@ static void ClientState_TerritoryChanged(ushort id)
DataCenter.ResetAllRecords();
var territory = Service.GetSheet().GetRow(id);
- _canSaying = territory?.ContentFinderCondition?.Value?.RowId != 0;
DataCenter.Territory = territory;
@@ -122,206 +75,4 @@ internal static void Disable()
Svc.DutyState.DutyCompleted -= DutyState_DutyCompleted;
Svc.ClientState.TerritoryChanged -= ClientState_TerritoryChanged;
}
-
- static RandomDelay socialDelay = new(() => (3, 5));
- internal static async void UpdateSocial()
- {
- if (DataCenter.InCombat) return;
- if (_canSaying && socialDelay.Delay(CanSocial))
- {
- _canSaying = false;
- Service.Config.GlobalConfig.DutyStart.AddMacro();
- await Task.Delay(new Random().Next(1000, 1500));
-
- SayHelloToUsers();
- }
- }
-
- private static readonly ChatEntityComparer _comparer = new();
- private static async void SayHelloToUsers()
- {
- if (!Service.Config.GetValue(PluginConfigBool.SayHelloToAll))
- {
- return;
- }
-
- var players = DataCenter.AllianceMembers.OfType()
-#if DEBUG
-#else
- .Where(c => c.ObjectId != Player.Object.ObjectId)
-#endif
- .Select(player => (player, EncryptString(player)))
- .Where(pair => !saidAuthors.Contains(pair.Item2)
- && !OtherConfiguration.RotationSolverRecord.SaidUsers.Contains(pair.Item2));
-
- IEnumerable entities = players
- .Select(c =>
- {
- if (!RotationUpdater.AuthorHashes.TryGetValue(c.Item2, out var nameDesc)) nameDesc = string.Empty;
- return (c.player, nameDesc);
- })
- .Where(p => !string.IsNullOrEmpty(p.nameDesc))
- .Select(p => new RotationAuthorChatEntity(p.player, p.nameDesc));
-
- entities = entities.Union(players
- .Where(p => DownloadHelper.ContributorsHash.Contains(p.Item2))
- .Select(p => new ContributorChatEntity(p.player)), _comparer);
-
- if (Service.Config.GetValue(PluginConfigBool.SayHelloToUsers))
- {
- entities = entities.Union(players
- .Where(p => DownloadHelper.UsersHash.Contains(p.Item2))
- .Select(p => new UserChatEntity(p.player)), _comparer);
- }
-
- foreach (var entity in entities)
- {
- while (!entity.CanTarget && !DataCenter.InCombat)
- {
- await Task.Delay(100);
- }
-
-#if DEBUG
-#else
- Svc.Targets.Target = entity.player;
- ECommons.Automation.Chat.Instance.SendMessage($"/{_macroToAuthor[new Random().Next(_macroToAuthor.Count)]} ");
-#endif
- Svc.Chat.Print(new Dalamud.Game.Text.XivChatEntry()
- {
- Message = entity.GetMessage(),
- Type = Dalamud.Game.Text.XivChatType.Notice,
- });
- UIModule.PlaySound(20, 0, 0, 0);
- entity.Dispose();
-
- await Task.Delay(new Random().Next(800, 1200));
- Svc.Targets.Target = null;
- await Task.Delay(new Random().Next(800, 1200));
- }
- }
-
- internal static string EncryptString(PlayerCharacter player)
- {
- if (player == null) return string.Empty;
-
- try
- {
- byte[] inputByteArray = Encoding.UTF8.GetBytes(player.HomeWorld.GameData.InternalName.ToString()
- + " - " + player.Name.ToString() + "U6Wy.zCG");
-
- var tmpHash = MD5.HashData(inputByteArray);
- var retB = Convert.ToBase64String(tmpHash);
- return retB;
- }
- catch (Exception ex)
- {
- Svc.Log.Warning(ex, "Failed to read the player's name and world.");
- return string.Empty;
- }
- }
-
- internal abstract class ChatEntity : IDisposable
- {
- public readonly PlayerCharacter player;
-
- public bool CanTarget
- {
- get
- {
- try
- {
- return player.IsTargetable;
- }
- catch
- {
- return false;
- }
- }
- }
-
- public virtual BitmapFontIcon Icon => BitmapFontIcon.Mentor;
-
- protected SeString Character => new(new IconPayload(Icon),
- new UIForegroundPayload(31),
- new PlayerPayload(player.Name.TextValue, player.HomeWorld.Id),
- UIForegroundPayload.UIForegroundOff);
-
- protected static SeString RotationSolver => new(new IconPayload(BitmapFontIcon.DPS),
- RotationSolverPlugin.OpenLinkPayload,
- new UIForegroundPayload(31),
- new TextPayload("Rotation Solver"),
- UIForegroundPayload.UIForegroundOff,
- RawPayload.LinkTerminator);
-
- public ChatEntity(PlayerCharacter character)
- {
- player = character;
- }
-
- public abstract SeString GetMessage();
-
- public void Dispose()
- {
- OtherConfiguration.RotationSolverRecord.SayingHelloCount++;
- var hash = EncryptString(player);
- saidAuthors.Add(hash);
- if (Service.Config.GetValue(PluginConfigBool.JustSayHelloOnce))
- {
- OtherConfiguration.RotationSolverRecord.SaidUsers.Add(hash);
- }
- }
- }
-
- internal class ChatEntityComparer : IEqualityComparer
- {
- public bool Equals(ChatEntity x, ChatEntity y)
- => x.player.Equals(y.player);
-
- public int GetHashCode([DisallowNull] ChatEntity obj)
- => obj.player.GetHashCode();
- }
-
- internal class RotationAuthorChatEntity : ChatEntity
- {
- private readonly string name;
- public RotationAuthorChatEntity(PlayerCharacter character, string nameDesc) : base(character)
- {
- name = nameDesc;
- }
-
- public override SeString GetMessage() =>
- Character
- .Append(new SeString(new TextPayload($"({name}) is one of the authors of ")))
- .Append(RotationSolver)
- .Append(new SeString(new TextPayload(". So say hello to them!")));
- }
-
-
- internal class ContributorChatEntity : ChatEntity
- {
- public ContributorChatEntity(PlayerCharacter character) : base(character)
- {
- }
-
- public override SeString GetMessage() =>
- Character
- .Append(new SeString(new TextPayload($" is one of the contributors of ")))
- .Append(RotationSolver)
- .Append(new SeString(new TextPayload(". So say hello to them!")));
- }
-
- internal class UserChatEntity : ChatEntity
- {
- public override BitmapFontIcon Icon => BitmapFontIcon.NewAdventurer;
-
- public UserChatEntity(PlayerCharacter character) : base(character)
- {
- }
-
- public override SeString GetMessage() =>
- Character
- .Append(new SeString(new TextPayload($" is one of the users of ")))
- .Append(RotationSolver)
- .Append(new SeString(new TextPayload(". So say hello to them!")));
- }
}
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 81ccc99c5..416dd3ab4 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -104,17 +104,6 @@ private unsafe static void UpdateHostileTargets(IEnumerable allTarg
DataCenter.AllHostileTargets = allTargets.Where(b =>
{
if (b.StatusList.Any(StatusHelper.IsInvincible)) return false;
-
- if (b is PlayerCharacter p)
- {
- var hash = SocialUpdater.EncryptString(p);
-
- //Don't attack authors!!
- if (RotationUpdater.AuthorHashes.ContainsKey(hash)) return false;
-
- //Don't attack contributors!!
- if (DownloadHelper.ContributorsHash.Contains(hash)) return false;
- }
return true;
});
From 024cb421c07e1b7a17da452fe6e26357ac0439cf Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Wed, 10 Jan 2024 16:37:16 +0000
Subject: [PATCH 30/73] prevent action updater from running while off
---
RotationSolver/Commands/RSCommands_Actions.cs | 2 --
.../Localization/ConfigTranslation.cs | 2 --
RotationSolver/Localization/Strings.cs | 5 ----
RotationSolver/UI/RotationConfigWindow.cs | 13 ---------
.../UI/RotationConfigWindow_Config.cs | 4 ---
RotationSolver/Updaters/ActionUpdater.cs | 1 +
RotationSolver/Updaters/MajorUpdater.cs | 29 -------------------
RotationSolver/Updaters/TargetUpdater.cs | 1 -
8 files changed, 1 insertion(+), 56 deletions(-)
diff --git a/RotationSolver/Commands/RSCommands_Actions.cs b/RotationSolver/Commands/RSCommands_Actions.cs
index 1448a3296..f19040d2b 100644
--- a/RotationSolver/Commands/RSCommands_Actions.cs
+++ b/RotationSolver/Commands/RSCommands_Actions.cs
@@ -1,9 +1,7 @@
using Dalamud.Game.ClientState.Conditions;
-using Dalamud.Game.ClientState.Objects.SubKinds;
using ECommons.DalamudServices;
using ECommons.GameHelpers;
using RotationSolver.Basic.Configuration;
-using RotationSolver.Helpers;
using RotationSolver.Localization;
using RotationSolver.UI;
using RotationSolver.Updaters;
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 6bb842181..d3557ae99 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -253,8 +253,6 @@ internal static class ConfigTranslation
PluginConfigBool.MoveTowardsScreenCenter => LocalizationManager.RightLang.ConfigWindow_Param_MoveTowardsScreenDesc,
PluginConfigBool.MoveAreaActionFarthest => LocalizationManager.RightLang.ConfigWindow_Param_MoveAreaActionFarthestDesc,
- PluginConfigBool.SayHelloToUsers => LocalizationManager.RightLang.ConfigWindow_Basic_SayHelloToUsersDesc,
-
PluginConfigBool.AutoOpenChest => "Because of the feature in pandora, there is an issue the treasure chest cannot be opened in some cases, I find the code from roll for loot. Once Pandora fixed that, this feature will be deleted.",
_ => string.Empty,
};
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index 15b7436ef..e16bf200a 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -765,7 +765,6 @@ internal class Strings
public string ConfigWindow_Basic_ClickingDuration { get; set; } = "The clicking duration, RS will try to click at this moment.";
public string ConfigWindow_Basic_WeaponDelay { get; set; } = "This is the clipping time.\nGCD is over. However, RS forgets to click the next action.";
public string ConfigWindow_About_ClickingCount { get; set; } = "Rotation Solver helped you by clicking actions {0:N0} times.";
- public string ConfigWindow_About_SayHelloCount { get; set; } = "You have said hello to other users {0:N0} times!";
public string ConfigWindow_Auto_AutoHealTimeToKill { get; set; } = "Stop healing when time to kill is lower then...";
public string ConfigWindow_UI_ShowHostiles { get; set; } = "Show the hostile target icon";
public string ConfigWindow_UI_HostileIconHeight { get; set; } = "Hostile Icon height from position";
@@ -794,10 +793,6 @@ internal class Strings
public string ConfigWindow_Auto_OnlyHealSelfWhenNoHealer { get; set; } = "Only Heal self When Not a healer";
public string ConfigWindow_Auto_HealthForAutoDefense { get; set; } = "HP Ratio about defense single of Tanks";
- public string ConfigWindow_Basic_SayHelloToUsers { get; set; } = "Say hello to the users of Rotation Solver.";
- public string ConfigWindow_Basic_SayHelloToAll { get; set; } = "Say hello to all users of Rotation Solver.";
- public string ConfigWindow_Basic_SayHelloToUsersDesc { get; set; } = "It can only be disabled for users, not authors and contributors.\nIf you want to be greeted by other users, please DM ArchiTed in Discord Server with your Hash!";
- public string ConfigWindow_Basic_JustSayHelloOnce { get; set; } = "Just say hello once to the same user.";
public string ConfigWindow_About_Clicking100k { get; set; } = "Well, you must be a lazy player!";
public string ConfigWindow_About_Clicking500k { get; set; } = "You're tiring RS out, give it a break!";
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index b7d5813b7..163debfb8 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -13,7 +13,6 @@
using FFXIVClientStructs.FFXIV.Client.Game.Fate;
using FFXIVClientStructs.FFXIV.Common.Component.BGCollision;
using Lumina.Excel.GeneratedSheets;
-using Newtonsoft.Json.Linq;
using RotationSolver.Basic.Configuration;
using RotationSolver.Data;
using RotationSolver.Helpers;
@@ -647,18 +646,6 @@ private static void DrawAbout()
}
}
- var sayHelloCount = OtherConfiguration.RotationSolverRecord.SayingHelloCount;
- if (sayHelloCount > 0)
- {
- using var color = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.2f, 0.8f, 0.95f, 1));
- var countStr = string.Format(LocalizationManager.RightLang.ConfigWindow_About_SayHelloCount, sayHelloCount);
-
- ImGuiHelper.DrawItemMiddle(() =>
- {
- ImGui.TextWrapped(countStr);
- }, width, ImGui.CalcTextSize(countStr).X);
- }
-
_aboutHeaders.Draw();
}
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index 3e43424b0..3455b7014 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -1,15 +1,11 @@
using Dalamud.Game.ClientState.Keys;
using Dalamud.Interface.Colors;
-using Dalamud.Utility;
-using ECommons.GameHelpers;
using ECommons.ImGuiMethods;
using RotationSolver.Basic.Configuration;
using RotationSolver.Basic.Configuration.Conditions;
-using RotationSolver.Helpers;
using RotationSolver.Localization;
using RotationSolver.UI.SearchableConfigs;
using RotationSolver.UI.SearchableSettings;
-using RotationSolver.Updaters;
namespace RotationSolver.UI;
diff --git a/RotationSolver/Updaters/ActionUpdater.cs b/RotationSolver/Updaters/ActionUpdater.cs
index 714c9c808..0515d1e8a 100644
--- a/RotationSolver/Updaters/ActionUpdater.cs
+++ b/RotationSolver/Updaters/ActionUpdater.cs
@@ -32,6 +32,7 @@ internal static void UpdateNextAction()
{
PlayerCharacter localPlayer = Player.Object;
var customRotation = DataCenter.RightNowRotation;
+ if (!DataCenter.IsManual && !DataCenter.State) return;
try
{
diff --git a/RotationSolver/Updaters/MajorUpdater.cs b/RotationSolver/Updaters/MajorUpdater.cs
index 33b0cea5e..49fb5dd63 100644
--- a/RotationSolver/Updaters/MajorUpdater.cs
+++ b/RotationSolver/Updaters/MajorUpdater.cs
@@ -1,9 +1,6 @@
using Dalamud.Game.ClientState.Conditions;
using Dalamud.Game.ClientState.Objects.Enums;
-using Dalamud.Game.Text.SeStringHandling;
-using Dalamud.Game.Text.SeStringHandling.Payloads;
using Dalamud.Plugin.Services;
-using Dalamud.Utility;
using ECommons.DalamudServices;
using ECommons.GameHelpers;
using ECommons.ImGuiMethods;
@@ -112,32 +109,6 @@ private unsafe static void FrameworkUpdate(IFramework framework)
private static void ShowWarning()
{
- if ((int)Svc.ClientState.ClientLanguage == 4)
- {
- var warning = "Rotation Solver 未进行国服适配并不提供相关支持! 建议使用国服的插件,如:";
- Svc.Toasts.ShowError(warning + "AE Assist 2.0!");
-
- var seString = new SeString(new TextPayload(warning),
- Svc.PluginInterface.AddChatLinkHandler(2, (id, str) =>
- {
- if (id == 2)
- {
- Util.OpenLink("http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=EyT0BfZWCVq8v2yiMjSqcb4lEqYuaF_P&authKey=UJFoVZ3OljlBhSilXpeLKIIzofI4ZUjJfjuqCgr%2BiaT3Y6HmQFVbXZ5xBOlSv5yZ&noverify=0&group_code=552689154");
- }
- }),
- new UIForegroundPayload(31),
- new TextPayload("AE Assist 2.0"),
- UIForegroundPayload.UIForegroundOff,
- RawPayload.LinkTerminator,
- new TextPayload("!"));
-
- Svc.Chat.Print(new Dalamud.Game.Text.XivChatEntry()
- {
- Message = seString,
- Type = Dalamud.Game.Text.XivChatType.ErrorMessage,
- });
- }
-
if (!Svc.PluginInterface.InstalledPlugins.Any(p => p.InternalName == "Avarice"))
{
LocalizationManager.RightLang.AvariceWarning.ShowWarning(0);
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 416dd3ab4..eb2a6b356 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -7,7 +7,6 @@
using FFXIVClientStructs.FFXIV.Client.UI;
using Lumina.Excel.GeneratedSheets;
using RotationSolver.Basic.Configuration;
-using RotationSolver.Helpers;
using System.Text.RegularExpressions;
using Action = Lumina.Excel.GeneratedSheets.Action;
From bebf84608957ee1f3a5be7932dbb67ae8e915dfd Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Wed, 10 Jan 2024 17:03:08 +0000
Subject: [PATCH 31/73] dtr clicky
---
RotationSolver/Commands/RSCommands_Actions.cs | 8 ++++++++
RotationSolver/Updaters/MajorUpdater.cs | 10 ++++++----
RotationSolver/Updaters/PreviewUpdater.cs | 2 ++
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/RotationSolver/Commands/RSCommands_Actions.cs b/RotationSolver/Commands/RSCommands_Actions.cs
index f19040d2b..349b57fdb 100644
--- a/RotationSolver/Commands/RSCommands_Actions.cs
+++ b/RotationSolver/Commands/RSCommands_Actions.cs
@@ -125,6 +125,14 @@ internal static void CancelState()
if (DataCenter.State) DoStateCommandType(StateCommandType.Cancel);
}
+ public static void IncrementState()
+ {
+ if (!DataCenter.State) { DoStateCommandType(StateCommandType.Auto); return; }
+ if (DataCenter.State && !DataCenter.IsManual && DataCenter.TargetingType == TargetingType.Big) { DoStateCommandType(StateCommandType.Auto); return; }
+ if (DataCenter.State && !DataCenter.IsManual) { DoStateCommandType(StateCommandType.Manual); return; }
+ if (DataCenter.State && DataCenter.IsManual) { DoStateCommandType(StateCommandType.Cancel); return; }
+ }
+
static float _lastCountdownTime = 0;
internal static void UpdateRotationState()
{
diff --git a/RotationSolver/Updaters/MajorUpdater.cs b/RotationSolver/Updaters/MajorUpdater.cs
index 49fb5dd63..c085937f0 100644
--- a/RotationSolver/Updaters/MajorUpdater.cs
+++ b/RotationSolver/Updaters/MajorUpdater.cs
@@ -144,8 +144,6 @@ private static void UpdateWork()
try
{
- TargetUpdater.UpdateTarget();
-
if (Service.Config.GetValue(PluginConfigBool.AutoLoadCustomRotations))
{
RotationUpdater.LocalRotationWatcher();
@@ -153,8 +151,12 @@ private static void UpdateWork()
RotationUpdater.UpdateRotation();
- ActionSequencerUpdater.UpdateActionSequencerAction();
- ActionUpdater.UpdateNextAction();
+ if (DataCenter.IsManual || DataCenter.State)
+ {
+ TargetUpdater.UpdateTarget();
+ ActionSequencerUpdater.UpdateActionSequencerAction();
+ ActionUpdater.UpdateNextAction();
+ }
RSCommands.UpdateRotationState();
PainterManager.UpdateSettings();
diff --git a/RotationSolver/Updaters/PreviewUpdater.cs b/RotationSolver/Updaters/PreviewUpdater.cs
index f9a410e39..ed99499f0 100644
--- a/RotationSolver/Updaters/PreviewUpdater.cs
+++ b/RotationSolver/Updaters/PreviewUpdater.cs
@@ -8,6 +8,7 @@
using FFXIVClientStructs.FFXIV.Client.UI;
using FFXIVClientStructs.FFXIV.Client.UI.Misc;
using RotationSolver.Commands;
+using System.Formats.Tar;
namespace RotationSolver.Updaters;
@@ -41,6 +42,7 @@ private static void UpdateEntry()
new IconPayload(BitmapFontIcon.DPS),
new TextPayload(showStr)
);
+ _dtrEntry.OnClick = RSCommands.IncrementState;
}
else if (_dtrEntry != null && _dtrEntry.Shown)
{
From 6b32080393d02dca005506a0964724db38977ebb Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Thu, 11 Jan 2024 12:17:00 +0000
Subject: [PATCH 32/73] logging for disappearing dead people
---
RotationSolver.Basic/Helpers/ObjectHelper.cs | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs
index 0e9848e2a..2d0e600b1 100644
--- a/RotationSolver.Basic/Helpers/ObjectHelper.cs
+++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs
@@ -1,4 +1,5 @@
using Dalamud.Game.ClientState.Objects.Enums;
+using ECommons.DalamudServices;
using ECommons.GameFunctions;
using ECommons.GameHelpers;
using FFXIVClientStructs.FFXIV.Client.Game;
@@ -66,9 +67,22 @@ public static unsafe bool IsEnemy(this GameObject obj)
///
///
public static unsafe bool IsAlliance(this GameObject obj)
- => obj != null
- && (ActionManager.CanUseActionOnTarget((uint)ActionID.Cure, obj.Struct())
- || ActionManager.CanUseActionOnTarget((uint)ActionID.Raise1, obj.Struct()));
+ {
+ try
+ {
+ if (obj == null)
+ return false;
+
+ return ActionManager.CanUseActionOnTarget((uint)ActionID.Cure, obj.Struct())
+ || ActionManager.CanUseActionOnTarget((uint)ActionID.Raise1, obj.Struct());
+ }
+ catch (Exception ex)
+ {
+ // Log or print the exception details for debugging
+ Svc.Log.Error($"Exception in {nameof(IsAlliance)}: {ex}");
+ throw; // Rethrow the exception to maintain the original exception flow
+ }
+ }
///
/// Get the object kind.
From 5487af2520c51c7929e111d521b4ed8d9c57ea77 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Fri, 12 Jan 2024 14:38:15 +0000
Subject: [PATCH 33/73] remove rotations button
---
RotationSolver.Basic/Service.cs | 2 +-
RotationSolver/Localization/Localization.json | 1 -
RotationSolver/Localization/Strings.cs | 1 -
RotationSolver/Localization/de.json | 1 -
RotationSolver/Localization/es.json | 1 -
RotationSolver/Localization/fr.json | 1 -
RotationSolver/Localization/ja.json | 1 -
RotationSolver/Localization/zh.json | 1 -
RotationSolver/UI/RotationConfigWindow.cs | 10 ----------
9 files changed, 1 insertion(+), 18 deletions(-)
diff --git a/RotationSolver.Basic/Service.cs b/RotationSolver.Basic/Service.cs
index 3adbb7fbb..1bd374b68 100644
--- a/RotationSolver.Basic/Service.cs
+++ b/RotationSolver.Basic/Service.cs
@@ -9,7 +9,7 @@ namespace RotationSolver.Basic;
internal class Service : IDisposable
{
- public const string COMMAND = "/rotation", USERNAME = "ArchiDog1998", REPO = "RotationSolver";
+ public const string COMMAND = "/rotation", USERNAME = "croizat", REPO = "RotationSolver";
// From https://GitHub.com/PunishXIV/Orbwalker/blame/master/Orbwalker/Memory.cs#L85-L87
[Signature("F3 0F 10 05 ?? ?? ?? ?? 0F 2E C6 0F 8A", ScanType = ScanType.StaticAddress, Fallibility = Fallibility.Infallible)]
diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json
index 0d4e1b878..67b82decc 100644
--- a/RotationSolver/Localization/Localization.json
+++ b/RotationSolver/Localization/Localization.json
@@ -569,7 +569,6 @@
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
"ConfigWindow_Rotations_Download": "Download Rotations",
- "ConfigWindow_Rotations_Links": "Links of the rotations online",
"ConfigWindow_Options_ForcedEnableCondition": "Use Forced Enable Condition",
"ConfigWindow_Options_ForcedEnableConditionDesc": "The conditions of forced to make it true.",
"ConfigWindow_Options_ForcedDisableCondition": "Use Forced Disable Condition",
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index 6d6c55487..fe7b78e8d 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -805,7 +805,6 @@ internal class Strings
public string ConfigWindow_About_ThanksToSupporters { get; set; } = "Many thanks to the sponsors.";
public string ConfigWindow_Rotations_Download { get; set; } = "Download Rotations";
- public string ConfigWindow_Rotations_Links { get; set; } = "Links of the rotations online";
public string ConfigWindow_Options_ForcedEnableCondition { get; set; } = "Use Forced Enable Condition";
public string ConfigWindow_Options_ForcedEnableConditionDesc { get; set; } = "The conditions of forced to make it true.";
diff --git a/RotationSolver/Localization/de.json b/RotationSolver/Localization/de.json
index fb81eddd1..ce67fe618 100644
--- a/RotationSolver/Localization/de.json
+++ b/RotationSolver/Localization/de.json
@@ -569,7 +569,6 @@
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
"ConfigWindow_Rotations_Download": "Download Rotations",
- "ConfigWindow_Rotations_Links": "Links of the rotations online",
"ConfigWindow_Options_ForcedEnableCondition": "Use Forced Enable Condition",
"ConfigWindow_Options_ForcedEnableConditionDesc": "The conditions of forced to make it true.",
"ConfigWindow_Options_ForcedDisableCondition": "Use Forced Disable Condition",
diff --git a/RotationSolver/Localization/es.json b/RotationSolver/Localization/es.json
index 9ae296680..54b5bdb4c 100644
--- a/RotationSolver/Localization/es.json
+++ b/RotationSolver/Localization/es.json
@@ -569,7 +569,6 @@
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
"ConfigWindow_Rotations_Download": "Download Rotations",
- "ConfigWindow_Rotations_Links": "Links of the rotations online",
"ConfigWindow_Options_ForcedEnableCondition": "Use Forced Enable Condition",
"ConfigWindow_Options_ForcedEnableConditionDesc": "The conditions of forced to make it true.",
"ConfigWindow_Options_ForcedDisableCondition": "Use Forced Disable Condition",
diff --git a/RotationSolver/Localization/fr.json b/RotationSolver/Localization/fr.json
index 3e10d1f6f..f3f79ce3c 100644
--- a/RotationSolver/Localization/fr.json
+++ b/RotationSolver/Localization/fr.json
@@ -569,7 +569,6 @@
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
"ConfigWindow_Rotations_Download": "Download Rotations",
- "ConfigWindow_Rotations_Links": "Links of the rotations online",
"ConfigWindow_Options_ForcedEnableCondition": "Use Forced Enable Condition",
"ConfigWindow_Options_ForcedEnableConditionDesc": "The conditions of forced to make it true.",
"ConfigWindow_Options_ForcedDisableCondition": "Use Forced Disable Condition",
diff --git a/RotationSolver/Localization/ja.json b/RotationSolver/Localization/ja.json
index 24ca55c2b..3e4ece296 100644
--- a/RotationSolver/Localization/ja.json
+++ b/RotationSolver/Localization/ja.json
@@ -569,7 +569,6 @@
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
"ConfigWindow_Rotations_Download": "ローテーションをダウンロード",
- "ConfigWindow_Rotations_Links": "Links of the rotations online",
"ConfigWindow_Options_ForcedEnableCondition": "Use Forced Enable Condition",
"ConfigWindow_Options_ForcedEnableConditionDesc": "The conditions of forced to make it true.",
"ConfigWindow_Options_ForcedDisableCondition": "Use Forced Disable Condition",
diff --git a/RotationSolver/Localization/zh.json b/RotationSolver/Localization/zh.json
index 5c859e6df..f0f961acb 100644
--- a/RotationSolver/Localization/zh.json
+++ b/RotationSolver/Localization/zh.json
@@ -569,7 +569,6 @@
"ConfigWindow_About_Clicking500k": "You're tiring RS out, give it a break!",
"ConfigWindow_About_ThanksToSupporters": "Many thanks to the sponsors.",
"ConfigWindow_Rotations_Download": "Download Rotations",
- "ConfigWindow_Rotations_Links": "Links of the rotations online",
"ConfigWindow_Options_ForcedEnableCondition": "Use Forced Enable Condition",
"ConfigWindow_Options_ForcedEnableConditionDesc": "The conditions of forced to make it true.",
"ConfigWindow_Options_ForcedDisableCondition": "Use Forced Disable Condition",
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index 163debfb8..5095b54ab 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -1534,16 +1534,6 @@ private static void DrawRotations()
}
}, width, textWidth);
- text = LocalizationManager.RightLang.ConfigWindow_Rotations_Links;
- textWidth = ImGuiHelpers.GetButtonSize(text).X;
- ImGuiHelper.DrawItemMiddle(() =>
- {
- if (ImGui.Button(text))
- {
- Util.OpenLink($"https://github.com/{Service.USERNAME}/{Service.REPO}/blob/main/RotationsLink.md");
- }
- }, width, textWidth);
-
_rotationsHeader?.Draw();
}
private static readonly CollapsingHeaderGroup _rotationsHeader = new(new()
From 05babe568423f7b5399a75f78cf78d47384f8323 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Thu, 18 Jan 2024 16:02:27 -0600
Subject: [PATCH 34/73] Update downloadList.json
lets do this right this time
---
Resources/downloadList.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/Resources/downloadList.json b/Resources/downloadList.json
index c9384a524..90829835e 100644
--- a/Resources/downloadList.json
+++ b/Resources/downloadList.json
@@ -3,4 +3,5 @@
"IncognitoWater|IncognitoWaterRotations|IcWaRotations",
"thunderebolt|BoltsRotations|BoltsRotations",
"BrakusTapus|KirboRotations|KirboRotations"
+ "LTS-FFXIV|LTSRotatos|LTSRotatos"
]
From 8c15e063f58c2645d3151c40ea9fdbdf2d6ffeff Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 13:24:23 -0600
Subject: [PATCH 35/73] Update downloadList.json
Adding KGKirbo rotations, known good archived rotation
---
Resources/downloadList.json | 1 +
1 file changed, 1 insertion(+)
diff --git a/Resources/downloadList.json b/Resources/downloadList.json
index 90829835e..5285125dc 100644
--- a/Resources/downloadList.json
+++ b/Resources/downloadList.json
@@ -4,4 +4,5 @@
"thunderebolt|BoltsRotations|BoltsRotations",
"BrakusTapus|KirboRotations|KirboRotations"
"LTS-FFXIV|LTSRotatos|LTSRotatos"
+ "LTS-FFXIV|LTSRotatos|KG.Kirbo"
]
From 3c2b9324e285e0a3624eec37a66d8975f8dc175f Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 19:24:38 -0600
Subject: [PATCH 36/73] Update downloadList.json
---
Resources/downloadList.json | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Resources/downloadList.json b/Resources/downloadList.json
index 5285125dc..bdf1e834e 100644
--- a/Resources/downloadList.json
+++ b/Resources/downloadList.json
@@ -1,8 +1,7 @@
[
"ArchiDog1998|FFXIVRotations|DefaultRotations",
"IncognitoWater|IncognitoWaterRotations|IcWaRotations",
- "thunderebolt|BoltsRotations|BoltsRotations",
- "BrakusTapus|KirboRotations|KirboRotations"
- "LTS-FFXIV|LTSRotatos|LTSRotatos"
+ "BrakusTapus|KirboRotations|KirboRotations",
+ "LTS-FFXIV|LTSRotatos|LTSRotatos",
"LTS-FFXIV|LTSRotatos|KG.Kirbo"
]
From 1928827182f08c736e19432d15ae2d9e9377e0c9 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 21:37:51 -0600
Subject: [PATCH 37/73] Create release-please.yml
---
.github/workflows/release-please.yml | 87 ++++++++++++++++++++++++++++
1 file changed, 87 insertions(+)
create mode 100644 .github/workflows/release-please.yml
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
new file mode 100644
index 000000000..27b2c621d
--- /dev/null
+++ b/.github/workflows/release-please.yml
@@ -0,0 +1,87 @@
+on:
+ push:
+ branches:
+ - release
+name: release-please
+jobs:
+ release-please:
+ name : releasePlz
+ runs-on: ubuntu-latest
+ outputs:
+ released: ${{ steps.rp.outputs.releases_created }}
+ upload_url: ${{ steps.rp.outputs.upload_url }}
+ steps:
+ - id: rp
+ uses: google-github-actions/release-please-action@v3
+ with:
+ release-type: node
+ package-name: release-please-action
+ default-branch: release
+
+ build:
+ name : build
+ needs: release-please
+ if: ${{ needs.release-please.outputs.released }}
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Set up .NET
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: 7.0.x
+
+ - name: Restore Dependencies
+ run: dotnet restore
+
+ - name: Download Dalamud
+ run: |
+ Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip
+ Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
+
+ - name: Build Plugin
+ run: |
+ invoke-expression 'dotnet build --no-restore --configuration Release RotationSolver'
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v3
+ with:
+ path: .\RotationSolver\bin\Release\net7.0-windows\RotationSolver\
+
+ - name: publish on version change
+ id: publish_nuget
+ uses: alirezanet/publish-nuget@v3.0.4
+ with:
+ PROJECT_FILE_PATH: RotationSolver.Basic/RotationSolver.Basic.csproj
+ VERSION_FILE_PATH: Directory.Build.props
+ NUGET_KEY: ${{secrets.nuget_api_key}}
+
+ release:
+ name: release
+ needs: [release-please, build]
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Download Build Artifact
+ uses: actions/download-artifact@v3
+
+ - name: Upload Release Asset
+ uses: actions/upload-release-asset@v1
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ upload_url: ${{ needs.release-please.outputs.upload_url }}
+ asset_path: artifact/latest.zip
+ asset_name: latest.zip
+ asset_content_type: application/zip
+
+ - name: Trigger Repo Update
+ uses: peter-evans/repository-dispatch@v2
+ with:
+ token: ${{ secrets.PAT }}
+ repository: ${{ github.repository_owner }}/Dalamud_Plugins
+ event-type: new-release
From 1597bd87f7869aef56cb488a12f6bdedc7e688f1 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 22:08:04 -0600
Subject: [PATCH 38/73] Delete .github/workflows/release-please.yml
---
.github/workflows/release-please.yml | 87 ----------------------------
1 file changed, 87 deletions(-)
delete mode 100644 .github/workflows/release-please.yml
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
deleted file mode 100644
index 27b2c621d..000000000
--- a/.github/workflows/release-please.yml
+++ /dev/null
@@ -1,87 +0,0 @@
-on:
- push:
- branches:
- - release
-name: release-please
-jobs:
- release-please:
- name : releasePlz
- runs-on: ubuntu-latest
- outputs:
- released: ${{ steps.rp.outputs.releases_created }}
- upload_url: ${{ steps.rp.outputs.upload_url }}
- steps:
- - id: rp
- uses: google-github-actions/release-please-action@v3
- with:
- release-type: node
- package-name: release-please-action
- default-branch: release
-
- build:
- name : build
- needs: release-please
- if: ${{ needs.release-please.outputs.released }}
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v4
- with:
- submodules: recursive
-
- - name: Set up .NET
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: 7.0.x
-
- - name: Restore Dependencies
- run: dotnet restore
-
- - name: Download Dalamud
- run: |
- Invoke-WebRequest -Uri https://goatcorp.github.io/dalamud-distrib/latest.zip -OutFile latest.zip
- Expand-Archive -Force latest.zip "$env:AppData\XIVLauncher\addon\Hooks\dev"
-
- - name: Build Plugin
- run: |
- invoke-expression 'dotnet build --no-restore --configuration Release RotationSolver'
-
- - name: Upload Artifact
- uses: actions/upload-artifact@v3
- with:
- path: .\RotationSolver\bin\Release\net7.0-windows\RotationSolver\
-
- - name: publish on version change
- id: publish_nuget
- uses: alirezanet/publish-nuget@v3.0.4
- with:
- PROJECT_FILE_PATH: RotationSolver.Basic/RotationSolver.Basic.csproj
- VERSION_FILE_PATH: Directory.Build.props
- NUGET_KEY: ${{secrets.nuget_api_key}}
-
- release:
- name: release
- needs: [release-please, build]
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v4
-
- - name: Download Build Artifact
- uses: actions/download-artifact@v3
-
- - name: Upload Release Asset
- uses: actions/upload-release-asset@v1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ needs.release-please.outputs.upload_url }}
- asset_path: artifact/latest.zip
- asset_name: latest.zip
- asset_content_type: application/zip
-
- - name: Trigger Repo Update
- uses: peter-evans/repository-dispatch@v2
- with:
- token: ${{ secrets.PAT }}
- repository: ${{ github.repository_owner }}/Dalamud_Plugins
- event-type: new-release
From 278d175fdde820e6ceb597db0b5b3e7956f31bd8 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Fri, 19 Jan 2024 23:40:03 -0600
Subject: [PATCH 39/73] Update DownloadHelper.cs
corrected URL navigation for helper, should now pull up to date list
---
RotationSolver/Helpers/DownloadHelper.cs | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/RotationSolver/Helpers/DownloadHelper.cs b/RotationSolver/Helpers/DownloadHelper.cs
index af2d5eb35..ac3e81403 100644
--- a/RotationSolver/Helpers/DownloadHelper.cs
+++ b/RotationSolver/Helpers/DownloadHelper.cs
@@ -13,14 +13,14 @@ public static class DownloadHelper
public static async Task DownloadAsync()
{
- LinkLibraries = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/downloadList.json") ?? Array.Empty();
- IncompatiblePlugins = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/IncompatiblePlugins.json") ?? Array.Empty();
+ LinkLibraries = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver//main/Resources/downloadList.json") ?? Array.Empty();
+ IncompatiblePlugins = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/main/Resources/IncompatiblePlugins.json") ?? Array.Empty();
- ContributorsHash = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/ContributorsHash.json") ?? Array.Empty();
+ ContributorsHash = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver//main/Resources/ContributorsHash.json") ?? Array.Empty();
- UsersHash = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/UsersHash.json") ?? Array.Empty();
+ UsersHash = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/main/Resources/UsersHash.json") ?? Array.Empty();
- Supporters = await DownloadOneAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/Supporters.json") ?? Array.Empty();
+ Supporters = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/main/Resources/Supporters.json") ?? Array.Empty();
}
private static async Task DownloadOneAsync(string url)
From a6c2ea8709f2e33a4e221d911eedccb629bd0d70 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Sat, 20 Jan 2024 10:46:17 +0000
Subject: [PATCH 40/73] fix repo
---
RotationSolver.Basic/Service.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Service.cs b/RotationSolver.Basic/Service.cs
index 1bd374b68..212477a66 100644
--- a/RotationSolver.Basic/Service.cs
+++ b/RotationSolver.Basic/Service.cs
@@ -9,7 +9,7 @@ namespace RotationSolver.Basic;
internal class Service : IDisposable
{
- public const string COMMAND = "/rotation", USERNAME = "croizat", REPO = "RotationSolver";
+ public const string COMMAND = "/rotation", USERNAME = "Jaksuhn", REPO = "RotationSolver";
// From https://GitHub.com/PunishXIV/Orbwalker/blame/master/Orbwalker/Memory.cs#L85-L87
[Signature("F3 0F 10 05 ?? ?? ?? ?? 0F 2E C6 0F 8A", ScanType = ScanType.StaticAddress, Fallibility = Fallibility.Infallible)]
From 00974a31d3fd17e608e3e2212ec534e16cb8a963 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Sat, 20 Jan 2024 11:34:56 +0000
Subject: [PATCH 41/73] dead fix attempt + logging
---
RotationSolver.Basic/Helpers/ObjectHelper.cs | 3 +
RotationSolver.Basic/Helpers/TargetFilter.cs | 8 +-
RotationSolver/Updaters/TargetUpdater.cs | 110 +++++++++++--------
3 files changed, 74 insertions(+), 47 deletions(-)
diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs
index 2d0e600b1..3067752f7 100644
--- a/RotationSolver.Basic/Helpers/ObjectHelper.cs
+++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs
@@ -71,7 +71,10 @@ public static unsafe bool IsAlliance(this GameObject obj)
try
{
if (obj == null)
+ {
+ Svc.Log.Debug($"{nameof(IsAlliance)}: GameObject is null.");
return false;
+ }
return ActionManager.CanUseActionOnTarget((uint)ActionID.Cure, obj.Struct())
|| ActionManager.CanUseActionOnTarget((uint)ActionID.Raise1, obj.Struct());
diff --git a/RotationSolver.Basic/Helpers/TargetFilter.cs b/RotationSolver.Basic/Helpers/TargetFilter.cs
index 374920879..15fd3d536 100644
--- a/RotationSolver.Basic/Helpers/TargetFilter.cs
+++ b/RotationSolver.Basic/Helpers/TargetFilter.cs
@@ -1,4 +1,5 @@
using ECommons.DalamudServices;
+using ECommons.GameFunctions;
using ECommons.GameHelpers;
using Lumina.Excel.GeneratedSheets;
using RotationSolver.Basic.Configuration;
@@ -256,7 +257,11 @@ internal static BattleChara GetDeathPeople(IEnumerable deathAll, IE
///
public unsafe static IEnumerable GetDeath(this IEnumerable charas) => charas.Where(item =>
{
- if (item == null) return false;
+ if (item == null || item.Character() == null)
+ {
+ Svc.Log.Warning($"{nameof(GetDeath)}: Invalid BattleChara or Character.");
+ return false;
+ }
if (!item.IsDead) return false;
if (item.CurrentHp != 0) return false;
@@ -266,6 +271,7 @@ public unsafe static IEnumerable GetDeath(this IEnumerable c.CastTargetObjectId == item.ObjectId)) return false;
return true;
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 6d3f27163..405f47687 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -1,5 +1,6 @@
using Dalamud.Game.ClientState.Objects.Enums;
using Dalamud.Game.ClientState.Objects.SubKinds;
+using ECommons;
using ECommons.DalamudServices;
using ECommons.ExcelServices;
using ECommons.GameFunctions;
@@ -16,14 +17,22 @@ internal static partial class TargetUpdater
{
internal unsafe static void UpdateTarget()
{
- DataCenter.AllTargets = Svc.Objects.GetObjectInRadius(30);
- var battles = DataCenter.AllTargets.OfType();
- UpdateHostileTargets(battles);
- UpdateFriends(battles
- .Where(b => b.Character()->CharacterData.OnlineStatus != 15 //Removed the one watching cutscene.
- && b.IsTargetable //Removed the one can't target.
- ));
- UpdateNamePlate(Svc.Objects.OfType());
+ try
+ {
+ DataCenter.AllTargets = Svc.Objects.GetObjectInRadius(30);
+ var battles = DataCenter.AllTargets.OfType();
+ UpdateHostileTargets(battles);
+ UpdateFriends(battles
+ .Where(b => b.Character()->CharacterData.OnlineStatus != 15 //Removed the one watching cutscene.
+ && b.IsTargetable //Removed the one can't target.
+ ));
+ UpdateNamePlate(Svc.Objects.OfType());
+ }
+ catch (Exception ex)
+ {
+ ex.Log($"Exception in {nameof(UpdateTarget)}");
+ // Rethrow the exception if necessary
+ }
}
private static DateTime _lastUpdateTimeToKill = DateTime.MinValue;
@@ -311,58 +320,67 @@ private static bool IsHostileCastingBase(BattleChara h, Func check
private static uint _lastMp = 0;
private unsafe static void UpdateFriends(IEnumerable allTargets)
{
- DataCenter.PartyMembers = GetPartyMembers(allTargets);
- DataCenter.AllianceMembers = allTargets.Where(ObjectHelper.IsAlliance);
+ try
+ {
+ Svc.Log.Debug($"{nameof(UpdateFriends)}: Total targets count: {allTargets.Count()}");
+ DataCenter.PartyMembers = GetPartyMembers(allTargets);
+ DataCenter.AllianceMembers = allTargets?.Where(ObjectHelper.IsAlliance) ?? Enumerable.Empty();
- var mayPet = allTargets.OfType().Where(npc => npc.OwnerId == Player.Object.ObjectId);
- DataCenter.HasPet = mayPet.Any(npc => npc.BattleNpcKind == BattleNpcSubKind.Pet);
- //DataCenter.HasPet = HasPet();
+ var mayPet = allTargets.OfType().Where(npc => npc.OwnerId == Player.Object.ObjectId);
+ DataCenter.HasPet = mayPet.Any(npc => npc.BattleNpcKind == BattleNpcSubKind.Pet);
+ //DataCenter.HasPet = HasPet();
- DataCenter.PartyTanks = DataCenter.PartyMembers.GetJobCategory(JobRole.Tank);
- DataCenter.PartyHealers = DataCenter.PartyMembers.GetJobCategory(JobRole.Healer);
- DataCenter.AllianceTanks = DataCenter.AllianceMembers.GetJobCategory(JobRole.Tank);
+ DataCenter.PartyTanks = DataCenter.PartyMembers.GetJobCategory(JobRole.Tank);
+ DataCenter.PartyHealers = DataCenter.PartyMembers.GetJobCategory(JobRole.Healer);
+ DataCenter.AllianceTanks = DataCenter.AllianceMembers.GetJobCategory(JobRole.Tank);
- var deathAll = DataCenter.AllianceMembers.GetDeath();
- var deathParty = DataCenter.PartyMembers.GetDeath();
- MaintainDeathPeople(ref deathAll, ref deathParty);
- DataCenter.DeathPeopleAll.Delay(deathAll);
- DataCenter.DeathPeopleParty.Delay(deathParty);
+ var deathAll = DataCenter.AllianceMembers.GetDeath();
+ var deathParty = DataCenter.PartyMembers.GetDeath();
+ MaintainDeathPeople(ref deathAll, ref deathParty);
+ DataCenter.DeathPeopleAll.Delay(deathAll);
+ DataCenter.DeathPeopleParty.Delay(deathParty);
- DataCenter.WeakenPeople.Delay(DataCenter.PartyMembers.Where(p => p.StatusList.Any(StatusHelper.CanDispel)));
- DataCenter.DyingPeople = DataCenter.WeakenPeople.Where(p => p.StatusList.Any(StatusHelper.IsDangerous));
+ DataCenter.WeakenPeople.Delay(DataCenter.PartyMembers.Where(p => p.StatusList.Any(StatusHelper.CanDispel)));
+ DataCenter.DyingPeople = DataCenter.WeakenPeople.Where(p => p.StatusList.Any(StatusHelper.IsDangerous));
- DataCenter.RefinedHP = DataCenter.PartyMembers
- .ToDictionary(p => p.ObjectId, GetPartyMemberHPRatio);
- DataCenter.PartyMembersHP = DataCenter.RefinedHP.Values.Where(r => r > 0);
+ DataCenter.RefinedHP = DataCenter.PartyMembers
+ .ToDictionary(p => p.ObjectId, GetPartyMemberHPRatio);
+ DataCenter.PartyMembersHP = DataCenter.RefinedHP.Values.Where(r => r > 0);
- if (DataCenter.PartyMembersHP.Any())
- {
- DataCenter.PartyMembersAverHP = DataCenter.PartyMembersHP.Average();
- DataCenter.PartyMembersDifferHP = (float)Math.Sqrt(DataCenter.PartyMembersHP.Average(d => Math.Pow(d - DataCenter.PartyMembersAverHP, 2)));
- }
- else
- {
- DataCenter.PartyMembersAverHP = DataCenter.PartyMembersDifferHP = 0;
- }
+ if (DataCenter.PartyMembersHP.Any())
+ {
+ DataCenter.PartyMembersAverHP = DataCenter.PartyMembersHP.Average();
+ DataCenter.PartyMembersDifferHP = (float)Math.Sqrt(DataCenter.PartyMembersHP.Average(d => Math.Pow(d - DataCenter.PartyMembersAverHP, 2)));
+ }
+ else
+ {
+ DataCenter.PartyMembersAverHP = DataCenter.PartyMembersDifferHP = 0;
+ }
- UpdateCanHeal(Player.Object);
+ UpdateCanHeal(Player.Object);
- _lastHp = DataCenter.PartyMembers.ToDictionary(p => p.ObjectId, p => p.CurrentHp);
+ _lastHp = DataCenter.PartyMembers.ToDictionary(p => p.ObjectId, p => p.CurrentHp);
- if (DataCenter.InEffectTime)
- {
- var rightMp = Player.Object.CurrentMp;
- if (rightMp - _lastMp == DataCenter.MPGain)
+ if (DataCenter.InEffectTime)
+ {
+ var rightMp = Player.Object.CurrentMp;
+ if (rightMp - _lastMp == DataCenter.MPGain)
+ {
+ DataCenter.MPGain = 0;
+ }
+ DataCenter.CurrentMp = Math.Min(10000, Player.Object.CurrentMp + DataCenter.MPGain);
+ }
+ else
{
- DataCenter.MPGain = 0;
+ DataCenter.CurrentMp = Player.Object.CurrentMp;
}
- DataCenter.CurrentMp = Math.Min(10000, Player.Object.CurrentMp + DataCenter.MPGain);
+ _lastMp = Player.Object.CurrentMp;
+ Svc.Log.Debug($"{nameof(UpdateFriends)}: Successful update");
}
- else
+ catch (Exception ex)
{
- DataCenter.CurrentMp = Player.Object.CurrentMp;
+ ex.Log($"Exception in {nameof(UpdateFriends)}");
}
- _lastMp = Player.Object.CurrentMp;
}
private static float GetPartyMemberHPRatio(BattleChara member)
From d919859903f932e023c3ef404c8f042beeed9482 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Sat, 20 Jan 2024 11:35:20 +0000
Subject: [PATCH 42/73] removed old ui
---
RotationSolver/UI/RotationConfigWindow.cs | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index 5095b54ab..aa1866d05 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -802,20 +802,9 @@ private static void DrawAboutLinks()
Util.OpenLink("https://crowdin.com/project/rotationsolver");
}
- var text = "My story about FFXIV and Rotation Solver\n - ArchiTed / Youtube";
+ var text = LocalizationManager.RightLang.ConfigWindow_About_OpenConfigFolder;
var textWidth = ImGuiHelpers.GetButtonSize(text).X;
ImGuiHelper.DrawItemMiddle(() =>
- {
- if (ImGui.Button(text))
- {
- Util.OpenLink("https://www.youtube.com/watch?v=Adigd5uqDx4");
- }
- }, width, textWidth);
-
-
- text = LocalizationManager.RightLang.ConfigWindow_About_OpenConfigFolder;
- textWidth = ImGuiHelpers.GetButtonSize(text).X;
- ImGuiHelper.DrawItemMiddle(() =>
{
if (ImGui.Button(text))
{
From 7b7a07975cc3b38ca16ed7044d515a17e1e41117 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Sat, 20 Jan 2024 07:18:32 -0600
Subject: [PATCH 43/73] Update RotationConfigWindow.cs
Remove button
---
RotationSolver/UI/RotationConfigWindow.cs | 22 +---------------------
1 file changed, 1 insertion(+), 21 deletions(-)
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index b7d5813b7..4f0db80cf 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -268,26 +268,6 @@ private void DrawSideBar()
}
}
}
-
- if (wholeWidth <= 60 * Scale
- ? IconSet.GetTexture("https://storage.ko-fi.com/cdn/brandasset/kofi_s_logo_nolabel.png", out var texture)
- : IconSet.GetTexture("https://storage.ko-fi.com/cdn/brandasset/kofi_bg_tag_dark.png", out texture))
- {
- var width = Math.Min(150 * Scale, Math.Max(Scale * MIN_COLUMN_WIDTH, Math.Min(wholeWidth, texture.Width)));
- var size = new Vector2(width, width * texture.Height / texture.Width);
- size *= MathF.Max(Scale * MIN_COLUMN_WIDTH / size.Y, 1);
- var result = false;
- ImGuiHelper.DrawItemMiddle(() =>
- {
- ImGui.SetCursorPosY(ImGui.GetWindowSize().Y + ImGui.GetScrollY() - size.Y);
- result = ImGuiHelper.NoPaddingNoColorImageButton(texture.ImGuiHandle, size, "Donate Plugin");
- }, wholeWidth, size.X);
-
- if (result)
- {
- Util.OpenLink("https://ko-fi.com/B0B0IN5DX");
- }
- }
}
}
@@ -2520,4 +2500,4 @@ private static bool IsFailed()
|| windowSize.X - cursor.X <= min;
}
#endregion
-}
\ No newline at end of file
+}
From b0b7fa11b224034b26dab23a2b96250925d6b0d2 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Sat, 20 Jan 2024 07:19:32 -0600
Subject: [PATCH 44/73] Update Configs.cs
Update default configs to be a bit more user friendly (read pebkac) and disabling a lot of the UI stuff
---
RotationSolver.Basic/Configuration/Configs.cs | 26 +++++++++----------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 395d4e029..402750c64 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -266,15 +266,15 @@ public enum PluginConfigBool : byte
[Default(true)] AutoOffWhenDutyCompleted,
[Default(true)] ChangeTargetForFate,
[Default(true)] MoveTowardsScreenCenter,
- [Default(true)] SayOutStateChanged,
+ [Default(false)] SayOutStateChanged,
[Default(true)] ShowInfoOnDtr,
[Default(false)] HealOutOfCombat,
- [Default(true)] ShowInfoOnToast,
+ [Default(false)] ShowInfoOnToast,
[Default(false)] RaiseAll,
[Default(false)] PoslockCasting,
[Default(false)] PosPassageOfArms,
- [Default(true)] PosTenChiJin,
+ [Default(false)] PosTenChiJin,
[Default(false)] PosFlameThrower,
[Default(false)] PosImprovisation,
@@ -289,14 +289,14 @@ public enum PluginConfigBool : byte
[Default(true)] ShowMoveTarget,
[Default(false)] ShowTargetTimeToKill,
- [Default(true)] ShowTarget,
+ [Default(false)] ShowTarget,
[Default(true)] ChooseAttackMark,
[Default(true)] CanAttackMarkAOE,
[Default(true)] FilterStopMark,
- [Default(true)] ShowHostilesIcons,
+ [Default(false)] ShowHostilesIcons,
- [Default(true)] TeachingMode,
- [Default(true)] UseOverlayWindow,
+ [Default(false)] TeachingMode,
+ [Default(false)] UseOverlayWindow,
[Default(true)] KeyBoardNoise,
[Default(true)] MoveAreaActionFarthest,
@@ -323,10 +323,10 @@ public enum PluginConfigBool : byte
[Default(false)] ToggleManual,
[Default(false)] ToggleAuto,
- [Default(true)] OnlyShowWithHostileOrInDuty,
+ [Default(false)] OnlyShowWithHostileOrInDuty,
[Default(false)] ShowControlWindow,
[Default(false)] IsControlWindowLock,
- [Default(true)] ShowNextActionWindow,
+ [Default(false)] ShowNextActionWindow,
[Default(false)] IsInfoWindowNoInputs,
[Default(false)] IsInfoWindowNoMove,
[Default(false)] ShowItemsCooldown,
@@ -339,7 +339,7 @@ public enum PluginConfigBool : byte
[Default(true)] TargetFatePriority,
[Default(true)] TargetHuntingRelicLevePriority,
[Default(true)] TargetQuestPriority,
- [Default(true)] ShowToastsAboutDoAction,
+ [Default(false)] ShowToastsAboutDoAction,
[Default(true)] UseAOEAction,
[Default(false)] UseAOEWhenManual,
@@ -364,13 +364,13 @@ public enum PluginConfigBool : byte
[Default(true)] AutoCloseChestWindow,
[Default(true)] ShowStateIcon,
- [Default(true)] ShowBeneficialPositions,
+ [Default(false)] ShowBeneficialPositions,
[Default(false)] HideWarning,
[Default(true)] HealWhenNothingTodo,
[Default(true)] UseResourcesAction,
- [Default(true)] SayHelloToAll,
- [Default(true)] SayHelloToUsers,
+ [Default(false)] SayHelloToAll,
+ [Default(false)] SayHelloToUsers,
[Default(false)] JustSayHelloOnce,
[Default(false)] UseAdditionalConditions,
From a3dc79ae5d7819b6b112f617cdc6c957bebbbcad Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Sat, 20 Jan 2024 13:43:02 +0000
Subject: [PATCH 45/73] changed more defaults and gutted wrong action
---
.../Actions/BaseAction_BasicInfo.cs | 17 -------------
RotationSolver.Basic/Actions/IBaseAction.cs | 4 ----
RotationSolver.Basic/Configuration/Configs.cs | 7 ++----
RotationSolver/Commands/RSCommands_Actions.cs | 10 +-------
.../Localization/ConfigTranslation.cs | 1 -
RotationSolver/Localization/Localization.json | 3 ---
RotationSolver/Localization/Strings.cs | 4 ----
RotationSolver/Localization/de.json | 3 ---
RotationSolver/Localization/es.json | 3 ---
RotationSolver/Localization/fr.json | 3 ---
RotationSolver/Localization/ja.json | 3 ---
RotationSolver/Localization/zh.json | 3 ---
RotationSolver/UI/ControlWindow.cs | 11 ---------
RotationSolver/UI/RotationConfigWindow.cs | 10 --------
.../UI/RotationConfigWindow_Config.cs | 2 --
RotationSolver/Updaters/ActionUpdater.cs | 24 ++-----------------
16 files changed, 5 insertions(+), 103 deletions(-)
diff --git a/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs b/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
index f6042595b..55b88462b 100644
--- a/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_BasicInfo.cs
@@ -153,23 +153,6 @@ public bool IsInCooldown
}
}
- ///
- public bool IsInMistake
- {
- get => !Service.Config.GlobalConfig.NotInMistakeActions.Contains(ID);
- set
- {
- if (value)
- {
- Service.Config.GlobalConfig.NotInMistakeActions.Remove(ID);
- }
- else
- {
- Service.Config.GlobalConfig.NotInMistakeActions.Add(ID);
- }
- }
- }
-
///
/// Action ID.
///
diff --git a/RotationSolver.Basic/Actions/IBaseAction.cs b/RotationSolver.Basic/Actions/IBaseAction.cs
index 7f01d7d6a..a34a25f8a 100644
--- a/RotationSolver.Basic/Actions/IBaseAction.cs
+++ b/RotationSolver.Basic/Actions/IBaseAction.cs
@@ -5,10 +5,6 @@
///
public interface IBaseAction : IAction
{
- ///
- /// Is in the mistake actions.
- ///
- bool IsInMistake { get; set; }
///
/// Attack Type
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 424474ad2..0cb730dd4 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -229,7 +229,6 @@ public class GlobalConfig
public SortedSet DisabledJobs { get; private set; } = new();
public SortedSet DisabledActions { get; private set; } = new();
public SortedSet NotInCoolDownActions { get; private set; } = new();
- public SortedSet NotInMistakeActions { get; private set; } = new();
public SortedSet DisabledItems { get; private set; } = new();
public SortedSet NotInCoolDownItems { get; private set; } = new();
public List Events { get; private set; } = new();
@@ -260,8 +259,8 @@ public enum PluginConfigInt : byte
public enum PluginConfigBool : byte
{
[Default(true)] DrawIconAnimation,
- [Default(true)] AutoOffBetweenArea,
- [Default(true)] AutoOffCutScene,
+ [Default(false)] AutoOffBetweenArea,
+ [Default(false)] AutoOffCutScene,
[Default(true)] AutoOffWhenDead,
[Default(true)] AutoOffWhenDutyCompleted,
[Default(true)] ChangeTargetForFate,
@@ -397,8 +396,6 @@ public enum PluginConfigFloat : byte
[Default(0.8f, 0f, 1f), Unit(ConfigUnitType.Percent)] HealWhenNothingTodoBelow,
[Default(0.6f, 0f, 1f), Unit(ConfigUnitType.Pixels)] TargetIconSize,
- [Default(0f, 0f, 1f), Unit(ConfigUnitType.Percent)] MistakeRatio,
-
[Default(0.4f, 0f, 1f), Unit(ConfigUnitType.Percent)] HealthTankRatio,
[Default(0.4f, 0f, 1f), Unit(ConfigUnitType.Percent)] HealthHealerRatio,
diff --git a/RotationSolver/Commands/RSCommands_Actions.cs b/RotationSolver/Commands/RSCommands_Actions.cs
index 349b57fdb..8bada00cb 100644
--- a/RotationSolver/Commands/RSCommands_Actions.cs
+++ b/RotationSolver/Commands/RSCommands_Actions.cs
@@ -37,17 +37,9 @@ internal static unsafe bool CanDoAnAction(bool isGCD)
internal static uint _lastActionID;
public static void DoAction()
{
- var wrong = new Random().NextDouble() < Service.Config.GetValue(PluginConfigFloat.MistakeRatio) && ActionUpdater.WrongAction != null;
- var nextAction = wrong ? ActionUpdater.WrongAction : ActionUpdater.NextAction;
+ var nextAction = ActionUpdater.NextAction;
if (nextAction == null) return;
- if (wrong)
- {
- Svc.Toasts.ShowError(string.Format(LocalizationManager.RightLang.ClickingMistakeMessage, nextAction));
- ControlWindow.Wrong = nextAction;
- ControlWindow.DidTime = DateTime.Now;
- }
-
if (Service.Config.GetValue(PluginConfigBool.KeyBoardNoise))
{
PreviewUpdater.PulseActionBar(nextAction.AdjustedID);
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 543153dac..b6c425a8d 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -177,7 +177,6 @@ internal static class ConfigTranslation
PluginConfigFloat.NotInCombatDelayMin => LocalizationManager.RightLang.ConfigWindow_Param_NotInCombatDelay,
PluginConfigFloat.ClickingDelayMin => LocalizationManager.RightLang.ConfigWindow_Param_ClickingDelay,
PluginConfigFloat.StopCastingDelayMin => LocalizationManager.RightLang.ConfigWindow_Param_StopCastingDelay,
- PluginConfigFloat.MistakeRatio => LocalizationManager.RightLang.ConfigWindow_Param_ClickMistake,
PluginConfigFloat.MinUpdatingTime => LocalizationManager.RightLang.ConfigWindow_Basic_MinUpdatingTime,
// UI
diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json
index 67b82decc..96f1d9bc7 100644
--- a/RotationSolver/Localization/Localization.json
+++ b/RotationSolver/Localization/Localization.json
@@ -63,7 +63,6 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_ClickMistake": "How likely is it that RS will click the wrong action.",
"ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
@@ -449,7 +448,6 @@
"HighEndWarning": "Please separately keybind damage reduction / shield cooldowns in case RS fails at a crucial moment in {0}!",
"TextToTalkWarning": "TextToTalk addon was not detected, please install it to make Rotation Solver give audio notifications!",
"AvariceWarning": "Avarice addon was not detected, please install it if you want to get the positional indicators for Rotation Solver!",
- "ClickingMistakeMessage": "OOOps! RS clicked the wrong action ({0})!",
"ConfigWindow_About_Punchline": "Analyses PvE combat information every frame and finds the best action.",
"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.",
"ConfigWindow_About_Warning": "It is designed for GENERAL COMBAT, not for savage or ultimate. Use it carefully.",
@@ -476,7 +474,6 @@
"ConfigWindow_Actions_DisabledConditionSet": "Disabled Condition",
"ConfigWindow_Actions_DisabledConditionSet_Description": "Conditions for automatic use of action being disabled.",
"ConfigWindow_Actions_ShowOnCDWindow": "Show on CD window",
- "ConfigWindow_Actions_IsInMistake": "Can be used by mistake",
"ConfigWindow_Configs_JobConfigTip": "This config is job specific",
"ConfigWindow_Rotations_Settings": "Settings",
"ConfigWindow_Rotations_Loaded": "Loaded",
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index fe7b78e8d..12334c4b8 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -117,7 +117,6 @@ internal class Strings
public string ConfigWindow_Param_ClickingDelay { get; set; } = "The range of random delay for clicking actions.";
public string ConfigWindow_Param_StopCastingDelay { get; set; } = "The range of random delay for stopping casting when the target is dead or immune to damage.";
- public string ConfigWindow_Param_ClickMistake { get; set; } = "How likely is it that RS will click the wrong action.";
public string ConfigWindow_Param_PoslockCasting { get; set; } = "Lock the movement when casting or when doing some actions.";
public string ConfigWindow_Param_UseStopCasting { get; set; } = "Stops casting when the target is dead.";
public string ConfigWindow_Param_ShowTooltips { get; set; } = "Show tooltips";
@@ -651,8 +650,6 @@ internal class Strings
public string TextToTalkWarning { get; set; } = "TextToTalk addon was not detected, please install it to make Rotation Solver give audio notifications!";
public string AvariceWarning { get; set; } = "Avarice addon was not detected, please install it if you want to get the positional indicators for Rotation Solver!";
- public string ClickingMistakeMessage { get; set; } = "OOOps! RS clicked the wrong action ({0})!";
-
public string ConfigWindow_About_Punchline { get; set; } = "Analyses PvE combat information every frame and finds the best action.";
public string ConfigWindow_About_Description { get; set; } = "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.";
@@ -685,7 +682,6 @@ internal class Strings
public string ConfigWindow_Actions_DisabledConditionSet { get; set; } = "Disabled Condition";
public string ConfigWindow_Actions_DisabledConditionSet_Description { get; set; } = "Conditions for automatic use of action being disabled.";
public string ConfigWindow_Actions_ShowOnCDWindow { get; set; } = "Show on CD window";
- public string ConfigWindow_Actions_IsInMistake { get; set; } = "Can be used by mistake";
public string ConfigWindow_Configs_JobConfigTip { get; set; } = "This config is job specific";
diff --git a/RotationSolver/Localization/de.json b/RotationSolver/Localization/de.json
index ce67fe618..c4876b785 100644
--- a/RotationSolver/Localization/de.json
+++ b/RotationSolver/Localization/de.json
@@ -63,7 +63,6 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_ClickMistake": "How likely is it that RS will click the wrong action.",
"ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
@@ -449,7 +448,6 @@
"HighEndWarning": "Please separately keybind damage reduction / shield cooldowns in case RS fails at a crucial moment in {0}!",
"TextToTalkWarning": "TextToTalk addon was not detected, please install it to make Rotation Solver give audio notifications!",
"AvariceWarning": "Avarice addon was not detected, please install it if you want to get the positional indicators for Rotation Solver!",
- "ClickingMistakeMessage": "OOOps! RS clicked the wrong action ({0})!",
"ConfigWindow_About_Punchline": "Analyses PvE combat information every frame and finds the best action.",
"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.",
"ConfigWindow_About_Warning": "It is designed for GENERAL COMBAT, not for savage or ultimate. Use it carefully.",
@@ -476,7 +474,6 @@
"ConfigWindow_Actions_DisabledConditionSet": "Disabled Condition",
"ConfigWindow_Actions_DisabledConditionSet_Description": "Conditions for automatic use of action being disabled.",
"ConfigWindow_Actions_ShowOnCDWindow": "Show on CD window",
- "ConfigWindow_Actions_IsInMistake": "Can be used by mistake",
"ConfigWindow_Configs_JobConfigTip": "This config is job specific",
"ConfigWindow_Rotations_Settings": "Settings",
"ConfigWindow_Rotations_Loaded": "Loaded",
diff --git a/RotationSolver/Localization/es.json b/RotationSolver/Localization/es.json
index 54b5bdb4c..4483f95b7 100644
--- a/RotationSolver/Localization/es.json
+++ b/RotationSolver/Localization/es.json
@@ -63,7 +63,6 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_ClickMistake": "How likely is it that RS will click the wrong action.",
"ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
@@ -449,7 +448,6 @@
"HighEndWarning": "Please separately keybind damage reduction / shield cooldowns in case RS fails at a crucial moment in {0}!",
"TextToTalkWarning": "TextToTalk addon was not detected, please install it to make Rotation Solver give audio notifications!",
"AvariceWarning": "Avarice addon was not detected, please install it if you want to get the positional indicators for Rotation Solver!",
- "ClickingMistakeMessage": "OOOps! RS clicked the wrong action ({0})!",
"ConfigWindow_About_Punchline": "Analyses PvE combat information every frame and finds the best action.",
"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.",
"ConfigWindow_About_Warning": "It is designed for GENERAL COMBAT, not for savage or ultimate. Use it carefully.",
@@ -476,7 +474,6 @@
"ConfigWindow_Actions_DisabledConditionSet": "Disabled Condition",
"ConfigWindow_Actions_DisabledConditionSet_Description": "Conditions for automatic use of action being disabled.",
"ConfigWindow_Actions_ShowOnCDWindow": "Show on CD window",
- "ConfigWindow_Actions_IsInMistake": "Can be used by mistake",
"ConfigWindow_Configs_JobConfigTip": "This config is job specific",
"ConfigWindow_Rotations_Settings": "Settings",
"ConfigWindow_Rotations_Loaded": "Loaded",
diff --git a/RotationSolver/Localization/fr.json b/RotationSolver/Localization/fr.json
index f3f79ce3c..bd87ea16c 100644
--- a/RotationSolver/Localization/fr.json
+++ b/RotationSolver/Localization/fr.json
@@ -63,7 +63,6 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_ClickMistake": "Quelle est la probabilité que RS cliquera sur la mauvaise action.",
"ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Afficher les info-bulles",
@@ -449,7 +448,6 @@
"HighEndWarning": "Please separately keybind damage reduction / shield cooldowns in case RS fails at a crucial moment in {0}!",
"TextToTalkWarning": "TextToTalk addon was not detected, please install it to make Rotation Solver give audio notifications!",
"AvariceWarning": "Avarice addon was not detected, please install it if you want to get the positional indicators for Rotation Solver!",
- "ClickingMistakeMessage": "OOOps! RS clicked the wrong action ({0})!",
"ConfigWindow_About_Punchline": "Analyses PvE combat information every frame and finds the best action.",
"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.",
"ConfigWindow_About_Warning": "It is designed for GENERAL COMBAT, not for savage or ultimate. Use it carefully.",
@@ -476,7 +474,6 @@
"ConfigWindow_Actions_DisabledConditionSet": "Disabled Condition",
"ConfigWindow_Actions_DisabledConditionSet_Description": "Conditions for automatic use of action being disabled.",
"ConfigWindow_Actions_ShowOnCDWindow": "Show on CD window",
- "ConfigWindow_Actions_IsInMistake": "Can be used by mistake",
"ConfigWindow_Configs_JobConfigTip": "This config is job specific",
"ConfigWindow_Rotations_Settings": "Settings",
"ConfigWindow_Rotations_Loaded": "Loaded",
diff --git a/RotationSolver/Localization/ja.json b/RotationSolver/Localization/ja.json
index 3e4ece296..0ca6b3002 100644
--- a/RotationSolver/Localization/ja.json
+++ b/RotationSolver/Localization/ja.json
@@ -63,7 +63,6 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_ClickMistake": "RSが間違ったアクションをクリックする可能性はどれくらいですか。",
"ConfigWindow_Param_PoslockCasting": "キャスト時やアクション時に移動を停止します。",
"ConfigWindow_Param_UseStopCasting": "ターゲットが死んだ時、キャスティングをやめる。",
"ConfigWindow_Param_ShowTooltips": "ツールチップを表示",
@@ -449,7 +448,6 @@
"HighEndWarning": "Please separately keybind damage reduction / shield cooldowns in case RS fails at a crucial moment in {0}!",
"TextToTalkWarning": "TextToTalk addon was not detected, please install it to make Rotation Solver give audio notifications!",
"AvariceWarning": "Avarice addon was not detected, please install it if you want to get the positional indicators for Rotation Solver!",
- "ClickingMistakeMessage": "OOOps! RS clicked the wrong action ({0})!",
"ConfigWindow_About_Punchline": "PvEの戦闘情報を各フレームごとに分析し、最適なアクションを見つけます。",
"ConfigWindow_About_Description": "これは、パーティ内の全プレイヤーのステータス、スキルのクールダウン、キャラクターのHPとMP、キャラクターの位置、敵ターゲットのキャスト状態、コンボ、戦闘時間、プレイヤーレベルなどの戦闘で使用可能なほぼすべての情報を意味します。\n\nそれらは、ホットバー上の最適なアクションを強調表示したり、クリックするのに役立ちます。",
"ConfigWindow_About_Warning": "注意:零式や絶のためではなく、一般的な戦闘のために設計されています。",
@@ -476,7 +474,6 @@
"ConfigWindow_Actions_DisabledConditionSet": "Disabled Condition",
"ConfigWindow_Actions_DisabledConditionSet_Description": "Conditions for automatic use of action being disabled.",
"ConfigWindow_Actions_ShowOnCDWindow": "Show on CD window",
- "ConfigWindow_Actions_IsInMistake": "Can be used by mistake",
"ConfigWindow_Configs_JobConfigTip": "This config is job specific",
"ConfigWindow_Rotations_Settings": "Settings",
"ConfigWindow_Rotations_Loaded": "Loaded",
diff --git a/RotationSolver/Localization/zh.json b/RotationSolver/Localization/zh.json
index f0f961acb..adbdc25a4 100644
--- a/RotationSolver/Localization/zh.json
+++ b/RotationSolver/Localization/zh.json
@@ -63,7 +63,6 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_ClickMistake": "有多大的可能性RS会点击错误的技能。",
"ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "显示提示信息",
@@ -449,7 +448,6 @@
"HighEndWarning": "当在{0} 时, 请单独绑定减伤/护盾的冷却时间, 以防RS在关键时刻失效!",
"TextToTalkWarning": "TextToTalk addon was not detected, please install it to make Rotation Solver give audio notifications!",
"AvariceWarning": "Avarice addon was not detected, please install it if you want to get the positional indicators for Rotation Solver!",
- "ClickingMistakeMessage": "哎呀!RS点击了错误的操作 ({0}) !",
"ConfigWindow_About_Punchline": "分析PvE战斗信息的每一帧并找到最佳技能。",
"ConfigWindow_About_Description": "这意味着在战斗中几乎所有可用的信息都集中在一个帧中,包括团队中所有玩家的状态、敌对目标的状态、技能冷却时间、角色的MP和HP、角色的位置、敌对目标的施法状态、连击、战斗持续时间、玩家等级等。\n\n然后,它会在热栏上突出显示最佳技能,或者帮助您点击它。",
"ConfigWindow_About_Warning": "它是为普通战斗设计的,而不是为高难或绝境战而设计的。小心使用。",
@@ -476,7 +474,6 @@
"ConfigWindow_Actions_DisabledConditionSet": "禁用条件",
"ConfigWindow_Actions_DisabledConditionSet_Description": "Conditions for automatic use of action being disabled.",
"ConfigWindow_Actions_ShowOnCDWindow": "显示在冷却窗口中",
- "ConfigWindow_Actions_IsInMistake": "Can be used by mistake",
"ConfigWindow_Configs_JobConfigTip": "This config is job specific",
"ConfigWindow_Rotations_Settings": "设置",
"ConfigWindow_Rotations_Loaded": "加载完成",
diff --git a/RotationSolver/UI/ControlWindow.cs b/RotationSolver/UI/ControlWindow.cs
index 8fb4ed21d..ff4b5e50f 100644
--- a/RotationSolver/UI/ControlWindow.cs
+++ b/RotationSolver/UI/ControlWindow.cs
@@ -11,7 +11,6 @@ namespace RotationSolver.UI;
internal class ControlWindow : CtrlWindow
{
- public static IAction Wrong { get; set; }
public static DateTime DidTime { get; set; }
public ControlWindow()
@@ -195,16 +194,6 @@ private static void DrawSpecials()
ImGui.Text("Auto: " + DataCenter.AutoStatus.ToString());
}
}
-
- if (Service.Config.GetValue(PluginConfigFloat.MistakeRatio) > 0)
- {
- ImGui.SameLine();
- ImGui.TextColored(ImGuiColors.DPSRed, " | Mistake | \n | Mistake | ");
- ImGui.SameLine();
-
- DrawIAction(DateTime.Now - DidTime < TimeSpan.FromSeconds(5) ? Wrong : null,
- Service.Config.GetValue(PluginConfigFloat.ControlWindowGCDSize), 1);
- }
}
static void DrawCommandAction(IAction gcd, IAction ability, SpecialCommandType command, Vector4 color)
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index aa1866d05..4d2f5bc9c 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -1414,16 +1414,6 @@ private static unsafe void DrawActions()
if (_activeAction is IBaseAction action)
{
- if (Service.Config.GetValue(PluginConfigFloat.MistakeRatio) > 0
- && !action.IsFriendly && action.ChoiceTarget != TargetFilter.FindTargetForMoving)
- {
- enable = action.IsInMistake;
- if (ImGui.Checkbox($"{LocalizationManager.RightLang.ConfigWindow_Actions_IsInMistake}##{action.Name}InMistake", ref enable))
- {
- action.IsInMistake = enable;
- }
- }
-
ImGui.Separator();
var ttk = action.TimeToKill;
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index fb746884e..35e694a6d 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -364,8 +364,6 @@ private static void DrawBasicOthers()
new CheckBoxSearchPlugin(PluginConfigBool.UseWorkTask),
- new DragFloatSearchPlugin(PluginConfigFloat.MistakeRatio, 0.002f),
-
new DragFloatRangeSearchPlugin(PluginConfigFloat.NotInCombatDelayMin, PluginConfigFloat.NotInCombatDelayMax, 0.002f),
new CheckBoxSearchPlugin(PluginConfigBool.UseAdditionalConditions),
diff --git a/RotationSolver/Updaters/ActionUpdater.cs b/RotationSolver/Updaters/ActionUpdater.cs
index 0515d1e8a..317464567 100644
--- a/RotationSolver/Updaters/ActionUpdater.cs
+++ b/RotationSolver/Updaters/ActionUpdater.cs
@@ -19,13 +19,11 @@ internal static class ActionUpdater
internal static IAction NextAction { get; set; }
internal static IBaseAction NextGCDAction { get; set; }
- internal static IAction WrongAction { get; set; }
- static readonly Random _wrongRandom = new();
internal static void ClearNextAction()
{
SetAction(0);
- WrongAction = NextAction = NextGCDAction = null;
+ NextAction = NextGCDAction = null;
}
internal static void UpdateNextAction()
@@ -39,24 +37,6 @@ internal static void UpdateNextAction()
if (localPlayer != null && customRotation != null
&& customRotation.TryInvoke(out var newAction, out var gcdAction))
{
- if (Service.Config.GetValue(PluginConfigFloat.MistakeRatio) > 0)
- {
- var actions = customRotation.AllActions.Where(a =>
- {
- if (a.ID == newAction?.ID) return false;
- if (a is IBaseAction action)
- {
- return !action.IsFriendly && action.IsInMistake
- && action.ChoiceTarget != TargetFilter.FindTargetForMoving
- && action.CanUse(out _, CanUseOption.MustUseEmpty | CanUseOption.IgnoreClippingCheck);
- }
- return false;
- });
-
- var count = actions.Count();
- WrongAction = count > 0 ? actions.ElementAt(_wrongRandom.Next(count)) : null;
- }
-
NextAction = newAction;
if (gcdAction is IBaseAction GcdAction)
@@ -74,7 +54,7 @@ internal static void UpdateNextAction()
Svc.Log.Error(ex, "Failed to update next action.");
}
- WrongAction = NextAction = NextGCDAction = null;
+ NextAction = NextGCDAction = null;
}
private static void SetAction(uint id) => Svc.PluginInterface.GetOrCreateData("Avarice.ActionOverride", () => new List() { id })[0] = id;
From a72459a3b9c8f98f8a957a94d4caf690a572b97e Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Sun, 21 Jan 2024 22:05:59 +0000
Subject: [PATCH 46/73] teaching mode fix
---
RotationSolver.Basic/DataCenter.cs | 2 ++
RotationSolver/Updaters/ActionUpdater.cs | 2 +-
RotationSolver/Updaters/MajorUpdater.cs | 4 ++--
RotationSolver/Updaters/TargetUpdater.cs | 1 -
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs
index b20aefb80..1d19dd4a0 100644
--- a/RotationSolver.Basic/DataCenter.cs
+++ b/RotationSolver.Basic/DataCenter.cs
@@ -276,6 +276,8 @@ public static float AbilityRemain
public static bool IsManual { get; set; } = false;
+ public static bool IsActivated() => State || IsManual || Service.Config.GetValue(PluginConfigBool.TeachingMode);
+
public static void SetSpecialType(SpecialCommandType specialType)
{
_specialType = specialType;
diff --git a/RotationSolver/Updaters/ActionUpdater.cs b/RotationSolver/Updaters/ActionUpdater.cs
index 317464567..104bff8e3 100644
--- a/RotationSolver/Updaters/ActionUpdater.cs
+++ b/RotationSolver/Updaters/ActionUpdater.cs
@@ -30,7 +30,7 @@ internal static void UpdateNextAction()
{
PlayerCharacter localPlayer = Player.Object;
var customRotation = DataCenter.RightNowRotation;
- if (!DataCenter.IsManual && !DataCenter.State) return;
+ if (!DataCenter.IsActivated()) return;
try
{
diff --git a/RotationSolver/Updaters/MajorUpdater.cs b/RotationSolver/Updaters/MajorUpdater.cs
index c085937f0..ebeb2757a 100644
--- a/RotationSolver/Updaters/MajorUpdater.cs
+++ b/RotationSolver/Updaters/MajorUpdater.cs
@@ -57,7 +57,7 @@ private unsafe static void FrameworkUpdate(IFramework framework)
PainterManager.ActionIds.Add(id == (uint)ActionID.Sprint ? 4 : id);
}
- if (DataCenter.IsManual || DataCenter.State)
+ if (DataCenter.IsActivated())
{
ActionUpdater.UpdateActionInfo();
@@ -151,7 +151,7 @@ private static void UpdateWork()
RotationUpdater.UpdateRotation();
- if (DataCenter.IsManual || DataCenter.State)
+ if (DataCenter.IsActivated())
{
TargetUpdater.UpdateTarget();
ActionSequencerUpdater.UpdateActionSequencerAction();
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 405f47687..2e14441c8 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -31,7 +31,6 @@ internal unsafe static void UpdateTarget()
catch (Exception ex)
{
ex.Log($"Exception in {nameof(UpdateTarget)}");
- // Rethrow the exception if necessary
}
}
From 2124aed1090907112cfc583ea388f315dcc4b621 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Wed, 24 Jan 2024 15:43:56 +0000
Subject: [PATCH 47/73] get rid of throw
---
RotationSolver.Basic/Helpers/ObjectHelper.cs | 3 +--
RotationSolver.Basic/Helpers/StatusHelper.cs | 7 ++++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs
index 3067752f7..9b52a903a 100644
--- a/RotationSolver.Basic/Helpers/ObjectHelper.cs
+++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs
@@ -81,9 +81,8 @@ public static unsafe bool IsAlliance(this GameObject obj)
}
catch (Exception ex)
{
- // Log or print the exception details for debugging
Svc.Log.Error($"Exception in {nameof(IsAlliance)}: {ex}");
- throw; // Rethrow the exception to maintain the original exception flow
+ return false;
}
}
diff --git a/RotationSolver.Basic/Helpers/StatusHelper.cs b/RotationSolver.Basic/Helpers/StatusHelper.cs
index 81fe3dd6d..c0b23e6ae 100644
--- a/RotationSolver.Basic/Helpers/StatusHelper.cs
+++ b/RotationSolver.Basic/Helpers/StatusHelper.cs
@@ -176,11 +176,12 @@ private static IEnumerable GetAllStatus(this BattleChara obj, bool isFro
try
{
if (obj == null) return Array.Empty();
- if (obj.StatusList == null) return Array.Empty();
+ if (obj.StatusList == null || obj.StatusList.Length == 0) return Array.Empty();
- return obj.StatusList.Where(status => !isFromSelf
+ return obj?.StatusList?.Where(status => !isFromSelf
|| status.SourceId == Player.Object.ObjectId
- || status.SourceObject?.OwnerId == Player.Object.ObjectId);
+ || status.SourceObject?.OwnerId == Player.Object.ObjectId)
+ ?? Array.Empty();
}
catch (Exception ex)
{
From 998227d8591b524a942eea852b20dd89a2b154df Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Wed, 24 Jan 2024 11:50:00 -0600
Subject: [PATCH 48/73] Update ActionID.cs
rise high, high above our rivals
---
RotationSolver.Basic/Data/ActionID.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/RotationSolver.Basic/Data/ActionID.cs b/RotationSolver.Basic/Data/ActionID.cs
index 48c2b80a4..43670131b 100644
--- a/RotationSolver.Basic/Data/ActionID.cs
+++ b/RotationSolver.Basic/Data/ActionID.cs
@@ -5279,4 +5279,13 @@ public enum ActionID : uint
LostSeraphStrike = 22354,
#endregion
+
+ #region Duty Actions
+
+ ///
+ ///
+ ///
+ Vril = 8517, /// ReAction also listing 9345, but that might be for normal mode, found 8517 doing Extreme through RS debug
+
+ #endregion
}
From 34e0e1d73f337e9d0dd2d4d82630bbad14953e64 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Wed, 24 Jan 2024 11:55:09 -0600
Subject: [PATCH 49/73] Update PriorityStatus.json
ad with Vril in Lakshmi extreme
---
Resources/PriorityStatus.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Resources/PriorityStatus.json b/Resources/PriorityStatus.json
index 6f39541ca..2d92b5af5 100644
--- a/Resources/PriorityStatus.json
+++ b/Resources/PriorityStatus.json
@@ -1,3 +1,4 @@
[
944
-]
\ No newline at end of file
+ 1290
+]
From 8b8e8f474ea753c2036bcb05e3d27b74a6187c7b Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Wed, 24 Jan 2024 19:03:33 +0000
Subject: [PATCH 50/73] add branch var for links
---
.../Configuration/OtherConfiguration.cs | 2 +-
RotationSolver.Basic/Service.cs | 2 +-
RotationSolver/Helpers/DownloadHelper.cs | 13 +++----------
RotationSolver/Localization/LocalizationManager.cs | 2 +-
RotationSolver/UI/RotationConfigWindow.cs | 2 +-
5 files changed, 7 insertions(+), 14 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/OtherConfiguration.cs b/RotationSolver.Basic/Configuration/OtherConfiguration.cs
index dac050568..1405c6306 100644
--- a/RotationSolver.Basic/Configuration/OtherConfiguration.cs
+++ b/RotationSolver.Basic/Configuration/OtherConfiguration.cs
@@ -238,7 +238,7 @@ private static void InitOne(ref T value, string name, bool download = true)
try
{
using var client = new HttpClient();
- var str = client.GetStringAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Resources/{name}.json").Result;
+ var str = client.GetStringAsync($"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/{Service.BRANCH}/Resources/{name}.json").Result;
File.WriteAllText(path, str);
value = JsonConvert.DeserializeObject(str, new JsonSerializerSettings()
diff --git a/RotationSolver.Basic/Service.cs b/RotationSolver.Basic/Service.cs
index 212477a66..93ddef163 100644
--- a/RotationSolver.Basic/Service.cs
+++ b/RotationSolver.Basic/Service.cs
@@ -9,7 +9,7 @@ namespace RotationSolver.Basic;
internal class Service : IDisposable
{
- public const string COMMAND = "/rotation", USERNAME = "Jaksuhn", REPO = "RotationSolver";
+ public const string COMMAND = "/rotation", USERNAME = "Jaksuhn", REPO = "RotationSolver", BRANCH = "testing";
// From https://GitHub.com/PunishXIV/Orbwalker/blame/master/Orbwalker/Memory.cs#L85-L87
[Signature("F3 0F 10 05 ?? ?? ?? ?? 0F 2E C6 0F 8A", ScanType = ScanType.StaticAddress, Fallibility = Fallibility.Infallible)]
diff --git a/RotationSolver/Helpers/DownloadHelper.cs b/RotationSolver/Helpers/DownloadHelper.cs
index ac3e81403..36b3cd509 100644
--- a/RotationSolver/Helpers/DownloadHelper.cs
+++ b/RotationSolver/Helpers/DownloadHelper.cs
@@ -6,21 +6,14 @@ namespace RotationSolver.Helpers;
public static class DownloadHelper
{
public static string[] LinkLibraries { get; private set; } = Array.Empty();
- public static string[] ContributorsHash { get; private set; } = Array.Empty();
- public static string[] UsersHash { get; private set; } = Array.Empty();
public static string[] Supporters { get; private set; } = Array.Empty();
public static IncompatiblePlugin[] IncompatiblePlugins { get; private set; } = Array.Empty();
public static async Task DownloadAsync()
{
- LinkLibraries = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver//main/Resources/downloadList.json") ?? Array.Empty();
- IncompatiblePlugins = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/main/Resources/IncompatiblePlugins.json") ?? Array.Empty();
-
- ContributorsHash = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver//main/Resources/ContributorsHash.json") ?? Array.Empty();
-
- UsersHash = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/main/Resources/UsersHash.json") ?? Array.Empty();
-
- Supporters = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/main/Resources/Supporters.json") ?? Array.Empty();
+ LinkLibraries = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver//{Service.BRANCH}/Resources/downloadList.json") ?? Array.Empty();
+ IncompatiblePlugins = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/{Service.BRANCH}/Resources/IncompatiblePlugins.json") ?? Array.Empty();
+ Supporters = await DownloadOneAsync($"https://raw.githubusercontent.com/Jaksuhn/RotationSolver/{Service.BRANCH}/Resources/Supporters.json") ?? Array.Empty();
}
private static async Task DownloadOneAsync(string url)
diff --git a/RotationSolver/Localization/LocalizationManager.cs b/RotationSolver/Localization/LocalizationManager.cs
index f4db3b7fc..e6c4115fa 100644
--- a/RotationSolver/Localization/LocalizationManager.cs
+++ b/RotationSolver/Localization/LocalizationManager.cs
@@ -26,7 +26,7 @@ private async void SetLanguage(string lang)
{
try
{
- var url = $"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/RotationSolver/Localization/{lang}.json";
+ var url = $"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/{Service.BRANCH}/RotationSolver/Localization/{lang}.json";
using var client = new HttpClient();
RightLang = _translations[lang] = JsonConvert.DeserializeObject(await client.GetStringAsync(url));
}
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index 38293e58d..aa5806ccd 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -296,7 +296,7 @@ private static bool GetLocalImage(string name, out IDalamudTextureWrap texture)
{
if (!File.Exists(file))
{
- var url = $"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/main/Images/{name}.png";
+ var url = $"https://raw.githubusercontent.com/{Service.USERNAME}/{Service.REPO}/{Service.BRANCH}/Images/{name}.png";
using var client = new HttpClient();
var stream = await client.GetStreamAsync(url);
From 5cf52b8e7e077538031b8ec022bd3344f54e2ecb Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Wed, 24 Jan 2024 13:18:33 -0600
Subject: [PATCH 51/73] Update RotationConfigWindow.cs
why
---
RotationSolver/UI/RotationConfigWindow.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index 38293e58d..8821587cc 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -1774,7 +1774,7 @@ private static void DrawList()
private static readonly CollapsingHeaderGroup _idsHeader = new(new()
{
{ () => LocalizationManager.RightLang.ConfigWindow_List_Statuses, DrawListStatuses},
- { () => Service.Config.GetValue(PluginConfigBool.UseDefenseAbility) ? LocalizationManager.RightLang.ConfigWindow_List_Actions : string.Empty, DrawListActions},
+ { () => LocalizationManager.RightLang.ConfigWindow_List_Statuses, DrawListActions},
{ () => LocalizationManager.RightLang.ConfigWindow_List_Territories, DrawListTerritories},
});
private static void DrawListStatuses()
From c25c81f30dddb867f2d11caaa119dc5e47fb4db7 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Wed, 24 Jan 2024 13:20:25 -0600
Subject: [PATCH 52/73] Update HostileCastingArea.json
Divine Denial AOE in default
---
Resources/HostileCastingArea.json | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json
index 0dd5b06ae..fc55f8edc 100644
--- a/Resources/HostileCastingArea.json
+++ b/Resources/HostileCastingArea.json
@@ -62,10 +62,13 @@
8028,
8039,
8367,
+ 8521,
8581,
+ 9349,
9414,
9416,
9523,
+ 9568,
9660,
9665,
9670,
@@ -79,6 +82,7 @@
9828,
9841,
9869,
+ 9990,
10086,
10097,
10284,
@@ -481,4 +485,4 @@
30288,
28907,
24189
-]
\ No newline at end of file
+]
From 39440c2748882a20bfcf45eda5c74956d42dc8ef Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Wed, 24 Jan 2024 15:13:49 -0600
Subject: [PATCH 53/73] Update CustomRotation_Ability.cs
---
.../Rotations/CustomRotation_Ability.cs | 24 +++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 25e9710d5..2080acdb4 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -434,4 +434,28 @@ protected virtual bool AttackAbility(out IAction act)
if (LostAssassination.CanUse(out act)) return true;
return false;
}
+ private bool ShouldUseVril(IEnumerable hostilesCastingAOE)
+ {
+ // Check if the current instance is 20049 (Emanation Extreme)
+ if (DataCenter.CurrentInstanceID != 20049)
+ {
+ return false;
+ }
+
+ // Check if the player does not have the Vril status (Status ID 1290)
+ if (!PlayerHasStatus(1290))
+ {
+ foreach (var enemy in hostilesCastingST)
+ {
+ // Check if Lakshmi is casting one of the specified actions
+ if (enemy.DataID == 7310 && enemy.IsCasting &&
+ (enemy.CurrentCastActionId == 8521 || // Divine Denial
+ enemy.CurrentCastActionId == 8523 || // Divine Desire
+ enemy.CurrentCastActionId == 8522)) // Divine Doubt
+ {
+ if (Vril.CanUse(out act)) return true;
+ }
+ }
+ }
+ return false;
}
From d2c820d24f16af9c9914e20eb0cb773bbcc4d65d Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Wed, 24 Jan 2024 15:26:48 -0600
Subject: [PATCH 54/73] Update CustomRotation_Ability.cs
---
.../Rotations/CustomRotation_Ability.cs | 27 ++++++++++++-------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 2080acdb4..9d3658002 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -434,28 +434,35 @@ protected virtual bool AttackAbility(out IAction act)
if (LostAssassination.CanUse(out act)) return true;
return false;
}
+
+ ///
+ /// The ability that can be used to prevent negative effects of boss attacks.
+ ///
+ /// Result action.
+ /// Can we use it.
private bool ShouldUseVril(IEnumerable hostilesCastingAOE)
{
// Check if the current instance is 20049 (Emanation Extreme)
if (DataCenter.CurrentInstanceID != 20049)
{
- return false;
+ return false;
}
// Check if the player does not have the Vril status (Status ID 1290)
if (!PlayerHasStatus(1290))
{
- foreach (var enemy in hostilesCastingST)
- {
- // Check if Lakshmi is casting one of the specified actions
- if (enemy.DataID == 7310 && enemy.IsCasting &&
- (enemy.CurrentCastActionId == 8521 || // Divine Denial
- enemy.CurrentCastActionId == 8523 || // Divine Desire
- enemy.CurrentCastActionId == 8522)) // Divine Doubt
+ foreach (var enemy in hostilesCastingST)
{
- if (Vril.CanUse(out act)) return true;
+ // Check if Lakshmi is casting one of the specified actions
+ if (enemy.DataID == 7310 && enemy.IsCasting &&
+ (enemy.CurrentCastActionId == 8521 || // Divine Denial
+ enemy.CurrentCastActionId == 8523 || // Divine Desire
+ enemy.CurrentCastActionId == 8522)) // Divine Doubt
+ {
+ if (Vril.CanUse(out act)) return true;
+ }
}
}
+ return false;
}
- return false;
}
From 15eabe3f92146bb653dcd918903c2f03765814b1 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Wed, 24 Jan 2024 15:46:48 -0600
Subject: [PATCH 55/73] Update StatusID.cs
---
RotationSolver.Basic/Data/StatusID.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/RotationSolver.Basic/Data/StatusID.cs b/RotationSolver.Basic/Data/StatusID.cs
index 5ee5a6dd6..5e20c5e48 100644
--- a/RotationSolver.Basic/Data/StatusID.cs
+++ b/RotationSolver.Basic/Data/StatusID.cs
@@ -2179,5 +2179,14 @@ public enum StatusID : ushort
#endregion WHM_PvP
+ #region Duty_Action
+
+ ///
+ ///
+ ///
+ Vril = 1290,
+
+ #endregion Duty_Action
+
#endregion
}
From cf03693bbe25cbaab91280f4c354352ffc4a220a Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Thu, 25 Jan 2024 12:08:05 +0000
Subject: [PATCH 56/73] change to verbose
---
RotationSolver/Updaters/TargetUpdater.cs | 4 ++--
RotationSolver/Watcher.cs | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/RotationSolver/Updaters/TargetUpdater.cs b/RotationSolver/Updaters/TargetUpdater.cs
index 2e14441c8..1b4db113e 100644
--- a/RotationSolver/Updaters/TargetUpdater.cs
+++ b/RotationSolver/Updaters/TargetUpdater.cs
@@ -321,7 +321,7 @@ private unsafe static void UpdateFriends(IEnumerable allTargets)
{
try
{
- Svc.Log.Debug($"{nameof(UpdateFriends)}: Total targets count: {allTargets.Count()}");
+ Svc.Log.Verbose($"{nameof(UpdateFriends)}: Total targets count: {allTargets.Count()}");
DataCenter.PartyMembers = GetPartyMembers(allTargets);
DataCenter.AllianceMembers = allTargets?.Where(ObjectHelper.IsAlliance) ?? Enumerable.Empty();
@@ -374,7 +374,7 @@ private unsafe static void UpdateFriends(IEnumerable allTargets)
DataCenter.CurrentMp = Player.Object.CurrentMp;
}
_lastMp = Player.Object.CurrentMp;
- Svc.Log.Debug($"{nameof(UpdateFriends)}: Successful update");
+ Svc.Log.Verbose($"{nameof(UpdateFriends)}: Successful update");
}
catch (Exception ex)
{
diff --git a/RotationSolver/Watcher.cs b/RotationSolver/Watcher.cs
index 608a32caa..8bf4af42a 100644
--- a/RotationSolver/Watcher.cs
+++ b/RotationSolver/Watcher.cs
@@ -144,7 +144,7 @@ private static unsafe bool UseActionDetour(ActionManager* manager, ActionType ac
private static void UpdateRTTDetour(dynamic obj)
{
- Svc.Log.Debug($"LastRTT:{obj.LastRTT}");
+ Svc.Log.Verbose($"LastRTT:{obj.LastRTT}");
DataCenter.RTT = (long)obj.LastRTT / 1000f;
}
From de10a2120e71baacb2804392881852ef0126f280 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Thu, 25 Jan 2024 12:12:39 +0000
Subject: [PATCH 57/73] Revert "Merge pull request #20 from
LTS-FFXIV/LTS-FFXIV-Beautys-Wicked-Wiles"
This reverts commit 4e974bb4f1edb84d178802673e610402e3a62dda, reversing
changes made to 8b8e8f474ea753c2036bcb05e3d27b74a6187c7b.
---
Resources/HostileCastingArea.json | 6 +---
Resources/PriorityStatus.json | 3 +-
RotationSolver.Basic/Data/ActionID.cs | 9 ------
RotationSolver.Basic/Data/StatusID.cs | 9 ------
.../Rotations/CustomRotation_Ability.cs | 31 -------------------
RotationSolver/UI/RotationConfigWindow.cs | 2 +-
6 files changed, 3 insertions(+), 57 deletions(-)
diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json
index fc55f8edc..0dd5b06ae 100644
--- a/Resources/HostileCastingArea.json
+++ b/Resources/HostileCastingArea.json
@@ -62,13 +62,10 @@
8028,
8039,
8367,
- 8521,
8581,
- 9349,
9414,
9416,
9523,
- 9568,
9660,
9665,
9670,
@@ -82,7 +79,6 @@
9828,
9841,
9869,
- 9990,
10086,
10097,
10284,
@@ -485,4 +481,4 @@
30288,
28907,
24189
-]
+]
\ No newline at end of file
diff --git a/Resources/PriorityStatus.json b/Resources/PriorityStatus.json
index 2d92b5af5..6f39541ca 100644
--- a/Resources/PriorityStatus.json
+++ b/Resources/PriorityStatus.json
@@ -1,4 +1,3 @@
[
944
- 1290
-]
+]
\ No newline at end of file
diff --git a/RotationSolver.Basic/Data/ActionID.cs b/RotationSolver.Basic/Data/ActionID.cs
index 43670131b..48c2b80a4 100644
--- a/RotationSolver.Basic/Data/ActionID.cs
+++ b/RotationSolver.Basic/Data/ActionID.cs
@@ -5279,13 +5279,4 @@ public enum ActionID : uint
LostSeraphStrike = 22354,
#endregion
-
- #region Duty Actions
-
- ///
- ///
- ///
- Vril = 8517, /// ReAction also listing 9345, but that might be for normal mode, found 8517 doing Extreme through RS debug
-
- #endregion
}
diff --git a/RotationSolver.Basic/Data/StatusID.cs b/RotationSolver.Basic/Data/StatusID.cs
index 5e20c5e48..5ee5a6dd6 100644
--- a/RotationSolver.Basic/Data/StatusID.cs
+++ b/RotationSolver.Basic/Data/StatusID.cs
@@ -2179,14 +2179,5 @@ public enum StatusID : ushort
#endregion WHM_PvP
- #region Duty_Action
-
- ///
- ///
- ///
- Vril = 1290,
-
- #endregion Duty_Action
-
#endregion
}
diff --git a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
index 9d3658002..25e9710d5 100644
--- a/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
+++ b/RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
@@ -434,35 +434,4 @@ protected virtual bool AttackAbility(out IAction act)
if (LostAssassination.CanUse(out act)) return true;
return false;
}
-
- ///
- /// The ability that can be used to prevent negative effects of boss attacks.
- ///
- /// Result action.
- /// Can we use it.
- private bool ShouldUseVril(IEnumerable hostilesCastingAOE)
- {
- // Check if the current instance is 20049 (Emanation Extreme)
- if (DataCenter.CurrentInstanceID != 20049)
- {
- return false;
- }
-
- // Check if the player does not have the Vril status (Status ID 1290)
- if (!PlayerHasStatus(1290))
- {
- foreach (var enemy in hostilesCastingST)
- {
- // Check if Lakshmi is casting one of the specified actions
- if (enemy.DataID == 7310 && enemy.IsCasting &&
- (enemy.CurrentCastActionId == 8521 || // Divine Denial
- enemy.CurrentCastActionId == 8523 || // Divine Desire
- enemy.CurrentCastActionId == 8522)) // Divine Doubt
- {
- if (Vril.CanUse(out act)) return true;
- }
- }
- }
- return false;
- }
}
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index 3d13757ca..aa5806ccd 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -1774,7 +1774,7 @@ private static void DrawList()
private static readonly CollapsingHeaderGroup _idsHeader = new(new()
{
{ () => LocalizationManager.RightLang.ConfigWindow_List_Statuses, DrawListStatuses},
- { () => LocalizationManager.RightLang.ConfigWindow_List_Statuses, DrawListActions},
+ { () => Service.Config.GetValue(PluginConfigBool.UseDefenseAbility) ? LocalizationManager.RightLang.ConfigWindow_List_Actions : string.Empty, DrawListActions},
{ () => LocalizationManager.RightLang.ConfigWindow_List_Territories, DrawListTerritories},
});
private static void DrawListStatuses()
From 1449f8b66f95c09fd8065e36a0e2d15e3f57c46f Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Thu, 25 Jan 2024 07:47:19 -0600
Subject: [PATCH 58/73] Update ActionID.cs
---
RotationSolver.Basic/Data/ActionID.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/RotationSolver.Basic/Data/ActionID.cs b/RotationSolver.Basic/Data/ActionID.cs
index 48c2b80a4..04a2589a7 100644
--- a/RotationSolver.Basic/Data/ActionID.cs
+++ b/RotationSolver.Basic/Data/ActionID.cs
@@ -5278,5 +5278,14 @@ public enum ActionID : uint
///
LostSeraphStrike = 22354,
+ #endregion #endregion
+
+ #region Duty Actions
+
+ ///
+ ///
+ ///
+ Vril = 8517, /// ReAction also listing 9345, but that might be for normal mode, found 8517 doing Extreme through RS debug
+
#endregion
}
From 30100e87c15831827e55a1c918f3488848396857 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Thu, 25 Jan 2024 07:48:08 -0600
Subject: [PATCH 59/73] Update PriorityStatus.json
---
Resources/PriorityStatus.json | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Resources/PriorityStatus.json b/Resources/PriorityStatus.json
index 6f39541ca..2d92b5af5 100644
--- a/Resources/PriorityStatus.json
+++ b/Resources/PriorityStatus.json
@@ -1,3 +1,4 @@
[
944
-]
\ No newline at end of file
+ 1290
+]
From 215840a40b4e4b85057b61dd77b62644b214252f Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Thu, 25 Jan 2024 07:50:05 -0600
Subject: [PATCH 60/73] Update RotationConfigWindow.cs
---
RotationSolver/UI/RotationConfigWindow.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs
index aa5806ccd..e66eaf157 100644
--- a/RotationSolver/UI/RotationConfigWindow.cs
+++ b/RotationSolver/UI/RotationConfigWindow.cs
@@ -1774,7 +1774,7 @@ private static void DrawList()
private static readonly CollapsingHeaderGroup _idsHeader = new(new()
{
{ () => LocalizationManager.RightLang.ConfigWindow_List_Statuses, DrawListStatuses},
- { () => Service.Config.GetValue(PluginConfigBool.UseDefenseAbility) ? LocalizationManager.RightLang.ConfigWindow_List_Actions : string.Empty, DrawListActions},
+ { () => LocalizationManager.RightLang.ConfigWindow_List_Actions, DrawListActions},
{ () => LocalizationManager.RightLang.ConfigWindow_List_Territories, DrawListTerritories},
});
private static void DrawListStatuses()
From c0fbaf537f514d8874c7e047590a3dd9b0540105 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Thu, 25 Jan 2024 07:50:30 -0600
Subject: [PATCH 61/73] Update HostileCastingArea.json
---
Resources/HostileCastingArea.json | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json
index 0dd5b06ae..fc55f8edc 100644
--- a/Resources/HostileCastingArea.json
+++ b/Resources/HostileCastingArea.json
@@ -62,10 +62,13 @@
8028,
8039,
8367,
+ 8521,
8581,
+ 9349,
9414,
9416,
9523,
+ 9568,
9660,
9665,
9670,
@@ -79,6 +82,7 @@
9828,
9841,
9869,
+ 9990,
10086,
10097,
10284,
@@ -481,4 +485,4 @@
30288,
28907,
24189
-]
\ No newline at end of file
+]
From 870d5e22119b287a23e76c21f6808b78b460d2f7 Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Thu, 25 Jan 2024 07:51:05 -0600
Subject: [PATCH 62/73] Update StatusID.cs
---
RotationSolver.Basic/Data/StatusID.cs | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/RotationSolver.Basic/Data/StatusID.cs b/RotationSolver.Basic/Data/StatusID.cs
index 5ee5a6dd6..5e20c5e48 100644
--- a/RotationSolver.Basic/Data/StatusID.cs
+++ b/RotationSolver.Basic/Data/StatusID.cs
@@ -2179,5 +2179,14 @@ public enum StatusID : ushort
#endregion WHM_PvP
+ #region Duty_Action
+
+ ///
+ ///
+ ///
+ Vril = 1290,
+
+ #endregion Duty_Action
+
#endregion
}
From d273e82b3fa87f0a3100686a8b31eea482badcef Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Sat, 27 Jan 2024 09:55:30 +0000
Subject: [PATCH 63/73] remove DrawMeleeOffset
---
RotationSolver.Basic/Configuration/Configs.cs | 2 --
RotationSolver/Localization/ConfigTranslation.cs | 1 -
RotationSolver/Localization/Localization.json | 1 -
RotationSolver/Localization/Strings.cs | 1 -
RotationSolver/Localization/de.json | 1 -
RotationSolver/Localization/es.json | 1 -
RotationSolver/Localization/fr.json | 1 -
RotationSolver/Localization/ja.json | 1 -
RotationSolver/Localization/zh.json | 1 -
RotationSolver/UI/PainterManager.cs | 13 -------------
RotationSolver/UI/RotationConfigWindow_Config.cs | 4 +---
11 files changed, 1 insertion(+), 26 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 0690190e4..3894373fc 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -285,8 +285,6 @@ public enum PluginConfigBool : byte
[Default(false)] UseTinctures,
[Default(false)] UseHealPotions,
- [Default(true)] DrawMeleeOffset,
-
[Default(true)] ShowMoveTarget,
[Default(false)] ShowTargetTimeToKill,
[Default(false)] ShowTarget,
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index b6c425a8d..1ad555056 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -69,7 +69,6 @@ internal static class ConfigTranslation
PluginConfigBool.TeachingMode => LocalizationManager.RightLang.ConfigWindow_Param_TeachingMode,
PluginConfigBool.ShowMoveTarget => LocalizationManager.RightLang.ConfigWindow_Param_ShowMoveTarget,
PluginConfigBool.ShowTarget => LocalizationManager.RightLang.ConfigWindow_Param_ShowTarget,
- PluginConfigBool.DrawMeleeOffset => LocalizationManager.RightLang.ConfigWindow_Param_DrawMeleeOffset,
PluginConfigBool.KeyBoardNoise => LocalizationManager.RightLang.ConfigWindow_Param_KeyBoardNoise,
PluginConfigBool.ShowInfoOnDtr => LocalizationManager.RightLang.ConfigWindow_Param_ShowInfoOnDtr,
PluginConfigBool.ShowInfoOnToast => LocalizationManager.RightLang.ConfigWindow_Param_ShowInfoOnToast,
diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json
index 96f1d9bc7..6778ff00c 100644
--- a/RotationSolver/Localization/Localization.json
+++ b/RotationSolver/Localization/Localization.json
@@ -81,7 +81,6 @@
"ConfigWindow_Param_SampleLength": "Drawing smoothness.",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing abilities",
"ConfigWindow_Param_KeyBoardNoiseTimes": "Effect times",
- "ConfigWindow_Param_DrawMeleeOffset": "Draw the offset of melee on the screen",
"ConfigWindow_Param_ShowMoveTarget": "Show the target of the move action",
"ConfigWindow_Param_ShowTarget": "Show Target",
"ConfigWindow_Param_TargetIconSize": "The size of the next ability that will be used icon.",
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index 12334c4b8..cab73d59b 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -138,7 +138,6 @@ internal class Strings
public string ConfigWindow_Param_SampleLength { get; set; } = "Drawing smoothness.";
public string ConfigWindow_Param_KeyBoardNoise { get; set; } = "Simulate the effect of pressing abilities";
public string ConfigWindow_Param_KeyBoardNoiseTimes { get; set; } = "Effect times";
- public string ConfigWindow_Param_DrawMeleeOffset { get; set; } = "Draw the offset of melee on the screen";
public string ConfigWindow_Param_ShowMoveTarget { get; set; } = "Show the target of the move action";
public string ConfigWindow_Param_ShowTarget { get; set; } = "Show Target";
public string ConfigWindow_Param_TargetIconSize { get; set; } = "The size of the next ability that will be used icon.";
diff --git a/RotationSolver/Localization/de.json b/RotationSolver/Localization/de.json
index c4876b785..3e3273f10 100644
--- a/RotationSolver/Localization/de.json
+++ b/RotationSolver/Localization/de.json
@@ -81,7 +81,6 @@
"ConfigWindow_Param_SampleLength": "Drawing smoothness.",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing abilities",
"ConfigWindow_Param_KeyBoardNoiseTimes": "Effect times",
- "ConfigWindow_Param_DrawMeleeOffset": "Draw the offset of melee on the screen",
"ConfigWindow_Param_ShowMoveTarget": "Show the target of the move action",
"ConfigWindow_Param_ShowTarget": "Zeige das Ziel",
"ConfigWindow_Param_TargetIconSize": "The size of the next ability that will be used icon.",
diff --git a/RotationSolver/Localization/es.json b/RotationSolver/Localization/es.json
index 4483f95b7..8dabb1ca2 100644
--- a/RotationSolver/Localization/es.json
+++ b/RotationSolver/Localization/es.json
@@ -81,7 +81,6 @@
"ConfigWindow_Param_SampleLength": "Drawing smoothness.",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing abilities",
"ConfigWindow_Param_KeyBoardNoiseTimes": "Effect times",
- "ConfigWindow_Param_DrawMeleeOffset": "Draw the offset of melee on the screen",
"ConfigWindow_Param_ShowMoveTarget": "Show the target of the move action",
"ConfigWindow_Param_ShowTarget": "Show Target",
"ConfigWindow_Param_TargetIconSize": "The size of the next ability that will be used icon.",
diff --git a/RotationSolver/Localization/fr.json b/RotationSolver/Localization/fr.json
index bd87ea16c..75c5b81ca 100644
--- a/RotationSolver/Localization/fr.json
+++ b/RotationSolver/Localization/fr.json
@@ -81,7 +81,6 @@
"ConfigWindow_Param_SampleLength": "Drawing smoothness.",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing abilities",
"ConfigWindow_Param_KeyBoardNoiseTimes": "Temps d'effet",
- "ConfigWindow_Param_DrawMeleeOffset": "Dessiner le tracé pour les mêlés sur l'écran",
"ConfigWindow_Param_ShowMoveTarget": "Afficher la cible de l'action de déplacement",
"ConfigWindow_Param_ShowTarget": "Montrer la cible",
"ConfigWindow_Param_TargetIconSize": "The size of the next ability that will be used icon.",
diff --git a/RotationSolver/Localization/ja.json b/RotationSolver/Localization/ja.json
index 0ca6b3002..abef93bc0 100644
--- a/RotationSolver/Localization/ja.json
+++ b/RotationSolver/Localization/ja.json
@@ -81,7 +81,6 @@
"ConfigWindow_Param_SampleLength": "Drawing smoothness.",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing abilities",
"ConfigWindow_Param_KeyBoardNoiseTimes": "効果時間",
- "ConfigWindow_Param_DrawMeleeOffset": "近接攻撃のオフセットを画面に描画する",
"ConfigWindow_Param_ShowMoveTarget": "移動アクションのターゲットを表示",
"ConfigWindow_Param_ShowTarget": "ターゲットを表示",
"ConfigWindow_Param_TargetIconSize": "The size of the next ability that will be used icon.",
diff --git a/RotationSolver/Localization/zh.json b/RotationSolver/Localization/zh.json
index adbdc25a4..fa88fbeb5 100644
--- a/RotationSolver/Localization/zh.json
+++ b/RotationSolver/Localization/zh.json
@@ -81,7 +81,6 @@
"ConfigWindow_Param_SampleLength": "Drawing smoothness.",
"ConfigWindow_Param_KeyBoardNoise": "Simulate the effect of pressing abilities",
"ConfigWindow_Param_KeyBoardNoiseTimes": "模拟按下次数",
- "ConfigWindow_Param_DrawMeleeOffset": "在屏幕上绘制近战最大边缘距离",
"ConfigWindow_Param_ShowMoveTarget": "显示移动技能的目标",
"ConfigWindow_Param_ShowTarget": "显示目标",
"ConfigWindow_Param_TargetIconSize": "The size of the next ability that will be used icon.",
diff --git a/RotationSolver/UI/PainterManager.cs b/RotationSolver/UI/PainterManager.cs
index 7f231e7bf..22d815d84 100644
--- a/RotationSolver/UI/PainterManager.cs
+++ b/RotationSolver/UI/PainterManager.cs
@@ -218,19 +218,6 @@ public static void Init()
var annulus = new Drawing3DAnnulusO(Player.Object, 3, 3 + Service.Config.GetValue(PluginConfigFloat.MeleeRangeOffset), 0, 2);
annulus.InsideColor = ImGui.ColorConvertFloat4ToU32(new Vector4(0.8f, 0.3f, 0.2f, 0.15f));
- annulus.UpdateEveryFrame = () =>
- {
- if (Player.Available && (Player.Object.IsJobCategory(JobRole.Tank) || Player.Object.IsJobCategory(JobRole.Melee)) && (Svc.Targets.Target?.IsEnemy() ?? false) && Service.Config.GetValue(PluginConfigBool.DrawMeleeOffset)
- && ActionUpdater.NextGCDAction == null)
- {
- annulus.Target = Svc.Targets.Target;
- }
- else
- {
- annulus.Target = null;
- }
- };
-
var color = ImGui.GetColorU32(Service.Config.GetValue(PluginConfigVector4.MovingTargetColor));
var movingTarget = new Drawing3DHighlightLine(default, default, 0, color, 3);
movingTarget.UpdateEveryFrame = () =>
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index 35e694a6d..729946a58 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -478,9 +478,7 @@ private static void DrawUI()
new CheckBoxSearchPlugin(PluginConfigBool.ShowBeneficialPositions,
new ColorEditSearchPlugin(PluginConfigVector4.BeneficialPositionColor),
new ColorEditSearchPlugin(PluginConfigVector4.HoveredBeneficialPositionColor)
- ),
-
- new CheckBoxSearchPlugin(PluginConfigBool.DrawMeleeOffset)),
+ )),
};
// Windows
From 4931cd4c94c6f12a573755a2fbc96adcfe47b9e1 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Sat, 27 Jan 2024 10:00:21 +0000
Subject: [PATCH 64/73] remove pos lock
---
RotationSolver.Basic/Configuration/Configs.cs | 7 -------
RotationSolver.Basic/DataCenter.cs | 7 +------
.../Localization/ConfigTranslation.cs | 3 ---
RotationSolver/Localization/Localization.json | 3 ---
RotationSolver/Localization/Strings.cs | 3 ---
RotationSolver/Localization/de.json | 3 ---
RotationSolver/Localization/es.json | 3 ---
RotationSolver/Localization/fr.json | 3 ---
RotationSolver/Localization/ja.json | 3 ---
RotationSolver/Localization/zh.json | 3 ---
.../UI/RotationConfigWindow_Config.cs | 19 -----------------
RotationSolver/Updaters/MovingUpdater.cs | 21 -------------------
12 files changed, 1 insertion(+), 77 deletions(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 3894373fc..52a5c6850 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -245,7 +245,6 @@ public class GlobalConfig
public enum PluginConfigInt : byte
{
[Default(0)] ActionSequencerIndex,
- [Default(0)] PoslockModifier,
[Default(0, 0, 10000)] LessMPNoRaise,
[Default(2, 0, 5)] KeyBoardNoiseMin,
@@ -271,12 +270,6 @@ public enum PluginConfigBool : byte
[Default(false)] ShowInfoOnToast,
[Default(false)] RaiseAll,
- [Default(false)] PoslockCasting,
- [Default(false)] PosPassageOfArms,
- [Default(false)] PosTenChiJin,
- [Default(false)] PosFlameThrower,
- [Default(false)] PosImprovisation,
-
[Default(true)] RaisePlayerByCasting,
[Default(true)] RaiseBrinkOfDeath,
[Default(false)] TargetAllSolo,
diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs
index 1d19dd4a0..9da100a59 100644
--- a/RotationSolver.Basic/DataCenter.cs
+++ b/RotationSolver.Basic/DataCenter.cs
@@ -77,12 +77,7 @@ public static MajorConditionSet RightSet
public static ICustomRotation RightNowRotation { get; internal set; }
- internal static bool NoPoslock => Svc.Condition[ConditionFlag.OccupiedInEvent]
- || !Service.Config.GetValue(PluginConfigBool.PoslockCasting)
- //Key cancel.
- || Svc.KeyState[ConfigurationHelper.Keys[Service.Config.GetValue(PluginConfigInt.PoslockModifier) % ConfigurationHelper.Keys.Length]]
- //Gamepad cancel.
- || Svc.GamepadState.Raw(Dalamud.Game.ClientState.GamePad.GamepadButtons.L2) >= 0.5f;
+ internal static bool NoPoslock => Svc.Condition[ConditionFlag.OccupiedInEvent];
internal static DateTime EffectTime { private get; set; } = DateTime.Now;
internal static DateTime EffectEndTime { private get; set; } = DateTime.Now;
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 1ad555056..9277960c2 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -37,7 +37,6 @@ internal static class ConfigTranslation
public static string ToName(this PluginConfigInt config) => config switch
{
- PluginConfigInt.PoslockModifier => LocalizationManager.RightLang.ConfigWindow_Param_PoslockModifier,
PluginConfigInt.BeneficialAreaStrategy => LocalizationManager.RightLang.ConfigWindow_Auto_BeneficialAreaStrategy,
// UI
@@ -144,7 +143,6 @@ internal static class ConfigTranslation
// extra
PluginConfigBool.SayOutStateChanged => LocalizationManager.RightLang.ConfigWindow_Param_SayOutStateChanged,
- PluginConfigBool.PoslockCasting => LocalizationManager.RightLang.ConfigWindow_Param_PoslockCasting,
PluginConfigBool.ShowTooltips => LocalizationManager.RightLang.ConfigWindow_Param_ShowTooltips,
PluginConfigBool.InDebug => LocalizationManager.RightLang.ConfigWindow_Param_InDebug,
PluginConfigBool.AutoOpenChest => "Auto Open the treasure chest",
@@ -241,7 +239,6 @@ internal static class ConfigTranslation
public static string ToDescription(this PluginConfigInt config) => config switch
{
- PluginConfigInt.PoslockModifier => LocalizationManager.RightLang.ConfigWindow_Param_PoslockDescription,
PluginConfigInt.AutoDefenseNumber => LocalizationManager.RightLang.ConfigWindow_Auto_AutoDefenseNumber,
_ => string.Empty,
diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json
index 6778ff00c..3c4b6a591 100644
--- a/RotationSolver/Localization/Localization.json
+++ b/RotationSolver/Localization/Localization.json
@@ -63,15 +63,12 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
"ConfigWindow_Param_InDebug": "Debug Mode",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
- "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
- "ConfigWindow_Param_PoslockDescription": "LT is for gamepad player",
"ConfigWindow_Param_TeachingMode": "Teaching mode",
"ConfigWindow_Param_TeachingModeColor": "Prompt box color of teaching mode",
"ConfigWindow_Param_MovingTargetColor": "Prompt box color of moving target",
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index cab73d59b..68a8151e1 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -117,7 +117,6 @@ internal class Strings
public string ConfigWindow_Param_ClickingDelay { get; set; } = "The range of random delay for clicking actions.";
public string ConfigWindow_Param_StopCastingDelay { get; set; } = "The range of random delay for stopping casting when the target is dead or immune to damage.";
- public string ConfigWindow_Param_PoslockCasting { get; set; } = "Lock the movement when casting or when doing some actions.";
public string ConfigWindow_Param_UseStopCasting { get; set; } = "Stops casting when the target is dead.";
public string ConfigWindow_Param_ShowTooltips { get; set; } = "Show tooltips";
public string ConfigWindow_Param_InDebug { get; set; } = "Debug Mode";
@@ -127,8 +126,6 @@ internal class Strings
public string ConfigWindow_Param_BossTimeToKill { get; set; } = "If target's time until death is higher than this, regard it as boss.";
public string ConfigWindow_Param_DyingTimeToKill { get; set; } = "If target's time until death is lower than this, regard it is dying.";
- public string ConfigWindow_Param_PoslockModifier { get; set; } = "The modifier key to unlock the movement temporary";
- public string ConfigWindow_Param_PoslockDescription { get; set; } = "LT is for gamepad player";
public string ConfigWindow_Param_TeachingMode { get; set; } = "Teaching mode";
public string ConfigWindow_Param_TeachingModeColor { get; set; } = "Prompt box color of teaching mode";
public string ConfigWindow_Param_MovingTargetColor { get; set; } = "Prompt box color of moving target";
diff --git a/RotationSolver/Localization/de.json b/RotationSolver/Localization/de.json
index 3e3273f10..674efa41b 100644
--- a/RotationSolver/Localization/de.json
+++ b/RotationSolver/Localization/de.json
@@ -63,15 +63,12 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
"ConfigWindow_Param_InDebug": "Debug-Modus",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
- "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
- "ConfigWindow_Param_PoslockDescription": "LT is for gamepad player",
"ConfigWindow_Param_TeachingMode": "Teaching mode",
"ConfigWindow_Param_TeachingModeColor": "Prompt box color of teaching mode",
"ConfigWindow_Param_MovingTargetColor": "Prompt box color of moving target",
diff --git a/RotationSolver/Localization/es.json b/RotationSolver/Localization/es.json
index 8dabb1ca2..8a61903bd 100644
--- a/RotationSolver/Localization/es.json
+++ b/RotationSolver/Localization/es.json
@@ -63,15 +63,12 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
"ConfigWindow_Param_InDebug": "Debug Mode",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
- "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
- "ConfigWindow_Param_PoslockDescription": "LT is for gamepad player",
"ConfigWindow_Param_TeachingMode": "Teaching mode",
"ConfigWindow_Param_TeachingModeColor": "Prompt box color of teaching mode",
"ConfigWindow_Param_MovingTargetColor": "Prompt box color of moving target",
diff --git a/RotationSolver/Localization/fr.json b/RotationSolver/Localization/fr.json
index 75c5b81ca..e18a9700a 100644
--- a/RotationSolver/Localization/fr.json
+++ b/RotationSolver/Localization/fr.json
@@ -63,15 +63,12 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Afficher les info-bulles",
"ConfigWindow_Param_InDebug": "Débogage",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
- "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
- "ConfigWindow_Param_PoslockDescription": "LT est pour le joueur manette",
"ConfigWindow_Param_TeachingMode": "Mode apprentissage",
"ConfigWindow_Param_TeachingModeColor": "Couleur de la boîte de message du mode d'apprentissage",
"ConfigWindow_Param_MovingTargetColor": "Couleur de la boîte de notification de la cible mouvante",
diff --git a/RotationSolver/Localization/ja.json b/RotationSolver/Localization/ja.json
index abef93bc0..ead1f44a8 100644
--- a/RotationSolver/Localization/ja.json
+++ b/RotationSolver/Localization/ja.json
@@ -63,15 +63,12 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_PoslockCasting": "キャスト時やアクション時に移動を停止します。",
"ConfigWindow_Param_UseStopCasting": "ターゲットが死んだ時、キャスティングをやめる。",
"ConfigWindow_Param_ShowTooltips": "ツールチップを表示",
"ConfigWindow_Param_InDebug": "デバッグモード",
"ConfigWindow_Param_ShowTargetTimeToKill": "目標を倒すまでの時間を表示します。",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "ターゲットを倒すまでの時間がこれよりも短い場合は、それは倒しているとみなします。",
- "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
- "ConfigWindow_Param_PoslockDescription": "ゲームパッドではLTで解除できます",
"ConfigWindow_Param_TeachingMode": "指導モード",
"ConfigWindow_Param_TeachingModeColor": "指導モードのメッセージ色",
"ConfigWindow_Param_MovingTargetColor": "移動ターゲットのメッセージボックスの色",
diff --git a/RotationSolver/Localization/zh.json b/RotationSolver/Localization/zh.json
index fa88fbeb5..6ad98f095 100644
--- a/RotationSolver/Localization/zh.json
+++ b/RotationSolver/Localization/zh.json
@@ -63,15 +63,12 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
- "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "显示提示信息",
"ConfigWindow_Param_InDebug": "Debug 模式",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
- "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
- "ConfigWindow_Param_PoslockDescription": "LT是为游戏手柄玩家准备的",
"ConfigWindow_Param_TeachingMode": "循环教学模式",
"ConfigWindow_Param_TeachingModeColor": "教学模式的提示框颜色",
"ConfigWindow_Param_MovingTargetColor": "移动目标的提示框颜色",
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index 729946a58..4e279c35a 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -969,25 +969,6 @@ private static void DrawExtra()
private static readonly ISearchable[] _extraSearchable = new ISearchable[]
{
- new CheckBoxSearchPlugin(PluginConfigBool.PoslockCasting,
- new DragIntSearchPlugin(PluginConfigInt.PoslockModifier, () => new string[]{ "CTRL", "SHIFT", "ALT" }),
- new CheckBoxSearchPlugin(PluginConfigBool.PosPassageOfArms)
- {
- Action = ActionID.PassageOfArms
- },
- new CheckBoxSearchPlugin(PluginConfigBool.PosTenChiJin)
- {
- Action = ActionID.TenChiJin
- },
- new CheckBoxSearchPlugin(PluginConfigBool.PosFlameThrower)
- {
- Action = ActionID.FlameThrower
- },
- new CheckBoxSearchPlugin(PluginConfigBool.PosImprovisation)
- {
- Action = ActionID.Improvisation
- }),
-
new CheckBoxSearchPlugin(PluginConfigBool.UseStopCasting,new ISearchable[]
{
new DragFloatRangeSearchPlugin(PluginConfigFloat.StopCastingDelayMin, PluginConfigFloat.StopCastingDelayMax, 0.002f)
diff --git a/RotationSolver/Updaters/MovingUpdater.cs b/RotationSolver/Updaters/MovingUpdater.cs
index db3b67724..b5dd9840f 100644
--- a/RotationSolver/Updaters/MovingUpdater.cs
+++ b/RotationSolver/Updaters/MovingUpdater.cs
@@ -26,27 +26,6 @@ internal unsafe static void UpdateCanMove(bool doNextAction)
var statusList = new List(4);
var actionList = new List(4);
- if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosFlameThrower))
- {
- statusList.Add(StatusID.Flamethrower);
- actionList.Add(ActionID.FlameThrower);
- }
- if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosTenChiJin))
- {
- statusList.Add(StatusID.TenChiJin);
- actionList.Add(ActionID.TenChiJin);
- }
- if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosPassageOfArms))
- {
- statusList.Add(StatusID.PassageOfArms);
- actionList.Add(ActionID.PassageOfArms);
- }
- if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosImprovisation))
- {
- statusList.Add(StatusID.Improvisation);
- actionList.Add(ActionID.Improvisation);
- }
-
//Action
var action = DateTime.Now - RSCommands._lastUsedTime < TimeSpan.FromMilliseconds(100)
? (ActionID)RSCommands._lastActionID
From 7a130b6f7cedb6eae3c69bebc0348ab2913ac52f Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Mon, 5 Feb 2024 21:41:10 -0600
Subject: [PATCH 65/73] Update downloadList.json
---
Resources/downloadList.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Resources/downloadList.json b/Resources/downloadList.json
index bdf1e834e..450c34566 100644
--- a/Resources/downloadList.json
+++ b/Resources/downloadList.json
@@ -1,5 +1,5 @@
[
- "ArchiDog1998|FFXIVRotations|DefaultRotations",
+ "LTS-FFXIV|LTSDefaults|DefaultRotations",
"IncognitoWater|IncognitoWaterRotations|IcWaRotations",
"BrakusTapus|KirboRotations|KirboRotations",
"LTS-FFXIV|LTSRotatos|LTSRotatos",
From e59b3f1086e8b172f8fd3ee34a5e57c24aed82e0 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Tue, 6 Feb 2024 13:48:31 +0000
Subject: [PATCH 66/73] for realsies remove orbwalker
---
RotationSolver.Basic/Service.cs | 35 +--------------------------------
1 file changed, 1 insertion(+), 34 deletions(-)
diff --git a/RotationSolver.Basic/Service.cs b/RotationSolver.Basic/Service.cs
index 93ddef163..b6d9ad4c1 100644
--- a/RotationSolver.Basic/Service.cs
+++ b/RotationSolver.Basic/Service.cs
@@ -10,33 +10,6 @@ namespace RotationSolver.Basic;
internal class Service : IDisposable
{
public const string COMMAND = "/rotation", USERNAME = "Jaksuhn", REPO = "RotationSolver", BRANCH = "testing";
-
- // From https://GitHub.com/PunishXIV/Orbwalker/blame/master/Orbwalker/Memory.cs#L85-L87
- [Signature("F3 0F 10 05 ?? ?? ?? ?? 0F 2E C6 0F 8A", ScanType = ScanType.StaticAddress, Fallibility = Fallibility.Infallible)]
- static IntPtr forceDisableMovementPtr = IntPtr.Zero;
- private static unsafe ref int ForceDisableMovement => ref *(int*)(forceDisableMovementPtr + 4);
-
- static bool _canMove = true;
- internal static unsafe bool CanMove
- {
- get => ForceDisableMovement == 0;
- set
- {
- var realCanMove = value || DataCenter.NoPoslock;
- if (_canMove == realCanMove) return;
- _canMove = realCanMove;
-
- if (!realCanMove)
- {
- ForceDisableMovement++;
- }
- else if (ForceDisableMovement > 0)
- {
- ForceDisableMovement--;
- }
- }
- }
-
public static float CountDownTime => Countdown.TimeRemaining;
public static PluginConfig Config { get; set; } = new PluginConfig();
@@ -61,11 +34,5 @@ public unsafe static IEnumerable GetAddons() where T : struct
public static ExcelSheet GetSheet() where T : ExcelRow => Svc.Data.GetExcelSheet();
- public void Dispose()
- {
- if (!_canMove && ForceDisableMovement > 0)
- {
- ForceDisableMovement--;
- }
- }
+ public void Dispose() { }
}
From 19b7b9d1c140627c3735fb4e60589792ca682afd Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Tue, 6 Feb 2024 13:52:51 +0000
Subject: [PATCH 67/73] Update Service.cs
---
RotationSolver.Basic/Service.cs | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/RotationSolver.Basic/Service.cs b/RotationSolver.Basic/Service.cs
index b6d9ad4c1..68e4c4006 100644
--- a/RotationSolver.Basic/Service.cs
+++ b/RotationSolver.Basic/Service.cs
@@ -10,6 +10,18 @@ namespace RotationSolver.Basic;
internal class Service : IDisposable
{
public const string COMMAND = "/rotation", USERNAME = "Jaksuhn", REPO = "RotationSolver", BRANCH = "testing";
+
+ static bool _canMove = true;
+ internal static unsafe bool CanMove
+ {
+ set
+ {
+ var realCanMove = value || DataCenter.NoPoslock;
+ if (_canMove == realCanMove) return;
+ _canMove = realCanMove;
+ }
+ }
+
public static float CountDownTime => Countdown.TimeRemaining;
public static PluginConfig Config { get; set; } = new PluginConfig();
From 7e940e61942453dc41a5f4fb5cea2e299506c3da Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Tue, 6 Feb 2024 15:02:30 +0000
Subject: [PATCH 68/73] Revert "Update Service.cs"
This reverts commit 19b7b9d1c140627c3735fb4e60589792ca682afd.
---
RotationSolver.Basic/Service.cs | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/RotationSolver.Basic/Service.cs b/RotationSolver.Basic/Service.cs
index 68e4c4006..b6d9ad4c1 100644
--- a/RotationSolver.Basic/Service.cs
+++ b/RotationSolver.Basic/Service.cs
@@ -10,18 +10,6 @@ namespace RotationSolver.Basic;
internal class Service : IDisposable
{
public const string COMMAND = "/rotation", USERNAME = "Jaksuhn", REPO = "RotationSolver", BRANCH = "testing";
-
- static bool _canMove = true;
- internal static unsafe bool CanMove
- {
- set
- {
- var realCanMove = value || DataCenter.NoPoslock;
- if (_canMove == realCanMove) return;
- _canMove = realCanMove;
- }
- }
-
public static float CountDownTime => Countdown.TimeRemaining;
public static PluginConfig Config { get; set; } = new PluginConfig();
From 2c6e11bbc4f948e713e5b5392dd43722b4f6117c Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Tue, 6 Feb 2024 15:02:34 +0000
Subject: [PATCH 69/73] Revert "for realsies remove orbwalker"
This reverts commit e59b3f1086e8b172f8fd3ee34a5e57c24aed82e0.
---
RotationSolver.Basic/Service.cs | 35 ++++++++++++++++++++++++++++++++-
1 file changed, 34 insertions(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Service.cs b/RotationSolver.Basic/Service.cs
index b6d9ad4c1..93ddef163 100644
--- a/RotationSolver.Basic/Service.cs
+++ b/RotationSolver.Basic/Service.cs
@@ -10,6 +10,33 @@ namespace RotationSolver.Basic;
internal class Service : IDisposable
{
public const string COMMAND = "/rotation", USERNAME = "Jaksuhn", REPO = "RotationSolver", BRANCH = "testing";
+
+ // From https://GitHub.com/PunishXIV/Orbwalker/blame/master/Orbwalker/Memory.cs#L85-L87
+ [Signature("F3 0F 10 05 ?? ?? ?? ?? 0F 2E C6 0F 8A", ScanType = ScanType.StaticAddress, Fallibility = Fallibility.Infallible)]
+ static IntPtr forceDisableMovementPtr = IntPtr.Zero;
+ private static unsafe ref int ForceDisableMovement => ref *(int*)(forceDisableMovementPtr + 4);
+
+ static bool _canMove = true;
+ internal static unsafe bool CanMove
+ {
+ get => ForceDisableMovement == 0;
+ set
+ {
+ var realCanMove = value || DataCenter.NoPoslock;
+ if (_canMove == realCanMove) return;
+ _canMove = realCanMove;
+
+ if (!realCanMove)
+ {
+ ForceDisableMovement++;
+ }
+ else if (ForceDisableMovement > 0)
+ {
+ ForceDisableMovement--;
+ }
+ }
+ }
+
public static float CountDownTime => Countdown.TimeRemaining;
public static PluginConfig Config { get; set; } = new PluginConfig();
@@ -34,5 +61,11 @@ public unsafe static IEnumerable GetAddons() where T : struct
public static ExcelSheet GetSheet() where T : ExcelRow => Svc.Data.GetExcelSheet();
- public void Dispose() { }
+ public void Dispose()
+ {
+ if (!_canMove && ForceDisableMovement > 0)
+ {
+ ForceDisableMovement--;
+ }
+ }
}
From bbaac5668f1cea0ce4a21373960af0e2c66c80c8 Mon Sep 17 00:00:00 2001
From: Jackson <9527380+Jaksuhn@users.noreply.github.com>
Date: Tue, 6 Feb 2024 15:02:37 +0000
Subject: [PATCH 70/73] Revert "remove pos lock"
This reverts commit 4931cd4c94c6f12a573755a2fbc96adcfe47b9e1.
---
RotationSolver.Basic/Configuration/Configs.cs | 7 +++++++
RotationSolver.Basic/DataCenter.cs | 7 ++++++-
.../Localization/ConfigTranslation.cs | 3 +++
RotationSolver/Localization/Localization.json | 3 +++
RotationSolver/Localization/Strings.cs | 3 +++
RotationSolver/Localization/de.json | 3 +++
RotationSolver/Localization/es.json | 3 +++
RotationSolver/Localization/fr.json | 3 +++
RotationSolver/Localization/ja.json | 3 +++
RotationSolver/Localization/zh.json | 3 +++
.../UI/RotationConfigWindow_Config.cs | 19 +++++++++++++++++
RotationSolver/Updaters/MovingUpdater.cs | 21 +++++++++++++++++++
12 files changed, 77 insertions(+), 1 deletion(-)
diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs
index 52a5c6850..3894373fc 100644
--- a/RotationSolver.Basic/Configuration/Configs.cs
+++ b/RotationSolver.Basic/Configuration/Configs.cs
@@ -245,6 +245,7 @@ public class GlobalConfig
public enum PluginConfigInt : byte
{
[Default(0)] ActionSequencerIndex,
+ [Default(0)] PoslockModifier,
[Default(0, 0, 10000)] LessMPNoRaise,
[Default(2, 0, 5)] KeyBoardNoiseMin,
@@ -270,6 +271,12 @@ public enum PluginConfigBool : byte
[Default(false)] ShowInfoOnToast,
[Default(false)] RaiseAll,
+ [Default(false)] PoslockCasting,
+ [Default(false)] PosPassageOfArms,
+ [Default(false)] PosTenChiJin,
+ [Default(false)] PosFlameThrower,
+ [Default(false)] PosImprovisation,
+
[Default(true)] RaisePlayerByCasting,
[Default(true)] RaiseBrinkOfDeath,
[Default(false)] TargetAllSolo,
diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs
index 9da100a59..1d19dd4a0 100644
--- a/RotationSolver.Basic/DataCenter.cs
+++ b/RotationSolver.Basic/DataCenter.cs
@@ -77,7 +77,12 @@ public static MajorConditionSet RightSet
public static ICustomRotation RightNowRotation { get; internal set; }
- internal static bool NoPoslock => Svc.Condition[ConditionFlag.OccupiedInEvent];
+ internal static bool NoPoslock => Svc.Condition[ConditionFlag.OccupiedInEvent]
+ || !Service.Config.GetValue(PluginConfigBool.PoslockCasting)
+ //Key cancel.
+ || Svc.KeyState[ConfigurationHelper.Keys[Service.Config.GetValue(PluginConfigInt.PoslockModifier) % ConfigurationHelper.Keys.Length]]
+ //Gamepad cancel.
+ || Svc.GamepadState.Raw(Dalamud.Game.ClientState.GamePad.GamepadButtons.L2) >= 0.5f;
internal static DateTime EffectTime { private get; set; } = DateTime.Now;
internal static DateTime EffectEndTime { private get; set; } = DateTime.Now;
diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs
index 9277960c2..1ad555056 100644
--- a/RotationSolver/Localization/ConfigTranslation.cs
+++ b/RotationSolver/Localization/ConfigTranslation.cs
@@ -37,6 +37,7 @@ internal static class ConfigTranslation
public static string ToName(this PluginConfigInt config) => config switch
{
+ PluginConfigInt.PoslockModifier => LocalizationManager.RightLang.ConfigWindow_Param_PoslockModifier,
PluginConfigInt.BeneficialAreaStrategy => LocalizationManager.RightLang.ConfigWindow_Auto_BeneficialAreaStrategy,
// UI
@@ -143,6 +144,7 @@ internal static class ConfigTranslation
// extra
PluginConfigBool.SayOutStateChanged => LocalizationManager.RightLang.ConfigWindow_Param_SayOutStateChanged,
+ PluginConfigBool.PoslockCasting => LocalizationManager.RightLang.ConfigWindow_Param_PoslockCasting,
PluginConfigBool.ShowTooltips => LocalizationManager.RightLang.ConfigWindow_Param_ShowTooltips,
PluginConfigBool.InDebug => LocalizationManager.RightLang.ConfigWindow_Param_InDebug,
PluginConfigBool.AutoOpenChest => "Auto Open the treasure chest",
@@ -239,6 +241,7 @@ internal static class ConfigTranslation
public static string ToDescription(this PluginConfigInt config) => config switch
{
+ PluginConfigInt.PoslockModifier => LocalizationManager.RightLang.ConfigWindow_Param_PoslockDescription,
PluginConfigInt.AutoDefenseNumber => LocalizationManager.RightLang.ConfigWindow_Auto_AutoDefenseNumber,
_ => string.Empty,
diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json
index 3c4b6a591..6778ff00c 100644
--- a/RotationSolver/Localization/Localization.json
+++ b/RotationSolver/Localization/Localization.json
@@ -63,12 +63,15 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
+ "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
"ConfigWindow_Param_InDebug": "Debug Mode",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
+ "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
+ "ConfigWindow_Param_PoslockDescription": "LT is for gamepad player",
"ConfigWindow_Param_TeachingMode": "Teaching mode",
"ConfigWindow_Param_TeachingModeColor": "Prompt box color of teaching mode",
"ConfigWindow_Param_MovingTargetColor": "Prompt box color of moving target",
diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs
index 68a8151e1..cab73d59b 100644
--- a/RotationSolver/Localization/Strings.cs
+++ b/RotationSolver/Localization/Strings.cs
@@ -117,6 +117,7 @@ internal class Strings
public string ConfigWindow_Param_ClickingDelay { get; set; } = "The range of random delay for clicking actions.";
public string ConfigWindow_Param_StopCastingDelay { get; set; } = "The range of random delay for stopping casting when the target is dead or immune to damage.";
+ public string ConfigWindow_Param_PoslockCasting { get; set; } = "Lock the movement when casting or when doing some actions.";
public string ConfigWindow_Param_UseStopCasting { get; set; } = "Stops casting when the target is dead.";
public string ConfigWindow_Param_ShowTooltips { get; set; } = "Show tooltips";
public string ConfigWindow_Param_InDebug { get; set; } = "Debug Mode";
@@ -126,6 +127,8 @@ internal class Strings
public string ConfigWindow_Param_BossTimeToKill { get; set; } = "If target's time until death is higher than this, regard it as boss.";
public string ConfigWindow_Param_DyingTimeToKill { get; set; } = "If target's time until death is lower than this, regard it is dying.";
+ public string ConfigWindow_Param_PoslockModifier { get; set; } = "The modifier key to unlock the movement temporary";
+ public string ConfigWindow_Param_PoslockDescription { get; set; } = "LT is for gamepad player";
public string ConfigWindow_Param_TeachingMode { get; set; } = "Teaching mode";
public string ConfigWindow_Param_TeachingModeColor { get; set; } = "Prompt box color of teaching mode";
public string ConfigWindow_Param_MovingTargetColor { get; set; } = "Prompt box color of moving target";
diff --git a/RotationSolver/Localization/de.json b/RotationSolver/Localization/de.json
index 674efa41b..3e3273f10 100644
--- a/RotationSolver/Localization/de.json
+++ b/RotationSolver/Localization/de.json
@@ -63,12 +63,15 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
+ "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
"ConfigWindow_Param_InDebug": "Debug-Modus",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
+ "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
+ "ConfigWindow_Param_PoslockDescription": "LT is for gamepad player",
"ConfigWindow_Param_TeachingMode": "Teaching mode",
"ConfigWindow_Param_TeachingModeColor": "Prompt box color of teaching mode",
"ConfigWindow_Param_MovingTargetColor": "Prompt box color of moving target",
diff --git a/RotationSolver/Localization/es.json b/RotationSolver/Localization/es.json
index 8a61903bd..8dabb1ca2 100644
--- a/RotationSolver/Localization/es.json
+++ b/RotationSolver/Localization/es.json
@@ -63,12 +63,15 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
+ "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Show tooltips",
"ConfigWindow_Param_InDebug": "Debug Mode",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
+ "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
+ "ConfigWindow_Param_PoslockDescription": "LT is for gamepad player",
"ConfigWindow_Param_TeachingMode": "Teaching mode",
"ConfigWindow_Param_TeachingModeColor": "Prompt box color of teaching mode",
"ConfigWindow_Param_MovingTargetColor": "Prompt box color of moving target",
diff --git a/RotationSolver/Localization/fr.json b/RotationSolver/Localization/fr.json
index e18a9700a..75c5b81ca 100644
--- a/RotationSolver/Localization/fr.json
+++ b/RotationSolver/Localization/fr.json
@@ -63,12 +63,15 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
+ "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "Afficher les info-bulles",
"ConfigWindow_Param_InDebug": "Débogage",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
+ "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
+ "ConfigWindow_Param_PoslockDescription": "LT est pour le joueur manette",
"ConfigWindow_Param_TeachingMode": "Mode apprentissage",
"ConfigWindow_Param_TeachingModeColor": "Couleur de la boîte de message du mode d'apprentissage",
"ConfigWindow_Param_MovingTargetColor": "Couleur de la boîte de notification de la cible mouvante",
diff --git a/RotationSolver/Localization/ja.json b/RotationSolver/Localization/ja.json
index ead1f44a8..abef93bc0 100644
--- a/RotationSolver/Localization/ja.json
+++ b/RotationSolver/Localization/ja.json
@@ -63,12 +63,15 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
+ "ConfigWindow_Param_PoslockCasting": "キャスト時やアクション時に移動を停止します。",
"ConfigWindow_Param_UseStopCasting": "ターゲットが死んだ時、キャスティングをやめる。",
"ConfigWindow_Param_ShowTooltips": "ツールチップを表示",
"ConfigWindow_Param_InDebug": "デバッグモード",
"ConfigWindow_Param_ShowTargetTimeToKill": "目標を倒すまでの時間を表示します。",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "ターゲットを倒すまでの時間がこれよりも短い場合は、それは倒しているとみなします。",
+ "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
+ "ConfigWindow_Param_PoslockDescription": "ゲームパッドではLTで解除できます",
"ConfigWindow_Param_TeachingMode": "指導モード",
"ConfigWindow_Param_TeachingModeColor": "指導モードのメッセージ色",
"ConfigWindow_Param_MovingTargetColor": "移動ターゲットのメッセージボックスの色",
diff --git a/RotationSolver/Localization/zh.json b/RotationSolver/Localization/zh.json
index 6ad98f095..fa88fbeb5 100644
--- a/RotationSolver/Localization/zh.json
+++ b/RotationSolver/Localization/zh.json
@@ -63,12 +63,15 @@
"ConfigWindow_Param_NotInCombatDelay": "The range of random delay for Not In Combat.",
"ConfigWindow_Param_ClickingDelay": "The range of random delay for clicking actions.",
"ConfigWindow_Param_StopCastingDelay": "The range of random delay for stopping casting when the target is dead or immune to damage.",
+ "ConfigWindow_Param_PoslockCasting": "Lock the movement when casting or when doing some actions.",
"ConfigWindow_Param_UseStopCasting": "Stops casting when the target is dead.",
"ConfigWindow_Param_ShowTooltips": "显示提示信息",
"ConfigWindow_Param_InDebug": "Debug 模式",
"ConfigWindow_Param_ShowTargetTimeToKill": "Show the target's time to kill.",
"ConfigWindow_Param_BossTimeToKill": "If target's time until death is higher than this, regard it as boss.",
"ConfigWindow_Param_DyingTimeToKill": "If target's time until death is lower than this, regard it is dying.",
+ "ConfigWindow_Param_PoslockModifier": "The modifier key to unlock the movement temporary",
+ "ConfigWindow_Param_PoslockDescription": "LT是为游戏手柄玩家准备的",
"ConfigWindow_Param_TeachingMode": "循环教学模式",
"ConfigWindow_Param_TeachingModeColor": "教学模式的提示框颜色",
"ConfigWindow_Param_MovingTargetColor": "移动目标的提示框颜色",
diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs
index 4e279c35a..729946a58 100644
--- a/RotationSolver/UI/RotationConfigWindow_Config.cs
+++ b/RotationSolver/UI/RotationConfigWindow_Config.cs
@@ -969,6 +969,25 @@ private static void DrawExtra()
private static readonly ISearchable[] _extraSearchable = new ISearchable[]
{
+ new CheckBoxSearchPlugin(PluginConfigBool.PoslockCasting,
+ new DragIntSearchPlugin(PluginConfigInt.PoslockModifier, () => new string[]{ "CTRL", "SHIFT", "ALT" }),
+ new CheckBoxSearchPlugin(PluginConfigBool.PosPassageOfArms)
+ {
+ Action = ActionID.PassageOfArms
+ },
+ new CheckBoxSearchPlugin(PluginConfigBool.PosTenChiJin)
+ {
+ Action = ActionID.TenChiJin
+ },
+ new CheckBoxSearchPlugin(PluginConfigBool.PosFlameThrower)
+ {
+ Action = ActionID.FlameThrower
+ },
+ new CheckBoxSearchPlugin(PluginConfigBool.PosImprovisation)
+ {
+ Action = ActionID.Improvisation
+ }),
+
new CheckBoxSearchPlugin(PluginConfigBool.UseStopCasting,new ISearchable[]
{
new DragFloatRangeSearchPlugin(PluginConfigFloat.StopCastingDelayMin, PluginConfigFloat.StopCastingDelayMax, 0.002f)
diff --git a/RotationSolver/Updaters/MovingUpdater.cs b/RotationSolver/Updaters/MovingUpdater.cs
index b5dd9840f..db3b67724 100644
--- a/RotationSolver/Updaters/MovingUpdater.cs
+++ b/RotationSolver/Updaters/MovingUpdater.cs
@@ -26,6 +26,27 @@ internal unsafe static void UpdateCanMove(bool doNextAction)
var statusList = new List(4);
var actionList = new List(4);
+ if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosFlameThrower))
+ {
+ statusList.Add(StatusID.Flamethrower);
+ actionList.Add(ActionID.FlameThrower);
+ }
+ if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosTenChiJin))
+ {
+ statusList.Add(StatusID.TenChiJin);
+ actionList.Add(ActionID.TenChiJin);
+ }
+ if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosPassageOfArms))
+ {
+ statusList.Add(StatusID.PassageOfArms);
+ actionList.Add(ActionID.PassageOfArms);
+ }
+ if (Service.Config.GetValue(Basic.Configuration.PluginConfigBool.PosImprovisation))
+ {
+ statusList.Add(StatusID.Improvisation);
+ actionList.Add(ActionID.Improvisation);
+ }
+
//Action
var action = DateTime.Now - RSCommands._lastUsedTime < TimeSpan.FromMilliseconds(100)
? (ActionID)RSCommands._lastActionID
From cf501fcfda5d0a25d90e0ab5bd9db714a66a66c5 Mon Sep 17 00:00:00 2001
From: Ehl'tee Es <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Tue, 13 Feb 2024 09:29:20 -0600
Subject: [PATCH 71/73] Update downloadList.json
Removing Rotatoes as I have rolled those optimizations into my defaults, removing kirbo's as well as repo is redundant where it works and broken where its different than Defaults
---
Resources/downloadList.json | 2 --
1 file changed, 2 deletions(-)
diff --git a/Resources/downloadList.json b/Resources/downloadList.json
index 450c34566..5c813eac5 100644
--- a/Resources/downloadList.json
+++ b/Resources/downloadList.json
@@ -1,7 +1,5 @@
[
"LTS-FFXIV|LTSDefaults|DefaultRotations",
"IncognitoWater|IncognitoWaterRotations|IcWaRotations",
- "BrakusTapus|KirboRotations|KirboRotations",
- "LTS-FFXIV|LTSRotatos|LTSRotatos",
"LTS-FFXIV|LTSRotatos|KG.Kirbo"
]
From e36edec167b99647c71c1e033101206784f2a2ad Mon Sep 17 00:00:00 2001
From: NostraThomas99 <34015422+NostraThomas99@users.noreply.github.com>
Date: Wed, 14 Feb 2024 14:57:44 -0600
Subject: [PATCH 72/73] TargetID rework
Reworked Target and TargetID on BaseAction in order to prevent issues with null references. Should fix various abilities getting "stuck" like ninja mudra
---
.../Actions/BaseAction_ActionInfo.cs | 11 +++++++----
.../Actions/BaseAction_Target.cs | 19 +++++++++++++++++--
2 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/RotationSolver.Basic/Actions/BaseAction_ActionInfo.cs b/RotationSolver.Basic/Actions/BaseAction_ActionInfo.cs
index ee2a9f796..ddbe13142 100644
--- a/RotationSolver.Basic/Actions/BaseAction_ActionInfo.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_ActionInfo.cs
@@ -187,10 +187,9 @@ public unsafe virtual bool CanUse(out IAction act, CanUseOption option = CanUseO
Target = target;
AffectedTargets = affectedTargets;
- if (!option.HasFlag(CanUseOption.IgnoreTarget)) _targetId = target.ObjectId;
+ //if (!option.HasFlag(CanUseOption.IgnoreTarget)) _targetId = target.ObjectId; // Disabled because no longer needed?
return true;
}
-
private bool CheckForCombo()
{
if (ComboIdsNot != null)
@@ -224,19 +223,23 @@ private bool CheckForCombo()
public unsafe bool Use()
{
var adjustId = AdjustedID;
+ //Svc.Log.Verbose($"Action use requested for {adjustId}");
if (_action.TargetArea && adjustId == ID)
{
var loc = new FFXIVClientStructs.FFXIV.Common.Math.Vector3() { X = Position.X, Y = Position.Y, Z = Position.Z };
+ //Svc.Log.Verbose($"Action has a target area, must specify target of {loc.X}, {loc.Y}, {loc.Z}");
return ActionManager.Instance()->UseActionLocation(ActionType.Action, ID, Player.Object.ObjectId, &loc);
}
- else if (Svc.Objects.SearchById(_targetId) == null)
+ else if (Svc.Objects.SearchById(TargetID) == null)
{
+ //Svc.Log.Verbose($"{TargetID} not found, dropping action");
return false;
}
else
{
- return ActionManager.Instance()->UseAction(ActionType.Action, adjustId, _targetId);
+ //Svc.Log.Verbose($"Using action {adjustId} on target {TargetID}");
+ return ActionManager.Instance()->UseAction(ActionType.Action, adjustId, TargetID);
}
}
}
diff --git a/RotationSolver.Basic/Actions/BaseAction_Target.cs b/RotationSolver.Basic/Actions/BaseAction_Target.cs
index d0045a508..3c0c99528 100644
--- a/RotationSolver.Basic/Actions/BaseAction_Target.cs
+++ b/RotationSolver.Basic/Actions/BaseAction_Target.cs
@@ -53,7 +53,22 @@ public float TimeToKill
///
/// The action's target.
///
- public BattleChara Target { get; private set; } = Player.Object;
+ public BattleChara Target { get; private set; }
+
+ public uint TargetID
+ {
+ get
+ {
+ if (Target == null)
+ {
+ return Svc.ClientState.LocalPlayer.ObjectId;
+ }
+ else
+ {
+ return Target.ObjectId;
+ }
+ }
+ }
///
public BattleChara[] AffectedTargets { get; private set; } = Array.Empty();
@@ -64,7 +79,7 @@ public float TimeToKill
/// The position
///
public Vector3 Position { get; private set; } = default;
- private uint _targetId = Player.Object?.ObjectId ?? 0;
+ //private uint _targetId = 0;
private Func, bool, BattleChara> _choiceTarget = null;
From 282e13f78a28e295f08a788817f17610406734c3 Mon Sep 17 00:00:00 2001
From: NostraThomas99 <34015422+NostraThomas99@users.noreply.github.com>
Date: Sat, 17 Feb 2024 12:21:51 -0600
Subject: [PATCH 73/73] Try to fix crashing during IsAlliance check
Updates ECommons to latest commit and slightly reworks IsAlliance() to try and prevent crashing. We now pull the struct only once and check if it's valid before passing it to CanUseActionOnTarget().
---
ECommons | 2 +-
RotationSolver.Basic/Helpers/ObjectHelper.cs | 13 +++++++++++--
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/ECommons b/ECommons
index 9bc738318..64b38039f 160000
--- a/ECommons
+++ b/ECommons
@@ -1 +1 @@
-Subproject commit 9bc7383180562d8edbee042ae7ffe04e955f6fa9
+Subproject commit 64b38039faf2a044fd1fc4829a567e123e4ca167
diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs
index 9b52a903a..5453deac6 100644
--- a/RotationSolver.Basic/Helpers/ObjectHelper.cs
+++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs
@@ -75,9 +75,18 @@ public static unsafe bool IsAlliance(this GameObject obj)
Svc.Log.Debug($"{nameof(IsAlliance)}: GameObject is null.");
return false;
}
+ var objStruct = obj.Struct();
- return ActionManager.CanUseActionOnTarget((uint)ActionID.Cure, obj.Struct())
- || ActionManager.CanUseActionOnTarget((uint)ActionID.Raise1, obj.Struct());
+ if (objStruct == null)
+ {
+ Svc.Log.Debug($"{nameof(IsAlliance)}: GameObject struct is null");
+ return false;
+ }
+ else
+ {
+ return ActionManager.CanUseActionOnTarget((uint)ActionID.Cure, objStruct)
+ || ActionManager.CanUseActionOnTarget((uint)ActionID.Raise1, objStruct);
+ }
}
catch (Exception ex)
{