|
|
|
|
@ -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) { |
|
|
|
|
@ -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(); |
|
|
|
|
|
|
|
|
|
|