Skip to content

Commit

Permalink
Merge pull request #533 from FFXIV-CombatReborn/NullResourceUpdate
Browse files Browse the repository at this point in the history
ActionUpdater, MajorUpdater, DrawAbout, and updated resources
  • Loading branch information
LTS-FFXIV authored Jan 6, 2025
2 parents 03fad28 + a491e7e commit c50d967
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 26 deletions.
4 changes: 2 additions & 2 deletions BasicRotations/Healer/SGE_Default.cs
Original file line number Diff line number Diff line change
Expand Up @@ -381,8 +381,6 @@ protected override bool GeneralGCD(out IAction? act)

if (HasSwift && SwiftLogic && EgeiroPvE.CanUse(out _)) return false;

if (!InCombat && !Player.HasStatus(true, StatusID.Eukrasia) && EukrasiaPvE.CanUse(out act)) return true;

if (PhlegmaIiiPvE.CanUse(out act, usedUp: IsMoving)) return true;
if (PhlegmaIiPvE.CanUse(out act, usedUp: IsMoving)) return true;
if (PhlegmaPvE.CanUse(out act, usedUp: IsMoving)) return true;
Expand All @@ -401,6 +399,8 @@ protected override bool GeneralGCD(out IAction? act)

if (DosisPvE.CanUse(out act)) return true;

if (!InCombat && !Player.HasStatus(true, StatusID.Eukrasia) && EukrasiaPvE.CanUse(out act)) return true;
if (InCombat && !HasHostilesInRange && EukrasiaPvE.CanUse(out act)) return true;
return base.GeneralGCD(out act);
}
#endregion
Expand Down
9 changes: 5 additions & 4 deletions Resources/AnimationLockTime.json
Original file line number Diff line number Diff line change
Expand Up @@ -756,8 +756,8 @@
"28901": 2.1,
"28917": 2.1,
"28924": 2.1,
"29054": 0.46599996,
"29056": 0.24599996,
"29054": 0.473,
"29056": 0.24299997,
"29223": 0.1,
"29224": 0.1,
"29226": 0.6,
Expand Down Expand Up @@ -790,7 +790,7 @@
"29484": 0.24099997,
"29485": 0.4190002,
"29709": 0.1,
"29711": 0.37699994,
"29711": 0.37800002,
"29716": 0.1,
"29731": 0.1,
"29732": 0.6,
Expand Down Expand Up @@ -878,6 +878,7 @@
"37018": 0.6,
"37023": 0.6,
"37024": 0.6,
"37025": 0.6,
"37026": 0.6,
"37028": 0.6,
"37029": 0.6,
Expand All @@ -901,7 +902,7 @@
"40109": 2.6,
"40110": 2.6,
"40111": 2.6,
"41467": 0.556,
"41467": 0.1,
"41494": 0.1,
"41496": 0.1,
"41498": 0.15499976,
Expand Down
6 changes: 5 additions & 1 deletion Resources/HostileCastingArea.json
Original file line number Diff line number Diff line change
Expand Up @@ -717,5 +717,9 @@
4205,
40516,
40522,
40509
40509,
1078,
1074,
20422,
22660
]
9 changes: 8 additions & 1 deletion Resources/HostileCastingKnockback.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,12 @@
28981,
29003,
37662,
10535
10535,
22769,
36609,
36610,
36611,
36612,
37661,
37662
]
30 changes: 17 additions & 13 deletions RotationSolver/UI/RotationConfigWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -733,23 +733,27 @@ private static void DrawAbout()
{
// Draw the clicking count with a specific color
using var color = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.2f, 0.6f, 0.95f, 1));
var countStr = string.Format(UiString.ConfigWindow_About_ClickingCount.GetDescription(), clickingCount);
ImGuiHelper.DrawItemMiddle(() =>
var countStr = UiString.ConfigWindow_About_ClickingCount.GetDescription();
if (countStr != null)
{
ImGui.TextWrapped(countStr);
}, width, ImGui.CalcTextSize(countStr).X);
countStr = string.Format(countStr, clickingCount);
ImGuiHelper.DrawItemMiddle(() =>
{
ImGui.TextWrapped(countStr);
}, width, ImGui.CalcTextSize(countStr).X);

// Draw the appropriate message based on the clicking count
foreach (var pair in CountStringPair.Reverse())
{
if (clickingCount >= pair.Key)
// Draw the appropriate message based on the clicking count
foreach (var pair in CountStringPair.Reverse())
{
countStr = pair.Value;
ImGuiHelper.DrawItemMiddle(() =>
if (clickingCount >= pair.Key && pair.Value != null)
{
ImGui.TextWrapped(countStr);
}, width, ImGui.CalcTextSize(countStr).X);
break;
countStr = pair.Value;
ImGuiHelper.DrawItemMiddle(() =>
{
ImGui.TextWrapped(countStr);
}, width, ImGui.CalcTextSize(countStr).X);
break;
}
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions RotationSolver/Updaters/ActionUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ private unsafe static void UpdateMoving()
_startMovingTime = DateTime.Now;
}

DataCenter.StopMovingRaw = _stopMovingTime == DateTime.MinValue
DataCenter.StopMovingRaw = DataCenter.IsMoving
? 0
: (float)(DateTime.Now - _stopMovingTime).TotalSeconds;

DataCenter.MovingRaw = _startMovingTime == DateTime.MinValue
? 0
: (float)(DateTime.Now - _startMovingTime).TotalSeconds;
DataCenter.MovingRaw = DataCenter.IsMoving
? (float)(DateTime.Now - _startMovingTime).TotalSeconds
: 0;
}

static DateTime _startCombatTime = DateTime.MinValue;
Expand Down
3 changes: 2 additions & 1 deletion RotationSolver/Updaters/MajorUpdater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,9 @@ private static void UpdateWork()

// Collect expired VfxNewData items
var expiredVfx = new List<VfxNewData>();
foreach (var vfx in DataCenter.VfxDataQueue)
for (int i = 0; i < DataCenter.VfxDataQueue.Count; i++)
{
var vfx = DataCenter.VfxDataQueue[i];
if (vfx.TimeDuration > TimeSpan.FromSeconds(10))
{
expiredVfx.Add(vfx);
Expand Down

0 comments on commit c50d967

Please sign in to comment.