Skip to content

Commit

Permalink
Remove Difficulty Gate
Browse files Browse the repository at this point in the history
  • Loading branch information
kphoenix137 committed Jan 30, 2025
1 parent ba77325 commit 48b2bd2
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions Source/DiabloUI/multi/selgame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,31 +402,8 @@ void selgame_Diff_Focus(size_t value)
CopyUtf8(selgame_Description, WordWrapString(selgame_Description, DESCRIPTION_WIDTH), sizeof(selgame_Description));
}

bool IsDifficultyAllowed(int value)
{
if (value == 0 || (value == 1 && heroLevel >= 20) || (value == 2 && heroLevel >= 30)) {
return true;
}

selgame_Free();

if (value == 1)
UiSelOkDialog(title, _("Your character must reach level 20 before you can enter a multiplayer game of Nightmare difficulty.").data(), false);
if (value == 2)
UiSelOkDialog(title, _("Your character must reach level 30 before you can enter a multiplayer game of Hell difficulty.").data(), false);

selgame_Init();

return false;
}

void selgame_Diff_Select(size_t value)
{
if (selhero_isMultiPlayer && !IsDifficultyAllowed(vecSelGameDlgItems[value]->m_value)) {
selgame_GameSelection_Select(selgame_selectedGame);
return;
}

nDifficulty = (_difficulty)vecSelGameDlgItems[value]->m_value;

if (!selhero_isMultiPlayer) {
Expand Down Expand Up @@ -589,7 +566,7 @@ void selgame_Password_Init(size_t /*value*/)
static bool IsGameCompatibleWithErrorMessage(const GameData &data)
{
if (IsGameCompatible(data))
return IsDifficultyAllowed(data.nDifficulty);
return true;

selgame_Free();

Expand Down

0 comments on commit 48b2bd2

Please sign in to comment.