Tigran 4 years ago
parent
commit
1ccaee709c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      MafiaTelegramBot/Game/GameRoles/HookerRole.cs

+ 1 - 1
MafiaTelegramBot/Game/GameRoles/HookerRole.cs

@@ -14,7 +14,7 @@ namespace MafiaTelegramBot.Game.GameRoles
         public override async Task NightAction()
         {
             var targets = Room.Players.Values.Where(p => p.IsAlive && p.Id != Player.Id && p.CanBeBlockedNight).ToList();
-            Room.Players[NightTargetId].CanBeBlockedNight = true;
+            if (NightTargetId != -1) Room.Players[NightTargetId].CanBeBlockedNight = true;
             NightTargetId = -1;
             var message = await Bot.SendWithMarkdown2(Player.ChatId, strings.choose_player_to_block_night, 
                 Keyboard.NightChooseTargetKeyboard(targets, Player.Id));