Use randomizerMerchantPrices

This commit is contained in:
Garrett Cox 2022-09-02 11:04:45 -05:00
parent 67a890ed1e
commit 32ea5ef564

View File

@ -734,7 +734,7 @@ void Randomizer::LoadShopMessages(const char* spoilerFileName) {
for (int index = 0; index < shopItemRandomizerChecks.size(); ++index) { for (int index = 0; index < shopItemRandomizerChecks.size(); ++index) {
RandomizerCheck shopItemCheck = shopItemRandomizerChecks[index]; RandomizerCheck shopItemCheck = shopItemRandomizerChecks[index];
std::string shopItemName = GetEnumToSpoilerfileName[this->itemLocations[shopItemCheck]]; std::string shopItemName = GetEnumToSpoilerfileName[this->itemLocations[shopItemCheck]];
u16 shopItemPrice = scrubPrices[shopItemCheck]; u16 shopItemPrice = randomizerMerchantPrices[shopItemCheck];
CustomMessageManager::Instance->CreateMessage( CustomMessageManager::Instance->CreateMessage(
Randomizer::shopMessageTableID, index, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE, Randomizer::shopMessageTableID, index, { TEXTBOX_TYPE_BLACK, TEXTBOX_POS_VARIABLE,
"\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02", "\x08%r" + shopItemName + ": " + std::to_string(shopItemPrice) + " Rupees&%wSpecial deal! ONE LEFT!&Get it while it lasts!\x0A\x02",
@ -2299,8 +2299,8 @@ ShopItemIdentity Randomizer::IdentifyShopItem(s32 sceneNum, s32 actorParams) {
break; break;
} }
if (scrubPrices.find(shopItemIdentity.randomizerCheck) != scrubPrices.end()) { if (randomizerMerchantPrices.find(shopItemIdentity.randomizerCheck) != randomizerMerchantPrices.end()) {
shopItemIdentity.itemPrice = scrubPrices[shopItemIdentity.randomizerCheck]; shopItemIdentity.itemPrice = randomizerMerchantPrices[shopItemIdentity.randomizerCheck];
} }
return shopItemIdentity; return shopItemIdentity;