Fix for a single zeroed merchantPrice entry

This commit is contained in:
Garrett Cox 2022-09-05 22:30:39 -05:00
parent 0ab4f21382
commit c9c648322d

View File

@ -94,7 +94,13 @@ void SaveManager::LoadRandomizerVersion1() {
std::shared_ptr<Randomizer> randomizer = OTRGlobals::Instance->gRandomizer; std::shared_ptr<Randomizer> randomizer = OTRGlobals::Instance->gRandomizer;
SaveManager::Instance->LoadArray("merchantPrices", NUM_SCRUBS, [&](size_t i) { size_t merchantPricesSize = 0;
if (randomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) > 0) {
merchantPricesSize += NUM_SCRUBS;
}
// TODO: Add shop item count when shopsanity is enabled
SaveManager::Instance->LoadArray("merchantPrices", merchantPricesSize, [&](size_t i) {
SaveManager::Instance->LoadStruct("", [&]() { SaveManager::Instance->LoadStruct("", [&]() {
RandomizerCheck rc; RandomizerCheck rc;
SaveManager::Instance->LoadData("check", rc); SaveManager::Instance->LoadData("check", rc);