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

release plz. #551

Merged
merged 49 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
e76e968
fix: delay bug.
ArchiDog1998 Feb 23, 2024
731f4ba
fix: manual aoe check fixed.
ArchiDog1998 Feb 23, 2024
1a2b060
fix: icon drawing.
ArchiDog1998 Feb 24, 2024
b3c648a
fix: heal when nothing todo aoe fix.
ArchiDog1998 Feb 24, 2024
083b25b
fix: add some default configs.
ArchiDog1998 Feb 24, 2024
1c317a3
New translations localization.json (Spanish)
ArchiDog1998 Feb 24, 2024
571e2a6
New translations localization.json (German)
ArchiDog1998 Feb 24, 2024
af87665
New translations localization.json (Japanese)
ArchiDog1998 Feb 24, 2024
9679fb7
New translations localization.json (Chinese Simplified)
ArchiDog1998 Feb 24, 2024
a2de41e
New translations localization.json (French)
ArchiDog1998 Feb 24, 2024
405242f
fix: desc fix.
ArchiDog1998 Feb 24, 2024
8aa60a2
fix: fixed some rotations.
ArchiDog1998 Feb 24, 2024
8635306
fix: add lb things.
ArchiDog1998 Feb 24, 2024
6a5998c
fix: fixed manual target thing.
ArchiDog1998 Feb 25, 2024
f82d01c
New translations localization.json (Spanish)
ArchiDog1998 Feb 25, 2024
4717c6c
New translations localization.json (German)
ArchiDog1998 Feb 25, 2024
cb40f92
New translations localization.json (Japanese)
ArchiDog1998 Feb 25, 2024
b922439
New translations localization.json (Chinese Simplified)
ArchiDog1998 Feb 25, 2024
37c0e7e
New translations localization.json (French)
ArchiDog1998 Feb 25, 2024
9b04b04
fix: feint target.
ArchiDog1998 Feb 25, 2024
34739eb
chore: 4.0.3.3 released.
ArchiDog1998 Feb 25, 2024
b8a5f9a
feat: add offset delay.
ArchiDog1998 Feb 26, 2024
0afa0ec
New translations localization.json (Spanish)
ArchiDog1998 Feb 26, 2024
84bca6f
New translations localization.json (German)
ArchiDog1998 Feb 26, 2024
8a64142
New translations localization.json (Japanese)
ArchiDog1998 Feb 26, 2024
d14c60c
New translations localization.json (Chinese Simplified)
ArchiDog1998 Feb 26, 2024
9274ace
New translations localization.json (French)
ArchiDog1998 Feb 26, 2024
ad5c209
fix: make drawing faster.
ArchiDog1998 Feb 26, 2024
9c060b1
fix: longer delay for social.
ArchiDog1998 Feb 26, 2024
01fbd83
fix: time fixed.
ArchiDog1998 Feb 26, 2024
7924c55
fix: action condition can use fix.
ArchiDog1998 Feb 27, 2024
86264c0
docs: add comments.
ArchiDog1998 Feb 27, 2024
3bafba6
fix: make some methods public.
ArchiDog1998 Feb 27, 2024
3016cef
fix: add opcode.
ArchiDog1998 Feb 27, 2024
ab3a209
New translations localization.json (Spanish)
ArchiDog1998 Feb 27, 2024
05cab6a
New translations localization.json (German)
ArchiDog1998 Feb 27, 2024
4b96b5b
New translations localization.json (Japanese)
ArchiDog1998 Feb 27, 2024
f237f4b
New translations localization.json (Chinese Simplified)
ArchiDog1998 Feb 27, 2024
6168aae
New translations localization.json (French)
ArchiDog1998 Feb 27, 2024
57ad3f8
feat: add a thing to check the timeline.
ArchiDog1998 Feb 27, 2024
de75e3c
fix: add raise delay.
ArchiDog1998 Feb 28, 2024
d13d846
fix: add more thing to sync the raid time.
ArchiDog1998 Feb 28, 2024
635cf32
feat: add a ttu for all actions.
ArchiDog1998 Feb 28, 2024
4cda9b1
feat: add timeline ui stuff.
ArchiDog1998 Feb 28, 2024
1911644
New translations localization.json (Chinese Simplified)
ArchiDog1998 Feb 28, 2024
858d2fb
fix: fixed some things about the timeline.
ArchiDog1998 Feb 28, 2024
06e3079
chore: 4.1.0 released.
ArchiDog1998 Feb 28, 2024
6146e87
fix: default ttu.
ArchiDog1998 Feb 28, 2024
5d4991d
Merge pull request #550 from ArchiDog1998/l10n_main
ArchiDog1998 Feb 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net7.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Authors>ArchiTed</Authors>
<Version>4.0.3.1</Version>
<Version>4.1.0</Version>
<PlatformTarget>x64</PlatformTarget>
<Platforms>AnyCPU</Platforms>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion ECommons
Submodule ECommons updated 31 files
+12 −0 ECommons/Automation/Chat.cs
+3 −130 ECommons/Automation/TaskManager/TaskManager.cs
+135 −0 ECommons/Automation/TaskManager/TaskManager@Enqueue.cs
+135 −0 ECommons/Automation/TaskManager/TaskManager@EnqueueImmediate.cs
+79 −0 ECommons/Automation/TaskManager/TaskManager@Insert.cs
+0 −0 ECommons/Automation/TaskManager/TaskManagerTask.cs
+16 −0 ECommons/ChatMethods/Sender.cs
+51 −14 ECommons/Configuration/EzConfig.cs
+1 −0 ECommons/ECommons.csproj
+4 −1 ECommons/ECommonsMain.cs
+4 −0 ECommons/ExcelServices/ExcelItemHelper.cs
+11 −0 ECommons/ExcelServices/ExcelJobHelper.cs
+9 −2 ECommons/GameHelpers/Player.cs
+128 −12 ECommons/GenericHelpers.cs
+5 −0 ECommons/ImGuiMethods/Box.cs
+13 −0 ECommons/ImGuiMethods/EnumMemberNameAttribute.cs
+40 −0 ECommons/ImGuiMethods/ImGuiEx/Alignment.cs
+1 −1 ECommons/ImGuiMethods/ImGuiEx/Checkbox.cs
+76 −0 ECommons/ImGuiMethods/ImGuiEx/EzTable.cs
+96 −41 ECommons/ImGuiMethods/ImGuiEx/ImGuiEx.cs
+2 −0 ECommons/ImGuiMethods/ImGuiEx/ObsoleteOverloads.cs
+6 −4 ECommons/ImGuiMethods/ThreadLoadImageHandler.cs
+1 −1 ECommons/Logging/InternalLog.cs
+444 −0 ECommons/MathHelpers/BitHelper.cs
+2 −2 ECommons/PartyFunctions/UniversalParty.cs
+20 −0 ECommons/Reflection/CachedPluginEntry.cs
+49 −13 ECommons/Reflection/DalamudReflector.cs
+35 −0 ECommons/Reflection/ReflectionHelper/Call.cs
+62 −0 ECommons/Reflection/ReflectionHelper/CallStatic.cs
+33 −15 ECommons/Reflection/ReflectionHelper/ReflectionHelper.cs
+121 −0 ECommons/Reflection/ReflectionHelper/Utils.cs
26 changes: 0 additions & 26 deletions Resources/ActionAOECounts.json

This file was deleted.

1 change: 0 additions & 1 deletion Resources/ActionHealRatio.json

This file was deleted.

14 changes: 0 additions & 14 deletions Resources/ActionTTK.json

This file was deleted.

1 change: 1 addition & 0 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,7 @@
"16470": 0.6,
"16472": 0.6,
"16473": 0.6,
"16474": 0.6,
"16478": 0.8,
"16479": 0.6,
"16480": 1.5,
Expand Down
3 changes: 2 additions & 1 deletion Resources/BeneficialPositions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"641": [],
"837": [],
"613": [],
"1175": []
"1175": [],
"340": []
}
19 changes: 18 additions & 1 deletion Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -494,5 +494,22 @@
17435,
35384,
35386,
36001
36001,
20052,
20386,
9239,
11325,
11344,
11349,
11484,
11550,
11464,
11612,
11306,
11308,
33139,
21009,
26071,
26072,
26064
]
3 changes: 3 additions & 0 deletions Resources/NoHostileNames.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
],
"1175": [
""
],
"340": [
""
]
}
3 changes: 3 additions & 0 deletions Resources/NoProvokeNames.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,8 @@
],
"1175": [
""
],
"340": [
""
]
}
4 changes: 2 additions & 2 deletions Resources/RotationSolverRecord.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"ClickingCount": 70096,
"SayingHelloCount": 60,
"ClickingCount": 87918,
"SayingHelloCount": 95,
"SaidUsers": []
}
78 changes: 73 additions & 5 deletions RotationSolver.Basic/Actions/ActionBasicInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@

namespace RotationSolver.Basic.Actions;

public struct ActionBasicInfo
/// <summary>
/// The action info for the <see cref="Lumina.Excel.GeneratedSheets.Action"/>.
/// </summary>
public readonly struct ActionBasicInfo
{
internal static readonly uint[] ActionsNoNeedCasting =
[
Expand All @@ -15,25 +18,65 @@ public struct ActionBasicInfo
];

private readonly IBaseAction _action;

/// <summary>
/// The name of the action.
/// </summary>
public readonly string Name => _action.Action.Name;

/// <summary>
/// The ID of the action.
/// </summary>
public readonly uint ID => _action.Action.RowId;

/// <summary>
/// The icon of the action.
/// </summary>
public readonly uint IconID => ID == (uint)ActionID.SprintPvE ? 104u : _action.Action.Icon;

/// <summary>
/// The adjust id of this action.
/// </summary>
public readonly uint AdjustedID => (uint)Service.GetAdjustedActionId((ActionID)ID);

/// <summary>
/// The attack type of this action.
/// </summary>
public readonly AttackType AttackType => (AttackType)(_action.Action.AttackType.Value?.RowId ?? byte.MaxValue);

/// <summary>
/// The aspect of this action.
/// </summary>
public Aspect Aspect { get; }

/// <summary>
/// The animation lock time of this action.
/// </summary>
public readonly float AnimationLockTime => OtherConfiguration.AnimationLockTime?.TryGetValue(AdjustedID, out var time) ?? false ? time : 0.6f;

/// <summary>
/// The level of this action.
/// </summary>
public readonly byte Level => _action.Action.ClassJobLevel;

/// <summary>
/// If this action is enough level to use.
/// </summary>
public readonly bool EnoughLevel => Player.Level >= Level;

/// <summary>
/// If this action a pvp action.
/// </summary>
public readonly bool IsPvP => _action.Action.IsPvP;

/// <summary>
/// Casting time.
/// </summary>
public readonly unsafe float CastTime => ((ActionID)AdjustedID).GetCastTime();

/// <summary>
/// How many mp does this action needs.
/// </summary>
public readonly unsafe uint MPNeed
{
get
Expand All @@ -47,6 +90,9 @@ public readonly unsafe uint MPNeed
}
}

/// <summary>
/// Is thia action on the slot.
/// </summary>
public readonly bool IsOnSlot
{
get
Expand All @@ -64,12 +110,32 @@ public readonly bool IsOnSlot
return IsPvP == DataCenter.Territory?.IsPvpZone;
}
}

/// <summary>
/// Is this action is a lb action.
/// </summary>
public bool IsLimitBreak { get; }

/// <summary>
/// Is this action a general gcd.
/// </summary>
public bool IsGeneralGCD { get; }

/// <summary>
/// Is this action a real gcd.
/// </summary>
public bool IsRealGCD { get; }

/// <summary>
/// Is this action a duty action.
/// </summary>
public bool IsDutyAction { get; }
public Aspect Aspect { get; }

/// <summary>
/// The basic way to create a basic info
/// </summary>
/// <param name="action">the action</param>
/// <param name="isDutyAction">if it is a duty action.</param>
public ActionBasicInfo(IBaseAction action, bool isDutyAction)
{
_action = action;
Expand All @@ -81,10 +147,12 @@ public ActionBasicInfo(IBaseAction action, bool isDutyAction)
Aspect = (Aspect)_action.Action.Aspect;
}

internal readonly bool BasicCheck(bool skipStatusProvideCheck, bool skipCombo, bool ignoreCastingCheck)
internal readonly bool BasicCheck(bool skipStatusProvideCheck, bool skipComboCheck, bool skipCastingCheck)
{
if (!_action.Config.IsEnabled || !IsOnSlot) return false;

if (IsLimitBreak) return true;

//Disabled.
if (DataCenter.DisabledActionSequencer?.Contains(ID) ?? false) return false;

Expand All @@ -110,7 +178,7 @@ internal readonly bool BasicCheck(bool skipStatusProvideCheck, bool skipCombo, b
if (CustomRotation.LimitBreakLevel <= 1) return false;
}

if (!skipCombo && IsGeneralGCD)
if (!skipComboCheck && IsGeneralGCD)
{
if (!CheckForCombo()) return false;
}
Expand All @@ -132,7 +200,7 @@ internal readonly bool BasicCheck(bool skipStatusProvideCheck, bool skipCombo, b
//Is knocking back.
if (DateTime.Now > DataCenter.KnockbackStart && DateTime.Now < DataCenter.KnockbackFinished) return false;

if (DataCenter.NoPoslock && DataCenter.IsMoving && !ignoreCastingCheck) return false;
if (DataCenter.NoPoslock && DataCenter.IsMoving && !skipCastingCheck) return false;
}

if (IsGeneralGCD && _action.Setting.StatusProvide?.Length > 0 && _action.Setting.IsFriendly
Expand Down
36 changes: 35 additions & 1 deletion RotationSolver.Basic/Actions/ActionConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,53 @@
public class ActionConfig()
{
private bool _isEnable = true;

/// <summary>
/// If this action is enabled.
/// </summary>
public bool IsEnabled
{
get => IBaseAction.ForceEnable || _isEnable;
set => _isEnable = value;
}

/// <summary>
/// Should check the status for this action.
/// </summary>
public bool ShouldCheckStatus { get; set; } = true;

/// <summary>
/// The status count in gcd for adding the status.
/// </summary>
public byte StatusGcdCount { get; set; } = 2;

/// <summary>
/// The aoe count of this action.
/// </summary>
public byte AoeCount { get; set; } = 3;

/// <summary>
/// How many ttk should this action use.
/// </summary>
public float TimeToKill { get; set; } = 0;

public bool ShouldCheckStatus { get; set; } = true;
/// <summary>
/// How many ttu should this action use.
/// </summary>
public float TimeToUntargetable { get; set; } = 0;

/// <summary>
/// The heal ratio for the auto heal.
/// </summary>
public float AutoHealRatio { get; set; } = 0.8f;

/// <summary>
/// Is this action in the cd window.
/// </summary>
public bool IsInCooldown { get; set; } = true;

/// <summary>
/// Is this action should be a mistake action.
/// </summary>
public bool IsInMistake { get; set; }
}
23 changes: 23 additions & 0 deletions RotationSolver.Basic/Actions/ActionCooldownInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@
using FFXIVClientStructs.FFXIV.Client.Game;

namespace RotationSolver.Basic.Actions;

/// <summary>
/// The action cooldown information.
/// </summary>
public readonly struct ActionCooldownInfo : ICooldown
{
private readonly IBaseAction _action;

/// <summary>
/// The cd group.
/// </summary>
public byte CoolDownGroup { get; }

unsafe RecastDetail* CoolDownDetail => ActionIdHelper.GetCoolDownDetail(CoolDownGroup);
Expand Down Expand Up @@ -61,6 +69,10 @@ namespace RotationSolver.Basic.Actions;

float RecastTimeElapsedOneChargeRaw => RecastTimeElapsedRaw % RecastTimeOneChargeRaw;

/// <summary>
/// The default constructor.
/// </summary>
/// <param name="action">the action.</param>
public ActionCooldownInfo(IBaseAction action)
{
_action = action;
Expand Down Expand Up @@ -118,6 +130,17 @@ public bool WillHaveOneChargeGCD(uint gcdCount = 0, float offset = 0)
public bool WillHaveOneCharge(float remain)
=> HasOneCharge || RecastTimeRemainOneCharge <= remain;

/// <summary>
/// Is this action used after several time.
/// </summary>
/// <param name="time"></param>
/// <returns></returns>
public bool JustUsedAfter(float time)
{
var elapsed = RecastTimeElapsedRaw % RecastTimeOneChargeRaw;
return elapsed + DataCenter.WeaponRemain < time;
}

internal bool CooldownCheck(bool isEmpty, bool onLastAbility, bool ignoreClippingCheck, byte gcdCountForAbility)
{
if (!_action.Info.IsGeneralGCD)
Expand Down
Loading