Fix some issues with ice traps

This commit is contained in:
Garrett Cox 2022-09-12 23:45:22 -05:00
parent cda28c402a
commit 098407487a
2 changed files with 8 additions and 2 deletions

View File

@ -431,7 +431,12 @@ void Randomizer::LoadMerchantMessages(const char* spoilerFileName) {
for (int index = 0; index < shopItemRandomizerChecks.size(); ++index) {
RandomizerCheck shopItemCheck = shopItemRandomizerChecks[index];
std::vector<std::string> shopItemName = EnumToSpoilerfileGetName[this->itemLocations[shopItemCheck]];
RandomizerGet shopItemGet = this->itemLocations[shopItemCheck];
// TODO: This should eventually be replaced with a full fledged trick model & trick name system
if (shopItemGet == RG_ICE_TRAP) {
shopItemGet = RG_HUGE_RUPEE;
}
std::vector<std::string> shopItemName = EnumToSpoilerfileGetName[shopItemGet];
u16 shopItemPrice = merchantPrices[shopItemCheck];
// TODO: Magic number 100, we don't to overwrite deku scrub messages
CustomMessageManager::Instance->CreateMessage(

View File

@ -1705,8 +1705,9 @@ void EnOssan_State_GiveItemWithFanfare(EnOssan* this, GlobalContext* globalCtx,
void EnOssan_State_ItemPurchased(EnOssan* this, GlobalContext* globalCtx, Player* player) {
EnGirlA* item;
EnGirlA* itemTemp;
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->cursorIndex);
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx) || (gSaveContext.n64ddFlag && Randomizer_ItemIsIceTrap(shopItemIdentity.randomizerCheck, GI_NONE))) {
if (this->actor.params == OSSAN_TYPE_MASK) {
itemTemp = this->shelfSlots[this->cursorIndex];
EnOssan_ResetItemPosition(this);