From 8216e16125bb063d7119d4aaddf2b014fbe76d0d Mon Sep 17 00:00:00 2001
From: LTS-FFXIV <127939494+LTS-FFXIV@users.noreply.github.com>
Date: Sun, 29 Sep 2024 17:23:55 -0500
Subject: [PATCH] Update JSON entries and enhance DataCenter.cs logic
Added new entries and corrected existing ones in multiple JSON files, including BeneficialPositions, HostileCastingArea, and others. Fixed syntax issues in InvincibleStatus.json and PriorityStatus.json. Updated descriptions in RaiseType.cs. Enhanced DataCenter.cs with new using directive, property consistency, and improved death target tracking logic.
---
Resources/BeneficialPositions.json | 21 +++++-
Resources/HostileCastingArea.json | 6 +-
Resources/HostileCastingKnockback.json | 3 +-
Resources/HostileCastingTank.json | 3 +-
Resources/InvincibleStatus.json | 2 +-
Resources/NoHostileNames.json | 18 ++++++
Resources/NoProvokeNames.json | 18 ++++++
Resources/PrioTargetNames.json | 19 ++++++
Resources/PriorityStatus.json | 2 +-
RotationSolver.Basic/Data/RaiseType.cs | 4 +-
RotationSolver.Basic/DataCenter.cs | 90 ++++++++++++++------------
11 files changed, 137 insertions(+), 49 deletions(-)
diff --git a/Resources/BeneficialPositions.json b/Resources/BeneficialPositions.json
index 4f85411f5..f37ad6aec 100644
--- a/Resources/BeneficialPositions.json
+++ b/Resources/BeneficialPositions.json
@@ -9,5 +9,24 @@
"1186": [],
"816": [],
"1198": [],
- "957": []
+ "957": [],
+ "751": [
+ {
+ "X": 0.015657552,
+ "Y": 0.0,
+ "Z": -0.0062397607
+ }
+ ],
+ "132": [],
+ "1048": [],
+ "1169": [
+ {
+ "X": 100.05093,
+ "Y": 0.0,
+ "Z": 100.0046
+ }
+ ],
+ "981": [],
+ "1064": [],
+ "1062": []
}
\ No newline at end of file
diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json
index fa68e2458..77f0bc46e 100644
--- a/Resources/HostileCastingArea.json
+++ b/Resources/HostileCastingArea.json
@@ -647,5 +647,9 @@
13085,
13074,
26050,
- 26049
+ 26049,
+ 28718,
+ 28720,
+ 29379,
+ 3338
]
\ No newline at end of file
diff --git a/Resources/HostileCastingKnockback.json b/Resources/HostileCastingKnockback.json
index 91768745d..f808b0ecd 100644
--- a/Resources/HostileCastingKnockback.json
+++ b/Resources/HostileCastingKnockback.json
@@ -31,5 +31,6 @@
29000,
28981,
29003,
- 37662
+ 37662,
+ 10535
]
\ No newline at end of file
diff --git a/Resources/HostileCastingTank.json b/Resources/HostileCastingTank.json
index 61557738c..35df61a42 100644
--- a/Resources/HostileCastingTank.json
+++ b/Resources/HostileCastingTank.json
@@ -25,5 +25,6 @@
29023,
10542,
26040,
- 26041
+ 26041,
+ 28717
]
\ No newline at end of file
diff --git a/Resources/InvincibleStatus.json b/Resources/InvincibleStatus.json
index 7e909e2bb..8ce05e712 100644
--- a/Resources/InvincibleStatus.json
+++ b/Resources/InvincibleStatus.json
@@ -12,4 +12,4 @@
3039,
3052,
3054
-]
+]
\ No newline at end of file
diff --git a/Resources/NoHostileNames.json b/Resources/NoHostileNames.json
index 4bb430b7e..c2e40d50e 100644
--- a/Resources/NoHostileNames.json
+++ b/Resources/NoHostileNames.json
@@ -31,5 +31,23 @@
],
"957": [
""
+ ],
+ "132": [
+ ""
+ ],
+ "1048": [
+ ""
+ ],
+ "1169": [
+ ""
+ ],
+ "981": [
+ ""
+ ],
+ "1064": [
+ ""
+ ],
+ "1062": [
+ ""
]
}
\ No newline at end of file
diff --git a/Resources/NoProvokeNames.json b/Resources/NoProvokeNames.json
index d842e47be..2fa3cd34e 100644
--- a/Resources/NoProvokeNames.json
+++ b/Resources/NoProvokeNames.json
@@ -22,5 +22,23 @@
],
"957": [
""
+ ],
+ "132": [
+ ""
+ ],
+ "1048": [
+ ""
+ ],
+ "1169": [
+ ""
+ ],
+ "981": [
+ ""
+ ],
+ "1064": [
+ ""
+ ],
+ "1062": [
+ ""
]
}
\ No newline at end of file
diff --git a/Resources/PrioTargetNames.json b/Resources/PrioTargetNames.json
index d03b73e35..95eedae14 100644
--- a/Resources/PrioTargetNames.json
+++ b/Resources/PrioTargetNames.json
@@ -9,5 +9,24 @@
"1046": [
"Granite Gaol",
""
+ ],
+ "132": [
+ ""
+ ],
+ "1048": [
+ ""
+ ],
+ "1169": [
+ ""
+ ],
+ "981": [
+ ""
+ ],
+ "1064": [
+ "Drakespur",
+ ""
+ ],
+ "1062": [
+ ""
]
}
\ No newline at end of file
diff --git a/Resources/PriorityStatus.json b/Resources/PriorityStatus.json
index 3dc6dec94..bd4992f82 100644
--- a/Resources/PriorityStatus.json
+++ b/Resources/PriorityStatus.json
@@ -3,4 +3,4 @@
2655,
1290,
861
-]
+]
\ No newline at end of file
diff --git a/RotationSolver.Basic/Data/RaiseType.cs b/RotationSolver.Basic/Data/RaiseType.cs
index 2f8b53915..a8cf2ac18 100644
--- a/RotationSolver.Basic/Data/RaiseType.cs
+++ b/RotationSolver.Basic/Data/RaiseType.cs
@@ -14,12 +14,12 @@ public enum RaiseType : byte
///
/// Raise party and alliance members.
///
- [Description("Raise party and alliance members.")]
+ [Description("Raise all.")]
PartyAndAlliance,
///
/// Raise party members and alliance healers.
///
- [Description("Raise party members and alliance healers.")]
+ [Description("Raise party members and non-party healers.")]
PartyAndAllianceHealers,
}
\ No newline at end of file
diff --git a/RotationSolver.Basic/DataCenter.cs b/RotationSolver.Basic/DataCenter.cs
index d9b1b87d7..85918d842 100644
--- a/RotationSolver.Basic/DataCenter.cs
+++ b/RotationSolver.Basic/DataCenter.cs
@@ -11,6 +11,7 @@
using RotationSolver.Basic.Configuration;
using RotationSolver.Basic.Configuration.Conditions;
using RotationSolver.Basic.Rotations.Duties;
+using Svg.FilterEffects;
using Action = Lumina.Excel.GeneratedSheets.Action;
using CharacterManager = FFXIVClientStructs.FFXIV.Client.Game.Character.CharacterManager;
@@ -313,7 +314,7 @@ internal static float RaidTimeRaw
public unsafe static IBattleChara[] AllianceMembers => AllTargets.Where(ObjectHelper.IsAlliance)
.Where(b => b.Character()->CharacterData.OnlineStatus != 15 && b.IsTargetable).ToArray();
- public static unsafe IBattleChara[] FriendlyNPCMembers
+ public unsafe static IBattleChara[] FriendlyNPCMembers
{
get
{
@@ -374,60 +375,67 @@ public static IBattleChara? DeathTarget
{
get
{
- // Ensure AllianceMembers and PartyMembers are not null
- if (AllianceMembers == null || PartyMembers == null) return null;
+ // Added so it only tracks deathtarget if you are on a raise job
+ var rotation = DataCenter.RightNowRotation;
+ if (Player.Job == Job.WHM || Player.Job == Job.SCH || Player.Job == Job.AST || Player.Job == Job.SGE ||
+ Player.Job == Job.SMN || Player.Job == Job.RDM)
+ {
+ // Ensure AllianceMembers and PartyMembers are not null
+ if (AllianceMembers == null || PartyMembers == null) return null;
- var deathAll = AllianceMembers.GetDeath();
- var deathParty = PartyMembers.GetDeath();
- var deathNPC = FriendlyNPCMembers.GetDeath();
+ var deathAll = AllianceMembers.GetDeath();
+ var deathParty = PartyMembers.GetDeath();
+ var deathNPC = FriendlyNPCMembers.GetDeath();
- // Check death in party members
- if (deathParty.Any())
- {
- var deathT = deathParty.GetJobCategory(JobRole.Tank).ToList();
- var deathH = deathParty.GetJobCategory(JobRole.Healer).ToList();
+ // Check death in party members
+ if (deathParty.Any())
+ {
+ var deathT = deathParty.GetJobCategory(JobRole.Tank).ToList();
+ var deathH = deathParty.GetJobCategory(JobRole.Healer).ToList();
- if (deathT.Count > 1) return deathT.FirstOrDefault();
- if (deathH.Any()) return deathH.FirstOrDefault();
- if (deathT.Any()) return deathT.FirstOrDefault();
+ if (deathT.Count > 1) return deathT.FirstOrDefault();
+ if (deathH.Any()) return deathH.FirstOrDefault();
+ if (deathT.Any()) return deathT.FirstOrDefault();
- return deathParty.FirstOrDefault();
- }
+ return deathParty.FirstOrDefault();
+ }
- // Check death in alliance members
- if (deathAll.Any())
- {
- if (Service.Config.RaiseType == RaiseType.PartyAndAllianceHealers)
+ // Check death in alliance members
+ if (deathAll.Any())
{
- var deathAllH = deathAll.GetJobCategory(JobRole.Healer).ToList();
- if (deathAllH.Any()) return deathAllH.FirstOrDefault();
+ if (Service.Config.RaiseType == RaiseType.PartyAndAllianceHealers)
+ {
+ var deathAllH = deathAll.GetJobCategory(JobRole.Healer).ToList();
+ if (deathAllH.Any()) return deathAllH.FirstOrDefault();
+ }
+
+ if (Service.Config.RaiseType == RaiseType.PartyAndAlliance)
+ {
+ var deathAllH = deathAll.GetJobCategory(JobRole.Healer).ToList();
+ var deathAllT = deathAll.GetJobCategory(JobRole.Tank).ToList();
+
+ if (deathAllH.Any()) return deathAllH.FirstOrDefault();
+ if (deathAllT.Any()) return deathAllT.FirstOrDefault();
+
+ return deathAll.FirstOrDefault();
+ }
}
- if (Service.Config.RaiseType == RaiseType.PartyAndAlliance)
+ // Check death in friendly NPC members
+ if (deathNPC.Any() && Service.Config.FriendlyPartyNpcHealRaise)
{
- var deathAllH = deathAll.GetJobCategory(JobRole.Healer).ToList();
- var deathAllT = deathAll.GetJobCategory(JobRole.Tank).ToList();
+ var deathNPCT = deathNPC.GetJobCategory(JobRole.Tank).ToList();
+ var deathNPCH = deathNPC.GetJobCategory(JobRole.Healer).ToList();
- if (deathAllH.Any()) return deathAllH.FirstOrDefault();
- if (deathAllT.Any()) return deathAllT.FirstOrDefault();
+ if (deathNPCT.Count > 1) return deathNPCT.FirstOrDefault();
+ if (deathNPCH.Any()) return deathNPCH.FirstOrDefault();
+ if (deathNPCT.Any()) return deathNPCT.FirstOrDefault();
- return deathAll.FirstOrDefault();
+ return deathNPC.FirstOrDefault();
}
- }
-
- // Check death in friendly NPC members
- if (deathNPC.Any() && Service.Config.FriendlyPartyNpcHealRaise)
- {
- var deathNPCT = deathNPC.GetJobCategory(JobRole.Tank).ToList();
- var deathNPCH = deathNPC.GetJobCategory(JobRole.Healer).ToList();
- if (deathNPCT.Count > 1) return deathNPCT.FirstOrDefault();
- if (deathNPCH.Any()) return deathNPCH.FirstOrDefault();
- if (deathNPCT.Any()) return deathNPCT.FirstOrDefault();
-
- return deathNPC.FirstOrDefault();
+ return null;
}
-
return null;
}
}