ACTUALLY fixes adult trade items on save init this time.

This commit is contained in:
Christopher Leggett 2022-08-26 22:14:49 -04:00
parent 9f47099232
commit 62aeac51b9
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79

View File

@ -558,7 +558,7 @@ void GiveLinkAdultTradeItem(GetItemID giid) {
if (item >= ITEM_POCKET_EGG) { if (item >= ITEM_POCKET_EGG) {
gSaveContext.adultTradeItems |= ADULT_TRADE_FLAG(item); gSaveContext.adultTradeItems |= ADULT_TRADE_FLAG(item);
} }
INV_CONTENT(item) = item; INV_CONTENT(ITEM_TRADE_ADULT) = item;
} }
void GiveLinksPocketMedallion() { void GiveLinksPocketMedallion() {
@ -788,6 +788,11 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
gSaveContext.eventChkInf[3] |= 0x800; gSaveContext.eventChkInf[3] |= 0x800;
gSaveContext.eventChkInf[12] |= 1; gSaveContext.eventChkInf[12] |= 1;
// shuffle adult trade quest
if (Randomizer_GetSettingValue(RSK_SHUFFLE_ADULT_TRADE)) {
gSaveContext.adultTradeItems = 0;
}
// Give Link's pocket item // Give Link's pocket item
GiveLinksPocketMedallion(); GiveLinksPocketMedallion();
@ -904,7 +909,7 @@ void Sram_InitSave(FileChooseContext* fileChooseCtx) {
GiveLinkDekuNutUpgrade(giid); GiveLinkDekuNutUpgrade(giid);
} else if (giid == GI_SKULL_TOKEN) { } else if (giid == GI_SKULL_TOKEN) {
GiveLinkSkullToken(); 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); GiveLinkAdultTradeItem(giid);
} else { } else {
s32 iid = getItem.itemId; 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 // complete mask quest
if (Randomizer_GetSettingValue(RSK_COMPLETE_MASK_QUEST)) { if (Randomizer_GetSettingValue(RSK_COMPLETE_MASK_QUEST)) {
gSaveContext.itemGetInf[3] |= 0x100; // Sold Keaton Mask gSaveContext.itemGetInf[3] |= 0x100; // Sold Keaton Mask