add ability to hide quests based on game player count

This commit is contained in:
Martin Michelsen
2023-12-16 11:20:56 -08:00
parent a9afab9717
commit 81af488e26
16 changed files with 320 additions and 134 deletions
+2 -2
View File
@@ -2281,8 +2281,8 @@ static void on_10(shared_ptr<Client> c, uint16_t, uint32_t, string& data) {
send_lobby_message_box(c, "$C6Your level is too\nhigh to join this\ngame.");
break;
}
if (game->quest && !c->can_play_quest(game->quest, game->difficulty)) {
send_lobby_message_box(c, "$C6You don't have access\nto the quest in progress\nin this game.");
if (game->quest && !c->can_play_quest(game->quest, game->difficulty, game->count_clients() + 1)) {
send_lobby_message_box(c, "$C6You don't have access\nto the quest in progress\nin this game, or there\nis no space for another\nplayer in the quest.");
break;
}
}