Tigran 4 years ago
parent
commit
83763948a1

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

@@ -1,6 +1,5 @@
 using System.Linq;
 using System.Threading.Tasks;
-using MafiaTelegramBot.CustomCollections.Extensions;
 using MafiaTelegramBot.Game.GameRooms;
 using MafiaTelegramBot.Models;
 using MafiaTelegramBot.Resources;

+ 4 - 1
MafiaTelegramBot/Resources/Keyboard.cs

@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using MafiaTelegramBot.Game;
+using MafiaTelegramBot.Game.GameRoles;
 using MafiaTelegramBot.Game.GameRooms;
 using Telegram.Bot.Types.ReplyMarkups;
 
@@ -189,10 +190,12 @@ namespace MafiaTelegramBot.Resources
             var inlineButtons = new InlineKeyboardButton[players.Count + 1][];
             for (var i = 0; i<players.Count; ++i)
             {
+                var isMafia = (players[i].GetRole() is Roles.Mafia or Roles.Don or Roles.Dame)
+                               || (players[i].GetRole() is Roles.Werewolf && ((WerewolfRole) players[i].CurrentRole).IsMafia);
                 inlineButtons[i] = new[]
                 {
                     InlineKeyboardButton.WithCallbackData($"({players[i].TurnOrder}) " +
-                        $"{players[i].NickName}{(players[i].GetRole() is Roles.Mafia or Roles.Don or Roles.Dame ? " - " + players[i].GetRoleName() : "")}", 
+                        $"{players[i].NickName}{(isMafia ? " - " + players[i].GetRoleName() : "")}", 
                         $"{Callback.MafiaTarget}|{userId}|{players[i].Id}")
                 };
             }