diff --git a/SourceX/DiabloUI/diabloui.cpp b/SourceX/DiabloUI/diabloui.cpp index 5ebbc2b40..43ac52976 100644 --- a/SourceX/DiabloUI/diabloui.cpp +++ b/SourceX/DiabloUI/diabloui.cpp @@ -36,7 +36,7 @@ Art ArtBackground; Art ArtCursor; Art ArtHero; bool gbSpawned; -int heroLevel; +_uiheroinfo *heroInfo; void (*gfnSoundFunction)(char *file); void (*gfnListFocus)(int value); diff --git a/SourceX/DiabloUI/diabloui.h b/SourceX/DiabloUI/diabloui.h index 0d1529d99..893df8b45 100644 --- a/SourceX/DiabloUI/diabloui.h +++ b/SourceX/DiabloUI/diabloui.h @@ -28,7 +28,7 @@ extern Art ArtBackground; extern Art ArtCursor; extern Art ArtHero; extern bool gbSpawned; -extern int heroLevel; +extern _uiheroinfo *heroInfo; constexpr auto MAINMENU_BACKGROUND = UiImage(&ArtBackground, { 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT }); constexpr auto MAINMENU_LOGO = UiImage(&ArtLogos[LOGO_MED], /*animated=*/true, /*frame=*/0, { 0, 0, 0, 0 }, UIS_CENTER); diff --git a/SourceX/DiabloUI/selgame.cpp b/SourceX/DiabloUI/selgame.cpp index 84e48254e..7d5fc3a3e 100644 --- a/SourceX/DiabloUI/selgame.cpp +++ b/SourceX/DiabloUI/selgame.cpp @@ -171,7 +171,7 @@ void selgame_Diff_Focus(int value) bool IsDifficultyAllowed(int value) { - if (value == 0 || (value == 1 && heroLevel >= 20) || (value == 2 && heroLevel >= 30)) { + if (value == 0 || (value == 1 && heroInfo->level >= 20) || (value == 2 && heroInfo->level >= 30)) { return true; } diff --git a/SourceX/DiabloUI/selhero.cpp b/SourceX/DiabloUI/selhero.cpp index 35247854b..43f964fd4 100644 --- a/SourceX/DiabloUI/selhero.cpp +++ b/SourceX/DiabloUI/selhero.cpp @@ -386,7 +386,7 @@ BOOL UiSelHeroDialog( *dlgresult = selhero_result; strcpy(name, selhero_heroInfo.name); - heroLevel = selhero_heroInfo.level; + heroInfo = &selhero_heroInfo; UnloadScrollBar(); return true;