diff --git a/Resources/HostileCastingArea.json b/Resources/HostileCastingArea.json index 95e315b22..da7e4213f 100644 --- a/Resources/HostileCastingArea.json +++ b/Resources/HostileCastingArea.json @@ -396,5 +396,7 @@ 20486, 20920, 20912, - 10094 + 10094, + 28973, + 6622 ] \ No newline at end of file diff --git a/Resources/RotationSolverRecord.json b/Resources/RotationSolverRecord.json index ebd79da8f..0074e57f1 100644 --- a/Resources/RotationSolverRecord.json +++ b/Resources/RotationSolverRecord.json @@ -1,3 +1,3 @@ { - "ClickingCount": 6217 + "ClickingCount": 7157 } \ No newline at end of file diff --git a/RotationSolver.Basic/Actions/BaseAction_Target.cs b/RotationSolver.Basic/Actions/BaseAction_Target.cs index 9ad5f24aa..b5c4c7836 100644 --- a/RotationSolver.Basic/Actions/BaseAction_Target.cs +++ b/RotationSolver.Basic/Actions/BaseAction_Target.cs @@ -19,7 +19,7 @@ public partial class BaseAction public byte AOECount { private get; init; } = 3; /// - /// How many time does this ation need the target keep in live. + /// How many time does this action need the target keep in live. /// public float TimeToDie { get; init; } = 0; @@ -196,10 +196,14 @@ private bool TargetAreaMove(float range, bool mustUse) private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player) { if (!Service.Config.GetValue(PluginConfigBool.UseGroundBeneficialAbility)) return false; + if (!Service.Config.GetValue(PluginConfigBool.UseGroundBeneficialAbilityWhenMoving) && DataCenter.IsMoving) return false; - switch (Service.Config.GetValue(PluginConfigInt.BeneficialAreaStrategy)) + var strategy = Service.Config.GetValue(PluginConfigInt.BeneficialAreaStrategy); + switch (strategy) { case 0: // Find from list + case 1: // Only the list + if (OtherConfiguration.BeneficialPositions.TryGetValue(Svc.ClientState.TerritoryType, out var pts) && pts != null && pts.Length > 0) { @@ -214,8 +218,10 @@ private bool TargetAreaFriend(float range, bool mustUse, PlayerCharacter player) return true; } } + + if (strategy == 1) return false; break; - case 1: // Target + case 2: // Target if(Svc.Targets.Target != null && Svc.Targets.Target.DistanceToPlayer() < range) { Position = Svc.Targets.Target.Position; diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index c927ae425..59ed83ee0 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -313,6 +313,7 @@ public enum PluginConfigBool : byte [Default(true)] RaisePlayerBySwift, [Default(true)] AutoSpeedOutOfCombat, [Default(true)] UseGroundBeneficialAbility, + [Default(false)] UseGroundBeneficialAbilityWhenMoving, [Default(false)] TargetAllForFriendly, [Default(false)] ShowCooldownWindow, @@ -399,7 +400,7 @@ public enum PluginConfigFloat : byte [Default(2f, 0f, 10f)] HostileIconHeight, [Default(1f, 0.1f, 10f)] HostileIconSize, - [Default(1f, 0f, 2.5f)] StateIconHeight, + [Default(0.5f, 0f, 2.5f)] StateIconHeight, [Default(1f, 0.7f, 10f)] StateIconSize, } diff --git a/RotationSolver.Basic/Helpers/ObjectHelper.cs b/RotationSolver.Basic/Helpers/ObjectHelper.cs index fceb21953..8f92e6163 100644 --- a/RotationSolver.Basic/Helpers/ObjectHelper.cs +++ b/RotationSolver.Basic/Helpers/ObjectHelper.cs @@ -177,6 +177,8 @@ public static bool IsDying(this BattleChara b) public static float GetDeadTime(this BattleChara b, bool wholeTime = false) { if (b == null) return float.NaN; + if (b.IsDummy()) return 999f; + var objectId = b.ObjectId; DateTime startTime = DateTime.MinValue; diff --git a/RotationSolver.Basic/Rotations/Basic/DNC_Base.cs b/RotationSolver.Basic/Rotations/Basic/DNC_Base.cs index 4df2915ea..aafd921d7 100644 --- a/RotationSolver.Basic/Rotations/Basic/DNC_Base.cs +++ b/RotationSolver.Basic/Rotations/Basic/DNC_Base.cs @@ -390,7 +390,7 @@ protected static bool ExecuteStepGCD(out IAction act) [RotationDesc(ActionID.EnAvant)] protected sealed override bool MoveForwardAbility(out IAction act) { - if (EnAvant.CanUse(out act, CanUseOption.MustUseEmpty)) return true; + if (EnAvant.CanUse(out act, CanUseOption.EmptyOrSkipCombo)) return true; return false; } diff --git a/RotationSolver/Localization/ConfigTranslation.cs b/RotationSolver/Localization/ConfigTranslation.cs index 9e68f88b9..fc95eb88c 100644 --- a/RotationSolver/Localization/ConfigTranslation.cs +++ b/RotationSolver/Localization/ConfigTranslation.cs @@ -97,6 +97,7 @@ internal static class ConfigTranslation PluginConfigBool.RaisePlayerBySwift => LocalizationManager.RightLang.ConfigWindow_Param_RaisePlayerBySwift, PluginConfigBool.AutoSpeedOutOfCombat => LocalizationManager.RightLang.ConfigWindow_Param_AutoSpeedOutOfCombat, PluginConfigBool.UseGroundBeneficialAbility => LocalizationManager.RightLang.ConfigWindow_Param_UseGroundBeneficialAbility, + PluginConfigBool.UseGroundBeneficialAbilityWhenMoving => LocalizationManager.RightLang.ConfigWindow_Auto_UseGroundBeneficialAbilityWhenMoving, PluginConfigBool.RaisePlayerByCasting => LocalizationManager.RightLang.ConfigWindow_Param_RaisePlayerByCasting, PluginConfigBool.UseHealWhenNotAHealer => LocalizationManager.RightLang.ConfigWindow_Param_UseHealWhenNotAHealer, PluginConfigBool.InterruptibleMoreCheck => LocalizationManager.RightLang.ConfigWindow_Param_InterruptibleMoreCheck, diff --git a/RotationSolver/Localization/Localization.json b/RotationSolver/Localization/Localization.json index 879ac5eee..6bf3df358 100644 --- a/RotationSolver/Localization/Localization.json +++ b/RotationSolver/Localization/Localization.json @@ -494,5 +494,6 @@ "ConfigWindow_UI_HostileIconHeight": "Hostile Icon height from position", "ConfigWindow_UI_HostileIconSize": "Hostile Icon size", "ConfigWindow_UI_StateIconHeight": "State Icon height from position", - "ConfigWindow_UI_StateIconSize": "State Icon size" + "ConfigWindow_UI_StateIconSize": "State Icon size", + "ConfigWindow_UI_ShowStateIcon": "Show State Icon" } \ No newline at end of file diff --git a/RotationSolver/Localization/Strings.cs b/RotationSolver/Localization/Strings.cs index 4d075eb8d..ea404ca10 100644 --- a/RotationSolver/Localization/Strings.cs +++ b/RotationSolver/Localization/Strings.cs @@ -177,6 +177,7 @@ internal partial class Strings public string ConfigWindow_Param_OnlyHotOnTanks { get; set; } = "Use single target healing over time actions only on tanks"; public string ConfigWindow_Param_BeneficialAreaOnLocations { get; set; } = "On Listed Position"; + public string ConfigWindow_Param_BeneficialAreaOnlyOnLocations { get; set; } = "Only On Listed Position"; public string ConfigWindow_Param_BeneficialAreaOnTarget { get; set; } = "On target"; public string ConfigWindow_Param_BeneficialAreaOnCalculated { get; set; } = "On the calculated Position"; @@ -711,4 +712,5 @@ internal partial class Strings public string ConfigWindow_UI_StateIconHeight { get; set; } = "State Icon height from position"; public string ConfigWindow_UI_StateIconSize { get; set; } = "State Icon size"; public string ConfigWindow_UI_ShowStateIcon { get; set; } = "Show State Icon"; + public string ConfigWindow_Auto_UseGroundBeneficialAbilityWhenMoving { get; set; } = "Use beneficial area action when moving."; } \ No newline at end of file diff --git a/RotationSolver/UI/PainterManager.cs b/RotationSolver/UI/PainterManager.cs index 9e83d83df..f53dba0ec 100644 --- a/RotationSolver/UI/PainterManager.cs +++ b/RotationSolver/UI/PainterManager.cs @@ -258,6 +258,7 @@ public static void Init() _stateImage = new Drawing3DImage(null, default, 0) { MustInViewRange = true, + DrawWithHeight = false, UpdateEveryFrame = () => { if (!Player.Available) return; diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index 8adb6238a..8ea2cbce9 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -1049,7 +1049,7 @@ private static void DrawRotationInformation() ImGui.NewLine(); if (IconSet.GetTexture("https://www.gstatic.com/youtube/img/branding/youtubelogo/svg/youtubelogo.svg", out var icon) && ImGuiHelper.TextureButton(icon, wholeWidth, 250 * _scale, "Youtube Link")) { - Util.OpenLink("https://youtu.be/" + youtubeLink); + Util.OpenLink("https://www.youtube.com/watch?v=" + youtubeLink); } } diff --git a/RotationSolver/UI/RotationConfigWindow_Config.cs b/RotationSolver/UI/RotationConfigWindow_Config.cs index 4a1011722..5777e250d 100644 --- a/RotationSolver/UI/RotationConfigWindow_Config.cs +++ b/RotationSolver/UI/RotationConfigWindow_Config.cs @@ -715,8 +715,10 @@ private static void DrawAutoActionCondition() new CheckBoxSearchPlugin(PluginConfigBool.UseGroundBeneficialAbility, new DragIntSearchPlugin(PluginConfigInt.BeneficialAreaStrategy, () => new string[]{ LocalizationManager.RightLang.ConfigWindow_Param_BeneficialAreaOnLocations, + LocalizationManager.RightLang.ConfigWindow_Param_BeneficialAreaOnlyOnLocations, LocalizationManager.RightLang.ConfigWindow_Param_BeneficialAreaOnTarget, - LocalizationManager.RightLang.ConfigWindow_Param_BeneficialAreaOnCalculated })) + LocalizationManager.RightLang.ConfigWindow_Param_BeneficialAreaOnCalculated }), + new CheckBoxSearchPlugin(PluginConfigBool.UseGroundBeneficialAbilityWhenMoving)) { JobRoles = new JobRole[] {