fix bellValue
Zusammenfassung des Problems: - BellValue wurde in Zeile 357 auf false zurückgesetzt, BEVOR es für Trigger ausgewertet wurde - afterThrowState.ThrowPanel.BellValue war dadurch immer false - Bell-Expenses und Bell-GIFs wurden nie ausgelöst Lösung: - bellValue wird jetzt als separater Parameter aus action.AfterThrowState.BellValue übergeben - Die Auswertung erfolgt mit dem ursprünglichen Wert, bevor er zurückgesetzt wird
This commit is contained in:
parent
3af02d2d0a
commit
6bc79b0102
|
|
@ -439,7 +439,8 @@ public class GameEffects
|
||||||
winnerId));
|
winnerId));
|
||||||
|
|
||||||
// Fire expense triggers for special throw events
|
// 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)
|
// Record player statistics (game-type independent)
|
||||||
await RecordPlayerStatisticsAsync(state, currentPlayerId.Value, afterThrowState);
|
await RecordPlayerStatisticsAsync(state, currentPlayerId.Value, afterThrowState);
|
||||||
|
|
@ -892,6 +893,7 @@ 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
|
||||||
|
|
@ -989,7 +991,7 @@ public class GameEffects
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check for Bell hit
|
// Check for Bell hit
|
||||||
if (afterThrowState.ThrowPanel.BellValue)
|
if (bellValue)
|
||||||
{
|
{
|
||||||
var expenses = await _gameEventService.RegisterBellAsync(
|
var expenses = await _gameEventService.RegisterBellAsync(
|
||||||
currentPlayerId,
|
currentPlayerId,
|
||||||
|
|
@ -1014,7 +1016,7 @@ public class GameEffects
|
||||||
}
|
}
|
||||||
|
|
||||||
// Trigger GIF playback for special events
|
// Trigger GIF playback for special events
|
||||||
await TriggerGifForEventsAsync(state, gameId, action, afterThrowState, dispatcher);
|
await TriggerGifForEventsAsync(state, gameId, action, afterThrowState, bellValue, dispatcher);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
|
@ -1032,6 +1034,7 @@ 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;
|
||||||
|
|
@ -1046,7 +1049,7 @@ public class GameEffects
|
||||||
{
|
{
|
||||||
triggeredEvent = ThrowEventType.Circle;
|
triggeredEvent = ThrowEventType.Circle;
|
||||||
}
|
}
|
||||||
else if (afterThrowState.ThrowPanel.BellValue)
|
else if (bellValue)
|
||||||
{
|
{
|
||||||
triggeredEvent = ThrowEventType.Bell;
|
triggeredEvent = ThrowEventType.Bell;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue