|
@@ -1,4 +1,5 @@
|
|
|
using System.Collections.Generic;
|
|
|
+using MafiaTelegramBot.CustomCollections.Extensions;
|
|
|
using MafiaTelegramBot.Game;
|
|
|
using MafiaTelegramBot.Game.GameRoles;
|
|
|
using MafiaTelegramBot.Game.GameRooms;
|
|
@@ -226,7 +227,9 @@ namespace MafiaTelegramBot.Resources
|
|
|
|
|
|
public static InlineKeyboardMarkup ChangeRolesKeyboard(long userId, string roomKey, ExtendedGameRoom room)
|
|
|
{
|
|
|
- var openedRoles = room.Owner.OpenedRoles.ToList();
|
|
|
+ List<Roles> openedRoles = new();
|
|
|
+ foreach (var player in room.Players.Values)
|
|
|
+ openedRoles.ConcatenateUnique(player.OpenedRoles.ToList());
|
|
|
var keyboard = new InlineKeyboardButton[3+openedRoles.Count][];
|
|
|
keyboard[0] = new[]
|
|
|
{
|