Skip to content

Commit

Permalink
Fix LevelSelectionNavigationController_Setup hook
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-r-elp committed Dec 8, 2022
1 parent 3895c63 commit 6f07824
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,19 @@ MAKE_HOOK_MATCH(MultiplayerLobbyConnectionController_CreateParty, &MultiplayerLo
}

// Show the custom levels tab in multiplayer
// void Setup(::GlobalNamespace::SongPackMask songPackMask, ::GlobalNamespace::BeatmapDifficultyMask allowedBeatmapDifficultyMask,
// ::ArrayW<::GlobalNamespace::BeatmapCharacteristicSO*> notAllowedCharacteristics, bool hidePacksIfOneOrNone, bool hidePracticeButton,
// ::StringW actionButtonText, ::GlobalNamespace::IBeatmapLevelPack* levelPackToBeSelectedAfterPresent,
// ::GlobalNamespace::SelectLevelCategoryViewController::LevelCategory startLevelCategory, bool onlyNotOwned,
// ::GlobalNamespace::IPreviewBeatmapLevel* beatmapLevelToBeSelectedAfterPresent, bool enableCustomLevels);
MAKE_HOOK_MATCH(LevelSelectionNavigationController_Setup, &LevelSelectionNavigationController::Setup, void, LevelSelectionNavigationController* self,
SongPackMask songPackMask, BeatmapDifficultyMask allowedBeatmapDifficultyMask, ::ArrayW<BeatmapCharacteristicSO*> notAllowedCharacteristics,
bool hidePacksIfOneOrNone, bool hidePracticeButton, ::StringW actionButtonText, IBeatmapLevelPack* levelPackToBeSelectedAfterPresent,
SelectLevelCategoryViewController::LevelCategory startLevelCategory, IPreviewBeatmapLevel* beatmapLevelToBeSelectedAfterPresent, bool enableCustomLevels) {
SelectLevelCategoryViewController::LevelCategory startLevelCategory, bool onlyNotOwned, IPreviewBeatmapLevel* beatmapLevelToBeSelectedAfterPresent,
bool enableCustomLevels) {
getLogger().info("LevelSelectionNavigationController_Setup setting custom songs . . .");
LevelSelectionNavigationController_Setup(self, songPackMask, allowedBeatmapDifficultyMask, notAllowedCharacteristics, hidePacksIfOneOrNone, hidePracticeButton,
actionButtonText, levelPackToBeSelectedAfterPresent, startLevelCategory, beatmapLevelToBeSelectedAfterPresent, songPackMask.Contains(getCustomLevelSongPackMaskStr()));
actionButtonText, levelPackToBeSelectedAfterPresent, startLevelCategory, onlyNotOwned, beatmapLevelToBeSelectedAfterPresent, songPackMask.Contains(getCustomLevelSongPackMaskStr()));
}

static bool isMissingLevel = false;
Expand Down

0 comments on commit 6f07824

Please sign in to comment.