MCPcopy Create free account
hub / github.com/diasurgical/devilution / IsDifficultyAllowed

Function IsDifficultyAllowed

SourceX/DiabloUI/selgame.cpp:187–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187bool IsDifficultyAllowed(int value)
188{
189 if (value == 0 || (value == 1 && heroLevel >= 20) || (value == 2 && heroLevel >= 30)) {
190 return true;
191 }
192
193 selgame_Free();
194
195 if (value == 1)
196 UiSelOkDialog(title, "Your character must reach level 20 before you can enter a multiplayer game of Nightmare difficulty.", false);
197 if (value == 2)
198 UiSelOkDialog(title, "Your character must reach level 30 before you can enter a multiplayer game of Hell difficulty.", false);
199
200 LoadBackgroundArt("ui_art\\selgame.pcx");
201
202 return false;
203}
204
205void selgame_Diff_Select(int value)
206{

Callers 2

selgame_Diff_SelectFunction · 0.85
selgame_Password_SelectFunction · 0.85

Calls 3

selgame_FreeFunction · 0.85
UiSelOkDialogFunction · 0.85
LoadBackgroundArtFunction · 0.85

Tested by

no test coverage detected