Tigran 4 лет назад
Родитель
Сommit
9e0c8cb9bc

+ 4 - 1
MafiaTelegramBot/DataBase/EntityDao/UserDao.cs

@@ -22,7 +22,10 @@ namespace MafiaTelegramBot.DataBase.EntityDao
                 Interval = Constants.MEMORY_CLEANER_INTERVAL,
                 AutoReset = true
             };
-            memoryCleaner.Elapsed += async (_, _) => await CleanupMemory();
+            memoryCleaner.Elapsed += async (_, _) =>
+            {
+                await CleanupMemory();
+            };
             memoryCleaner.Start();
         }
         

+ 1 - 1
MafiaTelegramBot/Game/GameRooms/GameRoom.Structure.cs

@@ -90,7 +90,7 @@ namespace MafiaTelegramBot.Game.GameRooms
                     await PlayersRole[Roles.Parasite][0].CurrentRole.Kill();
                 if (player.CurrentRole.RoleKey==Roles.Werewolf) player.WerewolfRoleAchievementEvent(0,true);
             }
-            if (IsRanking) await Bot.SendWithMarkdown2(player.ChatId, $"{strings.you_lost} {player.SubtractRankPoints()} {strings.points}");
+            if (IsRanking && IsRunning) await Bot.SendWithMarkdown2(player.ChatId, $"{strings.you_lost} {player.SubtractRankPoints()} {strings.points}");
             player.ResetState();
         }