From 62aeac51b9b9d86be0ab5cae1510cecadd0d92ff Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Fri, 26 Aug 2022 22:14:49 -0400 Subject: [PATCH] ACTUALLY fixes adult trade items on save init this time. --- soh/src/code/z_sram.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/soh/src/code/z_sram.c b/soh/src/code/z_sram.c index d53055c93..4bbbe726a 100644 --- a/soh/src/code/z_sram.c +++ b/soh/src/code/z_sram.c @@ -558,7 +558,7 @@ void GiveLinkAdultTradeItem(GetItemID giid) { if (item >= ITEM_POCKET_EGG) { gSaveContext.adultTradeItems |= ADULT_TRADE_FLAG(item); } - INV_CONTENT(item) = item; + INV_CONTENT(ITEM_TRADE_ADULT) = item; } void GiveLinksPocketMedallion() { @@ -788,6 +788,11 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { gSaveContext.eventChkInf[3] |= 0x800; gSaveContext.eventChkInf[12] |= 1; + // shuffle adult trade quest + if (Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) { + gSaveContext.adultTradeItems = 0; + } + // Give Link's pocket item GiveLinksPocketMedallion(); @@ -904,7 +909,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { GiveLinkDekuNutUpgrade(giid); } else if (giid == GI_SKULL_TOKEN) { GiveLinkSkullToken(); - } else if (giid >= GI_POCKET_EGG && giid <= GI_CLAIM_CHECK) { + } else if (giid >= GI_POCKET_EGG && giid <= GI_CLAIM_CHECK || giid == GI_COJIRO) { GiveLinkAdultTradeItem(giid); } else { s32 iid = getItem.itemId; @@ -1022,11 +1027,6 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) { } } - // shuffle adult trade quest - if (Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) { - gSaveContext.adultTradeItems = 0; - } - // complete mask quest if (Randomizer_GetSettingValue(RSK_COMPLETE_MASK_QUEST)) { gSaveContext.itemGetInf[3] |= 0x100; // Sold Keaton Mask