From ae5e41f7a06e1decbbe0e3b118d2e257a9021a79 Mon Sep 17 00:00:00 2001 From: Malkierian Date: Fri, 21 Mar 2025 04:32:46 -0700 Subject: [PATCH] Fix Dungeon Spoiling in Trackers (#5168) * Prevent spoiling dungeons in check and item trackers if MQ is set to Selection, but selection for specific dungeon is Random. * Account for other options using "Set Dungeon Quests". --- .../Enhancements/randomizer/randomizer_check_tracker.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp index c51650bbd..62a4793e2 100644 --- a/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp +++ b/soh/soh/Enhancements/randomizer/randomizer_check_tracker.cpp @@ -483,9 +483,13 @@ void CheckTrackerLoadGame(int32_t fileNum) { for (int i = RCAREA_KOKIRI_FOREST; i < RCAREA_INVALID; i++) { if (!IsAreaSpoiled(static_cast(i)) && (RandomizerCheckObjects::AreaIsOverworld(static_cast(i)) || !IS_RANDO || OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_RANDOM) == RO_MQ_DUNGEONS_NONE || - OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_RANDOM) == RO_MQ_DUNGEONS_SELECTION || + (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_RANDOM) == RO_MQ_DUNGEONS_SELECTION && + OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(static_cast(RSK_MQ_DEKU_TREE + (i - RCAREA_DEKU_TREE))) != RO_MQ_SET_RANDOM) || + (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_SET) == RO_GENERIC_ON && + OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(static_cast(RSK_MQ_DEKU_TREE + (i - RCAREA_DEKU_TREE))) != RO_MQ_SET_RANDOM) || (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_RANDOM) == RO_MQ_DUNGEONS_SET_NUMBER && - OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) == 12))) { + (OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) == 12 || + OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_MQ_DUNGEON_COUNT) == 0)))) { SetAreaSpoiled(static_cast(i)); } }