Browse Source

Merge 48b2bd2fc9 into 5a08031caf

pull/7687/merge
Eric Robinson 4 days ago committed by GitHub
parent
commit
1a4a0c0733
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 25
      Source/DiabloUI/multi/selgame.cpp

25
Source/DiabloUI/multi/selgame.cpp

@ -428,31 +428,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) {
@ -615,7 +592,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();

Loading…
Cancel
Save