Skip to content

Commit

Permalink
More bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Felscream committed Sep 5, 2024
1 parent ce6dbb8 commit 8a032b1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
1 change: 0 additions & 1 deletion DragoonMayCry/Audio/AudioService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public void PlaySfx(SoundId key, bool force = false)

if (!force && !CanPlaySfx(key))
{
soundIdsNextAvailability[key] -= 1;
return;
}

Expand Down
16 changes: 6 additions & 10 deletions DragoonMayCry/Score/Action/PlayerActionTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ private unsafe void DetectWastedGCD()
{
// do not track dropped GCDs if the LB is being cast
// or the player died between 2 GCDs
if (CannotTrackWastedGcds())
if (limitBreakCast != null || playerState.IsDead)
{
return;
}
Expand All @@ -397,7 +397,11 @@ private unsafe void DetectWastedGCD()
if (!isGcdDropped && currentWastedGcd > GcdDropThreshold)
{
isGcdDropped = true;
OnGcdDropped?.Invoke(this, EventArgs.Empty);
if (!playerState.IsIncapacitated() && playerState.HasTarget())
{
OnGcdDropped?.Invoke(this, EventArgs.Empty);
}

}
}
else if (currentWastedGcd > 0)
Expand All @@ -408,14 +412,6 @@ private unsafe void DetectWastedGCD()
}
}

private bool CannotTrackWastedGcds()
{
return !playerState.HasTarget()
|| limitBreakCast != null
|| playerState.IsDead
|| playerState.IsIncapacitated();
}

private void OnDeath(object sender, bool isDead)
{
if (limitBreakCast != null)
Expand Down
2 changes: 1 addition & 1 deletion DragoonMayCry/Score/Style/StyleRankHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private void ResetRank()
private void ForceRankTo(StyleType type, bool isBlunder)
{

if (CurrentStyle?.Value == type)
if (CurrentStyle?.Value == type || CurrentStyle?.Value < type)
{
return;
}
Expand Down
2 changes: 1 addition & 1 deletion DragoonMayCry/State/PlayerState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ public bool IsCombatJob()

public bool IsIncapacitated()
{
if(Player == null || Player.IsDead)
if(Player == null)
{
return true;
}
Expand Down

0 comments on commit 8a032b1

Please sign in to comment.