From 5421ad27c99699597baca039cc1d0e570d18ebaa Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Sat, 3 Sep 2022 09:24:37 -0400 Subject: [PATCH] Rando-next: Deku Nut and Seed ammo gives a blue rupee Fixes #1390 --- soh/soh/OTRGlobals.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/soh/soh/OTRGlobals.cpp b/soh/soh/OTRGlobals.cpp index 2781d6a6e..b70533a77 100644 --- a/soh/soh/OTRGlobals.cpp +++ b/soh/soh/OTRGlobals.cpp @@ -1637,6 +1637,10 @@ extern "C" GetItemEntry ItemTable_RetrieveEntry(s16 tableID, s16 getItemID) { extern "C" GetItemEntry Randomizer_GetItemFromActor(s16 actorId, s16 sceneNum, s16 actorParams, GetItemID ogId) { s16 getItemModIndex; RandomizerCheck randomizerCheck = OTRGlobals::Instance->gRandomizer->GetCheckFromActor(actorId, sceneNum, actorParams); + // if we got unknown check here, we don't need to do anything else, just return the ogId. + if (randomizerCheck == RC_UNKNOWN_CHECK) { + return ItemTable_RetrieveEntry(MOD_NONE, ogId); + } if (OTRGlobals::Instance->gRandomizer->CheckContainsVanillaItem(randomizerCheck)) { getItemModIndex = MOD_NONE; } else { @@ -1653,6 +1657,11 @@ extern "C" GetItemEntry Randomizer_GetItemFromActor(s16 actorId, s16 sceneNum, s extern "C" GetItemEntry Randomizer_GetItemFromKnownCheck(RandomizerCheck randomizerCheck, GetItemID ogId) { s16 getItemModIndex; + + // if we got unknown check here, we don't need to do anything else, just return the ogId. + if (randomizerCheck == RC_UNKNOWN_CHECK) { + return ItemTable_RetrieveEntry(MOD_NONE, ogId); + } if (OTRGlobals::Instance->gRandomizer->CheckContainsVanillaItem(randomizerCheck)) { getItemModIndex = MOD_NONE; } else {