From 8a032b1b9233406ec2b02a1bbb6c3b4217292aac Mon Sep 17 00:00:00 2001 From: Felscream Date: Fri, 6 Sep 2024 00:08:26 +0200 Subject: [PATCH] More bugfixes --- DragoonMayCry/Audio/AudioService.cs | 1 - .../Score/Action/PlayerActionTracker.cs | 16 ++++++---------- DragoonMayCry/Score/Style/StyleRankHandler.cs | 2 +- DragoonMayCry/State/PlayerState.cs | 2 +- 4 files changed, 8 insertions(+), 13 deletions(-) diff --git a/DragoonMayCry/Audio/AudioService.cs b/DragoonMayCry/Audio/AudioService.cs index 77fa2bd..b4817de 100644 --- a/DragoonMayCry/Audio/AudioService.cs +++ b/DragoonMayCry/Audio/AudioService.cs @@ -45,7 +45,6 @@ public void PlaySfx(SoundId key, bool force = false) if (!force && !CanPlaySfx(key)) { - soundIdsNextAvailability[key] -= 1; return; } diff --git a/DragoonMayCry/Score/Action/PlayerActionTracker.cs b/DragoonMayCry/Score/Action/PlayerActionTracker.cs index 018122d..c6826e0 100644 --- a/DragoonMayCry/Score/Action/PlayerActionTracker.cs +++ b/DragoonMayCry/Score/Action/PlayerActionTracker.cs @@ -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; } @@ -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) @@ -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) diff --git a/DragoonMayCry/Score/Style/StyleRankHandler.cs b/DragoonMayCry/Score/Style/StyleRankHandler.cs index 03432a0..89b882a 100644 --- a/DragoonMayCry/Score/Style/StyleRankHandler.cs +++ b/DragoonMayCry/Score/Style/StyleRankHandler.cs @@ -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; } diff --git a/DragoonMayCry/State/PlayerState.cs b/DragoonMayCry/State/PlayerState.cs index 6bbc447..9e6d82f 100644 --- a/DragoonMayCry/State/PlayerState.cs +++ b/DragoonMayCry/State/PlayerState.cs @@ -139,7 +139,7 @@ public bool IsCombatJob() public bool IsIncapacitated() { - if(Player == null || Player.IsDead) + if(Player == null) { return true; }