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

Commit

Permalink
chore: 2.4.0 released.
Browse files Browse the repository at this point in the history
  • Loading branch information
ArchiDog1998 committed Apr 25, 2023
1 parent 9acae08 commit d002784
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
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>2.3.9</Version>
<Version>2.4.0</Version>
<PlatformTarget>x64</PlatformTarget>
<Platforms>AnyCPU</Platforms>

Expand Down
11 changes: 11 additions & 0 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
"190": 0.1,
"260": 0.6,
"1128": 2.1,
"1129": 2.1,
"2240": 0.6,
"2242": 0.6,
"2248": 0.6,
Expand Down Expand Up @@ -174,13 +175,19 @@
"7505": 0.6,
"7506": 0.6,
"7507": 0.6,
"7509": 0.6,
"7510": 0.1,
"7511": 0.1,
"7517": 0.6,
"7518": 0.6,
"7527": 0.6,
"7528": 0.6,
"7529": 0.6,
"7546": 0.6,
"7548": 0.6,
"7557": 0.6,
"7559": 0.6,
"7560": 0.6,
"7561": 0.6,
"7562": 0.6,
"7568": 0.1,
Expand Down Expand Up @@ -237,6 +244,8 @@
"16508": 0.6,
"16514": 0.6,
"16516": 0.6,
"16524": 0.1,
"16525": 0.1,
"16527": 0.6,
"16540": 0.6,
"16552": 0.6,
Expand All @@ -258,6 +267,8 @@
"24284": 0.1,
"24285": 0.6,
"24290": 0.6,
"24291": 0.6,
"24300": 0.6,
"24309": 0.6,
"24312": 0.1,
"24313": 0.6,
Expand Down
2 changes: 2 additions & 0 deletions RotationSolver/UI/RotationConfigWindow_Debug.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ private unsafe void DrawParty()
ImGui.Text("CanHealSingleSpell: " + DataCenter.CanHealSingleSpell.ToString());
ImGui.Text("CanHealAreaAbility: " + DataCenter.CanHealAreaAbility.ToString());
ImGui.Text("CanHealAreaSpell: " + DataCenter.CanHealAreaSpell.ToString());

ImGui.Text("PartyMembersAverHP: " + DataCenter.PartyMembersAverHP.ToString());
}

private unsafe void DrawTargetData()
Expand Down
9 changes: 6 additions & 3 deletions RotationSolver/Updaters/TargetUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,14 +244,17 @@ private unsafe static void UpdateFriends(IEnumerable<BattleChara> allTargets)

private static float GetPartyMemberHPRatio(BattleChara member)
{
if((DateTime.Now - Watcher.HealTime).TotalSeconds > 0.5
if((DateTime.Now - Watcher.HealTime).TotalSeconds > 1
|| !Watcher.HealHP.TryGetValue(member.ObjectId, out var hp))
{
return member.GetHealthRatio();
}

return member.CurrentHp == 0 ? 0
: Math.Min(1, (hp + member.CurrentHp) / (float)member.MaxHp);
if(member.CurrentHp > 0 && member.CurrentHp <= hp.Item1)
{
return Math.Min(1, hp.Item2 / (float)member.MaxHp);
}
return member.GetHealingRatio();
}


Expand Down
4 changes: 2 additions & 2 deletions RotationSolver/Watcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class Watcher : IDisposable
private static Hook<ReceiveAbilityDelegate> _receiveAbilityHook;

public static DateTime HealTime { get; private set; } = DateTime.Now;
public static Dictionary<uint, ushort> HealHP { get; private set; } = new Dictionary<uint, ushort>();
public static Dictionary<uint, (uint, uint)> HealHP { get; private set; } = new Dictionary<uint, (uint, uint)>();
public Watcher()
{
SignatureHelper.Initialise(this);
Expand Down Expand Up @@ -90,7 +90,7 @@ private static void ActionFromSelf(uint sourceId, ActionEffectSet set, uint id)
if (tar == null || action == null) return;

HealHP = set.TargetEffects.Where(e => e[0].Type == ActionEffectType.Heal).ToDictionary(e =>
e.Target.ObjectId, e => e[0].Value);
e.Target.ObjectId, e =>((e.Target is BattleChara b ? b.CurrentHp : 0u), e[0].Value + (e.Target is BattleChara b1 ? b1.CurrentHp : 0u)));
HealTime = DateTime.Now;

//Record
Expand Down

0 comments on commit d002784

Please sign in to comment.