From 95918e0cb28014c2a8bffdfc62e7f61aaba204b7 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Tue, 9 Aug 2022 01:42:47 -0400 Subject: [PATCH 1/4] Fixes skulltula messages for custom items. --- soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index 944a628507..7f44e78cd8 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -114,6 +114,7 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { if ((CVar_GetS32("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) && getItemId != GI_ICE_TRAP) { player->actor.freezeTimer = 20; } + player->getItemId = getItemId; Message_StartTextbox(globalCtx, textId, NULL); if (gSaveContext.n64ddFlag) { From 6f7b38539b26d5953169bf0bd5f612dfff4b498e Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Tue, 9 Aug 2022 01:56:47 -0400 Subject: [PATCH 2/4] Moves setting of getItemId into a rando save if block. --- soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index 7f44e78cd8..1ea5caec5e 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -108,13 +108,13 @@ void func_80AFB768(EnSi* this, GlobalContext* globalCtx) { giveItemId = sGetItemTable[getItemId - 1].itemId; Item_Give(globalCtx, giveItemId); } + player->getItemId = getItemId; } else { Item_Give(globalCtx, giveItemId); } if ((CVar_GetS32("gSkulltulaFreeze", 0) != 1 || giveItemId != ITEM_SKULL_TOKEN) && getItemId != GI_ICE_TRAP) { player->actor.freezeTimer = 20; } - player->getItemId = getItemId; Message_StartTextbox(globalCtx, textId, NULL); if (gSaveContext.n64ddFlag) { From 20bbf85f003eb7eceff68fb4e587368e891f6cad Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Tue, 9 Aug 2022 07:26:17 -0400 Subject: [PATCH 3/4] Sets player getItemId before other messagebox instance. --- soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 1 + 1 file changed, 1 insertion(+) diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index 1ea5caec5e..fd88ff8131 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -154,6 +154,7 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { } else { Item_Give(globalCtx, giveItemId); } + player->getItemId = getItemId; Message_StartTextbox(globalCtx, textId, NULL); if (gSaveContext.n64ddFlag) { Audio_PlayFanfare_Rando(getItemId); From 7a5acb0a2a67f426feb547990fb36d823268599a Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Tue, 9 Aug 2022 08:36:20 -0400 Subject: [PATCH 4/4] Fixes placement --- soh/src/overlays/actors/ovl_En_Si/z_en_si.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c index fd88ff8131..73a29bf0bc 100644 --- a/soh/src/overlays/actors/ovl_En_Si/z_en_si.c +++ b/soh/src/overlays/actors/ovl_En_Si/z_en_si.c @@ -151,10 +151,10 @@ void func_80AFB89C(EnSi* this, GlobalContext* globalCtx) { giveItemId = sGetItemTable[getItemId - 1].itemId; Item_Give(globalCtx, giveItemId); } + player->getItemId = getItemId; } else { Item_Give(globalCtx, giveItemId); } - player->getItemId = getItemId; Message_StartTextbox(globalCtx, textId, NULL); if (gSaveContext.n64ddFlag) { Audio_PlayFanfare_Rando(getItemId);