From d0627dc73706305fa527ee112c8c6b77666f5319 Mon Sep 17 00:00:00 2001 From: Pepper0ni <93387759+Pepper0ni@users.noreply.github.com> Date: Mon, 6 May 2024 20:10:00 +0100 Subject: [PATCH] fix a V2 compatibility crash (#4119) * Attempt to fix ambiguity issues and a V2 compatibility crash * oops * remove explicit call as it is fixed elsewhere --- soh/soh/SaveManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/soh/soh/SaveManager.cpp b/soh/soh/SaveManager.cpp index 0aaf32e7c..50d77917e 100644 --- a/soh/soh/SaveManager.cpp +++ b/soh/soh/SaveManager.cpp @@ -102,7 +102,7 @@ std::vector Rando::StaticData::oldVerHintOrder { RH_ZR_OPEN_GROTTO_GOSSIP_STONE, }; -uint16_t Rando::StaticData::oldVerGossipStoneStart = 740; +uint16_t Rando::StaticData::oldVerGossipStoneStart = 706; SaveManager::SaveManager() { coreSectionIDsByName["base"] = SECTION_ID_BASE; @@ -188,7 +188,7 @@ void SaveManager::LoadRandomizerVersion1() { for (int j = 0; j < ARRAY_COUNT(hintText); j++) { SaveManager::Instance->LoadData("ht" + std::to_string(i) + "-" + std::to_string(j), hintText[j]); } - RandomizerHint stoneHint = Rando::StaticData::oldVerHintOrder[Rando::StaticData::oldVerGossipStoneStart]; + RandomizerHint stoneHint = Rando::StaticData::oldVerHintOrder[i - Rando::StaticData::oldVerGossipStoneStart]; randoContext->AddHint(stoneHint, Rando::Hint(stoneHint, {CustomMessage(hintText)})); } @@ -294,7 +294,7 @@ void SaveManager::LoadRandomizerVersion2() { if (rc != RC_UNKNOWN_CHECK) { std::string hintText; SaveManager::Instance->LoadData("hintText", hintText); - RandomizerHint stoneHint = Rando::StaticData::oldVerHintOrder[Rando::StaticData::oldVerGossipStoneStart]; + RandomizerHint stoneHint = Rando::StaticData::oldVerHintOrder[rc - Rando::StaticData::oldVerGossipStoneStart]; randoContext->AddHint(stoneHint, Rando::Hint(stoneHint, {CustomMessage(hintText)})); } });