From 71716cae5d2083b9f5652feb10620998cd27b1ba Mon Sep 17 00:00:00 2001 From: Fooxboy Date: Sun, 29 Oct 2023 22:06:10 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B8=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D1=81=D1=82=D0=B0=D1=82=D1=83=D1=81=D0=B0?= =?UTF-8?q?=20=D1=81=D0=B5=D1=81=D1=81=D0=B8=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MyOwnGame.Backend/Services/SessionService.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MyOwnGame.Backend/Services/SessionService.cs b/MyOwnGame.Backend/Services/SessionService.cs index 2841184..472626b 100644 --- a/MyOwnGame.Backend/Services/SessionService.cs +++ b/MyOwnGame.Backend/Services/SessionService.cs @@ -216,6 +216,15 @@ public async Task ChangeRound(int roundPosition, string connectionId) throw new Exception("Ошибка при смене раунда"); } + var session = _sessionsManager.GetSessionById(player.SessionId); + + if (session is null) + { + throw new Exception("Не найдена сессия"); + } + + session.ChangeStateToTable(); + await _callbackService.RoundChanged(player.SessionId, roundInfo.RoundInfo); await _callbackService.ChangeSelectQuestionPlayer(player.SessionId, roundInfo.QuestionPlayer);