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

Commit

Permalink
fix: fixed the bug that some aoe actions are not used.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Jan 21, 2023
1 parent 6549ea6 commit bb314a7
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 34 deletions.
3 changes: 2 additions & 1 deletion RotationSolver/Actions/BaseAction/BaseAction_Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,12 @@ private bool TargetSelf(bool mustUse, int aoeCount)
}

//如果不用自动找目标,那就不打AOE
if (RSCommands.StateType != StateCommandType.Manual)
if (RSCommands.StateType == StateCommandType.Manual)
{
if (!Service.Configuration.UseAOEWhenManual && !mustUse) return false;
}
var count = TargetFilter.GetObjectInRadius(TargetFilterFuncEot(TargetUpdater.HostileTargets, mustUse), _action.EffectRange).Count();

if (count < aoeCount) return false;
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion RotationSolver/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

[assembly: AssemblyCompany("-")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Teach you how to perform better in combat!")]
[assembly: AssemblyDescription("Based on the pve combat information in one frame, find the best action.")]
[assembly: AssemblyFileVersion("1.1.0")]
[assembly: AssemblyInformationalVersion("1.1.0")]
[assembly: TargetPlatform("Windows7.0")]
Expand Down
42 changes: 21 additions & 21 deletions RotationSolver/Updaters/MajorUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ namespace RotationSolver.Updaters;

internal static class MajorUpdater
{
#if DEBUG
private static readonly Dictionary<int, bool> _valus = new Dictionary<int, bool>();
#endif
//#if DEBUG
// private static readonly Dictionary<int, bool> _valus = new Dictionary<int, bool>();
//#endif
private unsafe static void FrameworkUpdate(Framework framework)
{
if (!Service.Conditions.Any() || Service.ClientState.LocalPlayer == null) return;

#if DEBUG
//Get changed condition.
string[] enumNames = Enum.GetNames(typeof(Dalamud.Game.ClientState.Conditions.ConditionFlag));
int[] indexs = (int[])Enum.GetValues(typeof(Dalamud.Game.ClientState.Conditions.ConditionFlag));
if (enumNames.Length == indexs.Length)
{
for (int i = 0; i < enumNames.Length; i++)
{
string key = enumNames[i];
bool newValue = Service.Conditions[(Dalamud.Game.ClientState.Conditions.ConditionFlag)indexs[i]];
if (_valus.ContainsKey(i) && _valus[i] != newValue && indexs[i] != 48 && indexs[i] != 27)
{
Service.ToastGui.ShowQuest(indexs[i].ToString() + " " + key + ": " + newValue.ToString());
}
_valus[i] = newValue;
}
}
#endif
//#if DEBUG
// //Get changed condition.
// string[] enumNames = Enum.GetNames(typeof(Dalamud.Game.ClientState.Conditions.ConditionFlag));
// int[] indexs = (int[])Enum.GetValues(typeof(Dalamud.Game.ClientState.Conditions.ConditionFlag));
// if (enumNames.Length == indexs.Length)
// {
// for (int i = 0; i < enumNames.Length; i++)
// {
// string key = enumNames[i];
// bool newValue = Service.Conditions[(Dalamud.Game.ClientState.Conditions.ConditionFlag)indexs[i]];
// if (_valus.ContainsKey(i) && _valus[i] != newValue && indexs[i] != 48 && indexs[i] != 27)
// {
// Service.ToastGui.ShowQuest(indexs[i].ToString() + " " + key + ": " + newValue.ToString());
// }
// _valus[i] = newValue;
// }
// }
//#endif
//Update State.
PreviewUpdater.UpdatePreview();

Expand Down
22 changes: 11 additions & 11 deletions RotationSolver/Windows/OverlayWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,17 @@ private static void DrawMoveTarget()
var c = Service.Configuration.MovingTargetColor;
var color = ImGui.GetColorU32(new Vector4(c.X, c.Y, c.Z, 1));

#if DEBUG
Service.GameGui.WorldToScreen(Service.ClientState.LocalPlayer.Position, out var plp);
var calHealth = (double)ObjectHelper.GetHealthFromMulty(1);
foreach (var t in TargetUpdater.AllTargets)
{
if (Service.GameGui.WorldToScreen(t.Position, out var p))
{
ImGui.GetWindowDrawList().AddText(p, color, $"Boss Ratio (Max): {t.MaxHp / calHealth:F2}\nDying Ratio (Current): {t.CurrentHp / calHealth:F2}");
}
}
#endif
//#if DEBUG
// Service.GameGui.WorldToScreen(Service.ClientState.LocalPlayer.Position, out var plp);
// var calHealth = (double)ObjectHelper.GetHealthFromMulty(1);
// foreach (var t in TargetUpdater.AllTargets)
// {
// if (Service.GameGui.WorldToScreen(t.Position, out var p))
// {
// ImGui.GetWindowDrawList().AddText(p, color, $"Boss Ratio (Max): {t.MaxHp / calHealth:F2}\nDying Ratio (Current): {t.CurrentHp / calHealth:F2}");
// }
// }
//#endif
var tar = IconReplacer.RightNowRotation?.MoveTarget;
if (tar == null || tar == Service.ClientState.LocalPlayer) return;

Expand Down

0 comments on commit bb314a7

Please sign in to comment.