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

Commit

Permalink
fix: seperate heal ratio from tank and healer.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 28, 2023
1 parent f62050f commit 3ded391
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
3 changes: 2 additions & 1 deletion RotationSolver.Basic/Configuration/PluginConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ public class PluginConfiguration : IPluginConfiguration

public Dictionary<ClassJobID, float> HealthForDyingTanks { get; set; } = new Dictionary<ClassJobID, float>();

public float HealthTankHealerRatio = 0.4f;
public float HealthTankRatio = 0.4f;
public float HealthHealerRatio = 0.4f;

public bool InterruptibleMoreCheck = true;
public float SpecialDuration = 3;
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver.Basic/Helpers/TargetFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ internal static BattleChara DefaultChooseFriend(IEnumerable<BattleChara> availab
var tankTars = availableCharas.GetJobCategory(JobRole.Tank);

var healerTar = tankTars.OrderBy(ObjectHelper.GetHealthRatio).FirstOrDefault();
if (healerTar != null && healerTar.GetHealthRatio() < Service.Config.HealthTankHealerRatio)
if (healerTar != null && healerTar.GetHealthRatio() < Service.Config.HealthHealerRatio)
return healerTar;

var tankTar = tankTars.OrderBy(ObjectHelper.GetHealthRatio).FirstOrDefault();
if (tankTar != null && tankTar.GetHealthRatio() < Service.Config.HealthTankHealerRatio)
if (tankTar != null && tankTar.GetHealthRatio() < Service.Config.HealthTankRatio)
return tankTar;

var tar = availableCharas.OrderBy(ObjectHelper.GetHealthRatio).FirstOrDefault();
Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Localization/Strings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ internal partial class Strings
public string ConfigWindow_Param_HealthSingleAbility { get; set; } = "Set the HP threshold for using single healing ability";
public string ConfigWindow_Param_HealthSingleSpell { get; set; } = "Set the HP threshold for using single healing spell";

public string ConfigWindow_Param_HealthTankHealerRatio { get; set; } = "Heal healer or tank first if its HP threshold is lower than this.";

public string ConfigWindow_Param_HealthHealerRatio { get; set; } = "Heal healer first if its HP threshold is lower than this.";

public string ConfigWindow_Param_HealthTankRatio { get; set; } = "Heal tank first if its HP threshold is lower than this.";
public string ConfigWindow_Param_HealingOfTimeSubtractSingle { get; set; } = "Set the HP threshold reduce with hot effect(single)";
public string ConfigWindow_Param_HealthForDyingTank { get; set; } = "Set the HP threshold for tank to use invincibility";

Expand Down
7 changes: 5 additions & 2 deletions RotationSolver/UI/RotationConfigWindow_Param.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,11 @@ private void DrawParamCondition()
DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_HealthSingleSpell,
ref Service.Config.HealthSingleSpell, speed);

DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_HealthTankHealerRatio,
ref Service.Config.HealthTankHealerRatio, speed);
DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_HealthHealerRatio,
ref Service.Config.HealthHealerRatio, speed);

DrawFloatNumber(LocalizationManager.RightLang.ConfigWindow_Param_HealthTankRatio,
ref Service.Config.HealthTankRatio, speed);
}

private void DrawParamTarget()
Expand Down

0 comments on commit 3ded391

Please sign in to comment.