Skip to content

Commit

Permalink
Merge pull request #424 from FFXIV-CombatReborn/jobconfigandtargets
Browse files Browse the repository at this point in the history
Update ECommons submodule and refactor Configs class
  • Loading branch information
LTS-FFXIV authored Oct 5, 2024
2 parents 637e559 + 270c49a commit 6d24a19
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 32 deletions.
27 changes: 5 additions & 22 deletions RotationSolver.Basic/Configuration/Configs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,6 @@ public const string
Filter = BasicAutoSwitch)]
private static readonly bool _autoOffWhenDutyCompleted = true;

[ConditionBool, UI("Select only Fate targets in Fate",
Filter = TargetConfig, Section = 1)]
private static readonly bool _changeTargetForFate = true;

[ConditionBool, UI("Use movement actions towards the object/mob in the center of the screen",
Description = "Use movement actions towards the object/mob in the center of the screen, otherwise toward object/mob your character is facing.",
Filter = TargetConfig, Section = 2)]
Expand Down Expand Up @@ -139,10 +135,6 @@ public const string
[ConditionBool, UI("Teaching mode", Filter = UiInformation)]
private static readonly bool _teachingMode = false;

//[ConditionBool, UI("Use task for overlay window.",
// Parent = nameof(TeachingMode))]
//private static readonly bool _useTasksForOverlay = false;

[ConditionBool, UI("Simulate the effect of pressing abilities",
Filter = UiInformation)]
private static readonly bool _keyBoardNoise = true;
Expand Down Expand Up @@ -176,7 +168,7 @@ public const string
Filter = TargetConfig, Section = 3)]
private static readonly bool _switchTargetFriendly = false;

[ConditionBool, UI("Use interrupt abilities if possible.",
[JobConfig, UI("Use interrupt abilities if possible.",
Filter = AutoActionUsage, Section = 3,
PvEFilter = JobFilterType.Interrupt,
PvPFilter = JobFilterType.NoJob)]
Expand All @@ -202,11 +194,6 @@ public const string
Filter = TargetConfig, Section = 1)]
private static readonly bool _onlyAttackInVisionCone = false;

[ConditionBool, UI("Use single target healing over time actions only on tanks",
Filter = HealingActionCondition, Section = 1,
PvEFilter = JobFilterType.Healer, PvPFilter = JobFilterType.Healer)]
private static readonly bool _onlyHotOnTanks = false;

[ConditionBool, UI("Debug Mode", Filter = Debug)]
private static readonly bool _inDebug = false;

Expand Down Expand Up @@ -270,10 +257,6 @@ public const string
Filter = UiInformation)]
private static readonly bool _showTooltips = true;

[ConditionBool, UI("Target Fate priority",
Filter = TargetConfig, Section = 1)]
private static readonly bool _targetFatePriority = true;

[ConditionBool, UI("Target Hunt/Relic/Leve priority. (Relic behaviour bugged)",
Filter = TargetConfig, Section = 1)]
private static readonly bool _targetHuntingRelicLevePriority = true;
Expand Down Expand Up @@ -410,22 +393,22 @@ public const string
[Range(0, 1, ConfigUnitType.Percent, 0.02f)]
public float HealthHealerRatio { get; set; } = 0.4f;

[ConditionBool, UI("Hard cast Raise players while Swiftcast is on cooldown", Description = "If this is enabled and Swiftcast is on cooldown, you will only attempt to raise while standing still.",
[JobConfig, UI("Hard cast Raise players while Swiftcast is on cooldown", Description = "If this is enabled and Swiftcast is on cooldown, you will only attempt to raise while standing still.",
Filter = HealingActionCondition, Section = 2,
PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)]
private static readonly bool _raisePlayerByCasting = true;

[ConditionBool, UI("Raise player by using Swiftcast/Dualcast if avaliable", Description = "If this is disabled, you will never use Swiftcast/Dualcast to raise players.",
[JobConfig, UI("Raise player by using Swiftcast/Dualcast if avaliable", Description = "If this is disabled, you will never use Swiftcast/Dualcast to raise players.",
Filter = HealingActionCondition, Section = 2,
PvEFilter = JobFilterType.None)]
PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)]
private static readonly bool _raisePlayerBySwift = true;

[JobConfig, UI("Raise styles",
Filter = HealingActionCondition, Section = 2,
PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)]
private readonly RaiseType _RaiseType = RaiseType.PartyOnly;

[ConditionBool, UI("Raise players that have the Brink of Death debuff",
[JobConfig, UI("Raise players that have the Brink of Death debuff",
Filter = HealingActionCondition, Section = 2,
PvEFilter = JobFilterType.Raise, PvPFilter = JobFilterType.NoJob)]
private static readonly bool _raiseBrinkOfDeath = true;
Expand Down
6 changes: 3 additions & 3 deletions RotationSolver.Basic/DataCenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ public static unsafe ushort FateId
{
try
{
if (Service.Config.ChangeTargetForFate && (IntPtr)FateManager.Instance() != IntPtr.Zero
&& (IntPtr)FateManager.Instance()->CurrentFate != IntPtr.Zero
&& Player.Level <= FateManager.Instance()->CurrentFate->MaxLevel)
if ((IntPtr)FateManager.Instance() != IntPtr.Zero
&& (IntPtr)FateManager.Instance()->CurrentFate != IntPtr.Zero
&& Player.Level <= FateManager.Instance()->CurrentFate->MaxLevel)
{
return FateManager.Instance()->CurrentFate->FateId;
}
Expand Down
3 changes: 0 additions & 3 deletions RotationSolver.Basic/Helpers/ObjectHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -304,9 +304,6 @@ internal static bool IsTopPriorityHostile(this IGameObject obj)

if (Service.Config.ChooseAttackMark && MarkingHelper.AttackSignTargets.FirstOrDefault(id => id != 0) == (long)obj.GameObjectId) return true;

// Fate
if (Service.Config.TargetFatePriority && fateId != 0 && obj.FateId() == fateId) return true;

var icon = obj.GetNamePlateIcon();

// Hunting log and weapon
Expand Down
3 changes: 0 additions & 3 deletions RotationSolver.Basic/Rotations/CustomRotation_Ability.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ private bool MyInterruptAbility(JobRole role, IAction nextGCD, out IAction? act)
break;

case JobRole.Melee:
if (Job == ECommons.ExcelServices.Job.VPR) break;
if (LegSweepPvE.CanUse(out act)) return true;
break;

Expand Down Expand Up @@ -256,7 +255,6 @@ private bool AntiKnockback(JobRole role, IAction nextGCD, out IAction? act)
{
case JobRole.Tank:
case JobRole.Melee:
if (Job == ECommons.ExcelServices.Job.VPR) break;
if (ArmsLengthPvE.CanUse(out act)) return true;
break;
case JobRole.Healer:
Expand Down Expand Up @@ -317,7 +315,6 @@ private bool GeneralUsingAbility(JobRole role, IAction nextGCD, out IAction? act
break;

case JobRole.Melee:
if (Job == ECommons.ExcelServices.Job.VPR) break;
if (SecondWindPvE.CanUse(out act)) return true;
if (BloodbathPvE.CanUse(out act)) return true;
break;
Expand Down
2 changes: 2 additions & 0 deletions RotationSolver/UI/SearchableConfigs/CheckBoxSearch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,5 +245,7 @@ protected override void DrawMain()
ImGui.TextWrapped(Name);
if (ImGui.IsItemHovered()) ShowTooltip(false);
}
// Draw job icon if IsJob is true
if (IsJob) DrawJobIcon();
}
}

0 comments on commit 6d24a19

Please sign in to comment.