diff --git a/.gitignore b/.gitignore index 6e162095f..34f52b3a1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ lib/ .idea/ RotationSolver/Localization/Localization.json /Resources/AutoStatusOrder.json +/RotationSolver.GameData/RotationSolver.GameData.csproj.user diff --git a/BasicRotations/Tank/PLD_Beta.cs b/BasicRotations/Tank/PLD_Beta.cs index cc1b656a4..87f598d48 100644 --- a/BasicRotations/Tank/PLD_Beta.cs +++ b/BasicRotations/Tank/PLD_Beta.cs @@ -213,10 +213,10 @@ protected override bool GeneralGCD(out IAction? act) if (PassageProtec && Player.HasStatus(true, StatusID.PassageOfArms)) return false; // Confiteor Combo - if (BladeOfValorPvE.CanUse(out act)) return true; - if (BladeOfTruthPvE.CanUse(out act)) return true; - if (BladeOfFaithPvE.CanUse(out act)) return true; - if (Player.HasStatus(true, StatusID.Requiescat) && ConfiteorPvE.CanUse(out act, usedUp: true, skipAoeCheck: true)) return true; + if (BladeOfValorPvE.EnoughLevel && BladeOfValorPvE.CanUse(out act)) return true; + if (BladeOfTruthPvE.EnoughLevel && BladeOfTruthPvE.CanUse(out act)) return true; + if (BladeOfFaithPvE.EnoughLevel && BladeOfFaithPvE.CanUse(out act)) return true; + if (Player.HasStatus(true, StatusID.ConfiteorReady) && ConfiteorPvE.CanUse(out act, usedUp: true, skipAoeCheck: true)) return true; if (GoringBladePvE.CanUse(out act)) return true; diff --git a/ECommons b/ECommons index 8ca6e80b3..1889f24e8 160000 --- a/ECommons +++ b/ECommons @@ -1 +1 @@ -Subproject commit 8ca6e80b386effa4380b9268dffacddc89b10c89 +Subproject commit 1889f24e84d8981aa06272f1a25a176ceaab7288 diff --git a/RotationSolver.Basic/Configuration/Configs.cs b/RotationSolver.Basic/Configuration/Configs.cs index 621b69b22..f7eb14c18 100644 --- a/RotationSolver.Basic/Configuration/Configs.cs +++ b/RotationSolver.Basic/Configuration/Configs.cs @@ -28,6 +28,7 @@ public const string public const int CurrentVersion = 12; public int Version { get; set; } = CurrentVersion; + public bool HasShownMainMenuMessage { get; set; } = false; public string LastSeenChangelog { get; set; } = "0.0.0.0"; public bool FirstTimeSetupDone { get; set; } = false; diff --git a/RotationSolver.Basic/Rotations/Basic/BlueMageRotation.cs b/RotationSolver.Basic/Rotations/Basic/BlueMageRotation.cs index cb38c13b3..3429f19a8 100644 --- a/RotationSolver.Basic/Rotations/Basic/BlueMageRotation.cs +++ b/RotationSolver.Basic/Rotations/Basic/BlueMageRotation.cs @@ -24,6 +24,11 @@ public enum BluDPSSpell : byte /// GoblinPunch, + /// + /// + /// + SharpenedKnife, + } /// @@ -70,6 +75,11 @@ public enum BluAOESpell : byte /// /// ThousandNeedles, + + /// + /// + /// + ChocoMeteor, } /// @@ -86,6 +96,11 @@ public enum BluHealSpell : byte /// /// AngelsSnack, + + /// + /// + /// + PomCure, } /// @@ -159,6 +174,24 @@ public enum BLUID : byte [RotationConfig(CombatType.PvE, Name = "Aetheric Mimicry Role")] public static BLUID BlueId { get; set; } = BLUID.DPS; + static partial void ModifySharpenedKnifePvE(ref ActionSetting setting) + { + + } + + static partial void ModifyChocoMeteorPvE(ref ActionSetting setting) + { + setting.CreateConfig = () => new ActionConfig() + { + AoeCount = 3, + }; + } + + static partial void ModifyPomCurePvE(ref ActionSetting setting) + { + setting.IsFriendly = true; + } + static partial void ModifySongOfTormentPvE(ref ActionSetting setting) { setting.TargetStatusProvide = [StatusID.Bleeding_1714]; diff --git a/RotationSolver/UI/RotationConfigWindow.cs b/RotationSolver/UI/RotationConfigWindow.cs index 1e68d21c1..9fc803460 100644 --- a/RotationSolver/UI/RotationConfigWindow.cs +++ b/RotationSolver/UI/RotationConfigWindow.cs @@ -50,6 +50,8 @@ public RotationConfigWindow() MaximumSize = new Vector2(5000, 5000), }; RespectCloseHotkey = true; + + _showText = !Service.Config.HasShownMainMenuMessage; // Show the message if it hasn't been shown before } public override void OnClose() @@ -145,8 +147,15 @@ private void DrawErrorZone() { var incompatiblePlugins = DownloadHelper.IncompatiblePlugins ?? Array.Empty(); - bool hasIncompatiblePlugin = incompatiblePlugins.Any(item => - (item.Name == "XIV Combo" || item.Name == "XIV Combo Expanded" || item.Name == "XIVSlothCombo" || item.Name == "Wrath Combo") && item.IsInstalled); + bool hasIncompatiblePlugin = false; + foreach (var item in incompatiblePlugins) + { + if ((item.Name == "XIV Combo" || item.Name == "XIV Combo Expanded" || item.Name == "XIVSlothCombo" || item.Name == "Wrath Combo") && item.IsInstalled) + { + hasIncompatiblePlugin = true; + break; + } + } if (hasIncompatiblePlugin) { @@ -157,22 +166,22 @@ private void DrawErrorZone() { if (plugin.Name == "XIV Combo") { - message = "Disable XIV Combo plugin"; + message = "Disable XIV Combo plugin, causes targetting issues"; break; } else if (plugin.Name == "XIV Combo Expanded") { - message = "Disable XIV Combo Expanded plugin"; + message = "Disable XIV Combo Expanded plugin, causes targetting issues"; break; } else if (plugin.Name == "XIVSlothCombo") { - message = "Disable XIVSlothCombo plugin"; + message = "Disable XIVSlothCombo plugin, causes targetting issues"; break; } else if (plugin.Name == "Wrath Combo") { - message = "Disable Wrath Combo plugin"; + message = "Disable Wrath Combo plugin, causes targetting issues"; break; } } @@ -308,7 +317,15 @@ private void DrawSideBar() if (item.GetAttribute() != null) continue; // Check if the "AutoDuty" plugin is installed - bool isAutoDutyInstalled = incompatiblePlugins.Any(plugin => plugin.IsInstalled && plugin.Name == "AutoDuty"); + bool isAutoDutyInstalled = false; + foreach (var plugin in incompatiblePlugins) + { + if (plugin.IsInstalled && plugin.Name == "AutoDuty") + { + isAutoDutyInstalled = true; + break; + } + } // Skip the "AutoDuty" tab if the plugin is not installed if (item == RotationConfigWindowTab.AutoDuty && !isAutoDutyInstalled) continue; @@ -355,12 +372,20 @@ private void DrawSideBar() } } + private bool _showText; + private void DrawHeader(float wholeWidth) { var size = MathF.Max(MathF.Min(wholeWidth, Scale * 128), Scale * MIN_COLUMN_WIDTH); if (IconSet.GetTexture((uint)0, out var overlay)) { + if (_showText) // Conditionally render the text + { + ImGui.TextWrapped("Click RSR icon for main menu"); + ImGui.Spacing(); + } + ImGuiHelper.DrawItemMiddle(() => { var cursor = ImGui.GetCursorPos(); @@ -370,6 +395,11 @@ private void DrawHeader(float wholeWidth) { _activeTab = RotationConfigWindowTab.About; _searchResults = []; + _showText = false; // Update the flag when the icon is clicked + + // Save the configuration to indicate that the message has been shown + Service.Config.HasShownMainMenuMessage = true; + Service.Config.Save(); } ImguiTooltips.HoveredTooltip(UiString.ConfigWindow_About_Punchline.GetDescription()); @@ -422,7 +452,15 @@ private void DrawHeader(float wholeWidth) return; } - var rotations = RotationUpdater.CustomRotations.FirstOrDefault(i => i.ClassJobIds.Contains((Job)(Player.Object?.ClassJob.RowId ?? 0)))?.Rotations ?? []; + Type[] rotations = Array.Empty(); + foreach (var customRotation in RotationUpdater.CustomRotations) + { + if (customRotation.ClassJobIds.Contains((Job)(Player.Object?.ClassJob.RowId ?? 0))) + { + rotations = customRotation.Rotations; + break; + } + } if (rotation != null) { @@ -1250,9 +1288,16 @@ private static void DrawRotationDescription() var attr = RotationDescAttribute.MergeToOne(a); if (attr == null) continue; - var allActions = attr.Actions.Select(i => rotation.AllBaseActions - .FirstOrDefault(a => a.ID == (uint)i)) - .Where(i => i != null); + var allActions = new List(); + foreach (var actionId in attr.Actions) + { + var action = rotation.AllBaseActions.FirstOrDefault(a => a.ID == (uint)actionId); + if (action != null) + { + allActions.Add(action); + } + } + bool hasDesc = !string.IsNullOrEmpty(attr.Description); @@ -2204,13 +2249,14 @@ private static void DrawStatusList(string name, HashSet statuses, Status[] ImguiTooltips.HoveredTooltip(UiString.ConfigWindow_List_AddStatus.GetDescription()); } - foreach (var status in statuses.Select(a => Service.GetSheet().GetRow(a)) - .Where(a => a.RowId != 0) - .OrderByDescending(s => SearchableCollection.Similarity($"{s.Name} {s.RowId}", _statusSearching))) + foreach (var statusId in statuses) { + var status = Service.GetSheet().GetRow(statusId); + if (status.RowId == 0) continue; + void Delete() => removeId = status.RowId; - var key = $"Status{status!.RowId}"; + var key = $"Status{status.RowId}"; ImGuiHelper.DrawHotKeysPopup(key, string.Empty, (UiString.ConfigWindow_List_Remove.GetDescription(), Delete, new[] { "Delete" }));