diff --git a/RotationSolver/Updaters/TargetUpdater_Friends.cs b/RotationSolver/Updaters/TargetUpdater_Friends.cs index 3e6eb6233..cbad8a647 100644 --- a/RotationSolver/Updaters/TargetUpdater_Friends.cs +++ b/RotationSolver/Updaters/TargetUpdater_Friends.cs @@ -143,9 +143,7 @@ internal unsafe static void UpdateFriends() #endregion #region Health - var members = PartyMembers; - - PartyMembersHP = TargetFilter.GetObjectInRadius(members, 30).Where(r => r.CurrentHp > 0).Select(p => (float)p.CurrentHp / p.MaxHp); + PartyMembersHP = TargetFilter.GetObjectInRadius(PartyMembers, 30).Where(r => r.CurrentHp > 0).Select(p => (float)p.CurrentHp / p.MaxHp); float averHP = 0; foreach (var hp in PartyMembersHP) @@ -164,25 +162,33 @@ internal unsafe static void UpdateFriends() var job = (ClassJobID)Service.ClientState.LocalPlayer.ClassJob.Id; - var hotSubArea = Service.Configuration.HealingOfTimeSubtractAreas.TryGetValue(job, out var value) ? value : 0.3f; - - var areaHots = new StatusID[] + float value; + if(PartyMembers.Count() > 2) { + var hotSubArea = Service.Configuration.HealingOfTimeSubtractAreas.TryGetValue(job, out value) ? value : 0.3f; + + var areaHots = new StatusID[] + { StatusID.AspectedHelios, StatusID.Medica2, StatusID.TrueMedica2, - }; + }; - //TODO:少了所有罩子类技能 - var ratio = GetHealingOfTimeRatio(Service.ClientState.LocalPlayer, areaHots) * hotSubArea; + //TODO:少了所有罩子类技能 + var ratio = GetHealingOfTimeRatio(Service.ClientState.LocalPlayer, areaHots) * hotSubArea; - var healAreability = ConfigurationHelper.GetHealAreaAbility(job); + var healAreability = ConfigurationHelper.GetHealAreaAbility(job); - var healAreaspell = ConfigurationHelper.GetHealAreafSpell(job); + var healAreaspell = ConfigurationHelper.GetHealAreafSpell(job); - CanHealAreaAbility = PartyMembersDifferHP < Service.Configuration.HealthDifference && PartyMembersAverHP < healAreability - ratio; + CanHealAreaAbility = PartyMembersDifferHP < Service.Configuration.HealthDifference && PartyMembersAverHP < healAreability - ratio; - CanHealAreaSpell = PartyMembersDifferHP < Service.Configuration.HealthDifference && PartyMembersAverHP < healAreaspell - ratio; + CanHealAreaSpell = PartyMembersDifferHP < Service.Configuration.HealthDifference && PartyMembersAverHP < healAreaspell - ratio; + } + else + { + CanHealAreaAbility = CanHealAreaSpell = false; + } var hotSubSingle = Service.Configuration.HealingOfTimeSubtractSingles.TryGetValue(job, out value) ? value : 0.3f; diff --git a/RotationSolver/Windows/RotationConfigWindow_Debug.cs b/RotationSolver/Windows/RotationConfigWindow_Debug.cs index af86e53d9..f95204092 100644 --- a/RotationSolver/Windows/RotationConfigWindow_Debug.cs +++ b/RotationSolver/Windows/RotationConfigWindow_Debug.cs @@ -8,6 +8,7 @@ using System.Linq; using RotationSolver.Actions.BaseAction; using FFXIVClientStructs.FFXIV.Client.Game.Fate; +using System; namespace RotationSolver.Windows.RotationConfigWindow; #if DEBUG @@ -22,7 +23,10 @@ private unsafe void DrawDebugTab() ImGui.Text("All: " + TargetUpdater.AllTargets.Count().ToString()); ImGui.Text("Hostile: " + TargetUpdater.HostileTargets.Count().ToString()); ImGui.Text("Friends: " + TargetUpdater.PartyMembers.Count().ToString()); - ImGui.Text("Fate: " + FateManager.Instance()->FateJoined.ToString()); + if ((IntPtr)FateManager.Instance() != IntPtr.Zero) + { + ImGui.Text("Fate: " + FateManager.Instance()->FateJoined.ToString()); + } if (ImGui.CollapsingHeader("Status from self.")) { diff --git a/docs/RotationDev/rotation.md b/docs/RotationDev/rotation.md index 73fef1642..328d35025 100644 --- a/docs/RotationDev/rotation.md +++ b/docs/RotationDev/rotation.md @@ -1,6 +1,6 @@ # Rotation Part -We just started a simple 123 rotation. Obviously, it doesn't solve the complex combats. In this part, lets see how many methods can we override, and how to use them. +We just started a simple 123 rotation. Obviously, it doesn't solve the complex combats. In this part, lets see how many methods can we override, and how to use them. That is the major work for the rotation developers. ## GCD