mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-26 01:58:51 -05:00
Makes merchant prices array size not depend on Rando Setting Values (#1860)
This commit is contained in:
parent
4adfb93b48
commit
a9f73ee641
@ -177,12 +177,7 @@ void SaveManager::LoadRandomizerVersion2() {
|
||||
std::shared_ptr<Randomizer> randomizer = OTRGlobals::Instance->gRandomizer;
|
||||
|
||||
size_t merchantPricesSize = 0;
|
||||
if (randomizer->GetRandoSettingValue(RSK_SHUFFLE_SCRUBS) > 0) {
|
||||
merchantPricesSize += NUM_SCRUBS;
|
||||
}
|
||||
if (randomizer->GetRandoSettingValue(RSK_SHOPSANITY) > 0) {
|
||||
merchantPricesSize += NUM_SHOP_ITEMS;
|
||||
}
|
||||
SaveManager::Instance->LoadData("merchantPricesSize", merchantPricesSize);
|
||||
|
||||
SaveManager::Instance->LoadArray("merchantPrices", merchantPricesSize, [&](size_t i) {
|
||||
SaveManager::Instance->LoadStruct("", [&]() {
|
||||
@ -247,6 +242,7 @@ void SaveManager::SaveRandomizer() {
|
||||
merchantPrices.push_back(std::make_pair(check, price));
|
||||
}
|
||||
|
||||
SaveManager::Instance->SaveData("merchantPricesSize", merchantPrices.size());
|
||||
SaveManager::Instance->SaveArray("merchantPrices", merchantPrices.size(), [&](size_t i) {
|
||||
SaveManager::Instance->SaveStruct("", [&]() {
|
||||
SaveManager::Instance->SaveData("check", merchantPrices[i].first);
|
||||
|
Loading…
Reference in New Issue
Block a user