Compare commits
2 Commits
dd4317bf80
...
6bc79b0102
| Author | SHA1 | Date |
|---|---|---|
|
|
6bc79b0102 | |
|
|
3af02d2d0a |
|
|
@ -110,7 +110,10 @@ public record LoadCompletedGamesFailureAction(string Error);
|
|||
/// <param name="AfterThrowState">State after the throw was made.</param>
|
||||
/// <param name="IsGutter">Whether the throw went into the gutter.</param>
|
||||
/// <param name="IsLeftGutter">Whether it was the left gutter.</param>
|
||||
public record RecordThrowAction(ThrowPanelState BeforeThrowState, ThrowPanelState AfterThrowState, bool IsGutter = false, bool IsLeftGutter = false);
|
||||
public record RecordThrowAction(ThrowPanelState BeforeThrowState,
|
||||
ThrowPanelState AfterThrowState,
|
||||
bool IsGutter = false,
|
||||
bool IsLeftGutter = false);
|
||||
|
||||
/// <summary>
|
||||
/// Action dispatched after ProcessThrow completes with game logic result.
|
||||
|
|
|
|||
|
|
@ -439,7 +439,8 @@ public class GameEffects
|
|||
winnerId));
|
||||
|
||||
// Fire expense triggers for special throw events
|
||||
await FireThrowTriggersAsync(state, currentPlayerId.Value, action, afterThrowState, dispatcher);
|
||||
// Note: Use action.AfterThrowState.BellValue since afterThrowState has BellValue reset to false
|
||||
await FireThrowTriggersAsync(state, currentPlayerId.Value, action, afterThrowState, action.AfterThrowState.BellValue, dispatcher);
|
||||
|
||||
// Record player statistics (game-type independent)
|
||||
await RecordPlayerStatisticsAsync(state, currentPlayerId.Value, afterThrowState);
|
||||
|
|
@ -892,6 +893,7 @@ public class GameEffects
|
|||
Guid currentPlayerId,
|
||||
RecordThrowAction action,
|
||||
AfterThrowState afterThrowState,
|
||||
bool bellValue,
|
||||
IDispatcher dispatcher)
|
||||
{
|
||||
// Skip if no day or game context
|
||||
|
|
@ -989,7 +991,7 @@ public class GameEffects
|
|||
}
|
||||
|
||||
// Check for Bell hit
|
||||
if (afterThrowState.ThrowPanel.BellValue)
|
||||
if (bellValue)
|
||||
{
|
||||
var expenses = await _gameEventService.RegisterBellAsync(
|
||||
currentPlayerId,
|
||||
|
|
@ -1014,7 +1016,7 @@ public class GameEffects
|
|||
}
|
||||
|
||||
// Trigger GIF playback for special events
|
||||
await TriggerGifForEventsAsync(state, gameId, action, afterThrowState, dispatcher);
|
||||
await TriggerGifForEventsAsync(state, gameId, action, afterThrowState, bellValue, dispatcher);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -1032,6 +1034,7 @@ public class GameEffects
|
|||
Guid gameId,
|
||||
RecordThrowAction action,
|
||||
AfterThrowState afterThrowState,
|
||||
bool bellValue,
|
||||
IDispatcher dispatcher)
|
||||
{
|
||||
var clubId = _clubContext.ClubId;
|
||||
|
|
@ -1046,7 +1049,7 @@ public class GameEffects
|
|||
{
|
||||
triggeredEvent = ThrowEventType.Circle;
|
||||
}
|
||||
else if (afterThrowState.ThrowPanel.BellValue)
|
||||
else if (bellValue)
|
||||
{
|
||||
triggeredEvent = ThrowEventType.Bell;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 890 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.3 MiB |
Loading…
Reference in New Issue