Compare commits

..

No commits in common. "6bc79b0102cd4384ccd0685999bec760ae03d724" and "dd4317bf806f8a0fadfa78d18484e1621b219cd9" have entirely different histories.

4 changed files with 5 additions and 11 deletions

View File

@ -110,10 +110,7 @@ public record LoadCompletedGamesFailureAction(string Error);
/// <param name="AfterThrowState">State after the throw was made.</param> /// <param name="AfterThrowState">State after the throw was made.</param>
/// <param name="IsGutter">Whether the throw went into the gutter.</param> /// <param name="IsGutter">Whether the throw went into the gutter.</param>
/// <param name="IsLeftGutter">Whether it was the left gutter.</param> /// <param name="IsLeftGutter">Whether it was the left gutter.</param>
public record RecordThrowAction(ThrowPanelState BeforeThrowState, public record RecordThrowAction(ThrowPanelState BeforeThrowState, ThrowPanelState AfterThrowState, bool IsGutter = false, bool IsLeftGutter = false);
ThrowPanelState AfterThrowState,
bool IsGutter = false,
bool IsLeftGutter = false);
/// <summary> /// <summary>
/// Action dispatched after ProcessThrow completes with game logic result. /// Action dispatched after ProcessThrow completes with game logic result.

View File

@ -439,8 +439,7 @@ public class GameEffects
winnerId)); winnerId));
// Fire expense triggers for special throw events // Fire expense triggers for special throw events
// Note: Use action.AfterThrowState.BellValue since afterThrowState has BellValue reset to false await FireThrowTriggersAsync(state, currentPlayerId.Value, action, afterThrowState, dispatcher);
await FireThrowTriggersAsync(state, currentPlayerId.Value, action, afterThrowState, action.AfterThrowState.BellValue, dispatcher);
// Record player statistics (game-type independent) // Record player statistics (game-type independent)
await RecordPlayerStatisticsAsync(state, currentPlayerId.Value, afterThrowState); await RecordPlayerStatisticsAsync(state, currentPlayerId.Value, afterThrowState);
@ -893,7 +892,6 @@ public class GameEffects
Guid currentPlayerId, Guid currentPlayerId,
RecordThrowAction action, RecordThrowAction action,
AfterThrowState afterThrowState, AfterThrowState afterThrowState,
bool bellValue,
IDispatcher dispatcher) IDispatcher dispatcher)
{ {
// Skip if no day or game context // Skip if no day or game context
@ -991,7 +989,7 @@ public class GameEffects
} }
// Check for Bell hit // Check for Bell hit
if (bellValue) if (afterThrowState.ThrowPanel.BellValue)
{ {
var expenses = await _gameEventService.RegisterBellAsync( var expenses = await _gameEventService.RegisterBellAsync(
currentPlayerId, currentPlayerId,
@ -1016,7 +1014,7 @@ public class GameEffects
} }
// Trigger GIF playback for special events // Trigger GIF playback for special events
await TriggerGifForEventsAsync(state, gameId, action, afterThrowState, bellValue, dispatcher); await TriggerGifForEventsAsync(state, gameId, action, afterThrowState, dispatcher);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -1034,7 +1032,6 @@ public class GameEffects
Guid gameId, Guid gameId,
RecordThrowAction action, RecordThrowAction action,
AfterThrowState afterThrowState, AfterThrowState afterThrowState,
bool bellValue,
IDispatcher dispatcher) IDispatcher dispatcher)
{ {
var clubId = _clubContext.ClubId; var clubId = _clubContext.ClubId;
@ -1049,7 +1046,7 @@ public class GameEffects
{ {
triggeredEvent = ThrowEventType.Circle; triggeredEvent = ThrowEventType.Circle;
} }
else if (bellValue) else if (afterThrowState.ThrowPanel.BellValue)
{ {
triggeredEvent = ThrowEventType.Bell; triggeredEvent = ThrowEventType.Bell;
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 890 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 MiB