diff --git a/soh/soh/Enhancements/game-interactor/GameInteractor.h b/soh/soh/Enhancements/game-interactor/GameInteractor.h index 9f3625d4c..f227411b9 100644 --- a/soh/soh/Enhancements/game-interactor/GameInteractor.h +++ b/soh/soh/Enhancements/game-interactor/GameInteractor.h @@ -488,8 +488,6 @@ typedef enum { VB_TRADE_TIMER_ODD_MUSHROOM, VB_TRADE_TIMER_FROG, VB_TRADE_TIMER_EYEDROPS, - // Opt: *EnNiwLady - VB_ANJU_SET_OBTAINED_TRADE_ITEM, /*** Fixes ***/ // Vanilla condition: false diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index 80cd8dea8..409fa45d1 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -66,6 +66,7 @@ extern void Player_SetupActionPreserveAnimMovement(PlayState* play, Player* play extern s32 Player_SetupWaitForPutAway(PlayState* play, Player* player, AfterPutAwayFunc func); extern void Play_InitEnvironment(PlayState * play, s16 skyboxId); extern void EnMk_Wait(EnMk* enMk, PlayState* play); +extern void func_80ABA778(EnNiwLady* enNiwLady, PlayState* play); } #define RAND_GET_OPTION(option) Rando::Context::GetInstance()->GetOption(option).GetContextOptionIndex() @@ -1082,7 +1083,9 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l break; } case VB_GIVE_ITEM_FROM_ANJU_AS_ADULT: { + EnNiwLady* enNiwLady = va_arg(args, EnNiwLady*); Flags_SetItemGetInf(ITEMGETINF_2C); + enNiwLady->actionFunc = func_80ABA778; *should = false; break; } @@ -1171,9 +1174,12 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l break; } case VB_TRADE_POCKET_CUCCO: { + EnNiwLady* enNiwLady = va_arg(args, EnNiwLady*); Randomizer_ConsumeAdultTradeItem(gPlayState, ITEM_POCKET_CUCCO); // Trigger the reward now Flags_SetItemGetInf(ITEMGETINF_2E); + enNiwLady->actionFunc = func_80ABA778; + *should = false; break; } @@ -1628,7 +1634,6 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l case VB_FREEZE_ON_SKULL_TOKEN: case VB_TRADE_TIMER_ODD_MUSHROOM: case VB_TRADE_TIMER_FROG: - case VB_ANJU_SET_OBTAINED_TRADE_ITEM: case VB_GIVE_ITEM_FROM_TARGET_IN_WOODS: case VB_GIVE_ITEM_FROM_TALONS_CHICKENS: case VB_GIVE_ITEM_FROM_DIVING_MINIGAME: diff --git a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c index 63d4104de..31d5230ae 100644 --- a/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c +++ b/soh/src/overlays/actors/ovl_En_Niw_Lady/z_en_niw_lady.c @@ -410,10 +410,6 @@ void func_80ABA9B8(EnNiwLady* this, PlayState* play) { if (GameInteractor_Should(VB_GIVE_ITEM_FROM_ANJU_AS_ADULT, true, this)) { Actor_OfferGetItem(&this->actor, play, GI_POCKET_EGG, 200.0f, 100.0f); this->actionFunc = func_80ABAC00; - } else { - // Circumvent the item offer action - this->actionFunc = func_80ABAC84; - return; } break; @@ -445,10 +441,6 @@ void func_80ABAB08(EnNiwLady* this, PlayState* play) { if (GameInteractor_Should(VB_TRADE_POCKET_CUCCO, true, this)) { Actor_OfferGetItem(&this->actor, play, GI_COJIRO, 200.0f, 100.0f); this->actionFunc = func_80ABAC00; - } else { - // Circumvent the item offer action - this->actionFunc = func_80ABAC84; - return; } break; case 1: @@ -484,12 +476,10 @@ void func_80ABAC84(EnNiwLady* this, PlayState* play) { } osSyncPrintf(VT_FGCOL(GREEN) "☆☆☆☆☆ 正常終了 ☆☆☆☆☆ \n" VT_RST); if (LINK_IS_ADULT) { - if (GameInteractor_Should(VB_ANJU_SET_OBTAINED_TRADE_ITEM, true, this)) { - if (!Flags_GetItemGetInf(ITEMGETINF_2C)) { - Flags_SetItemGetInf(ITEMGETINF_2C); - } else { - Flags_SetItemGetInf(ITEMGETINF_2E); - } + if (!Flags_GetItemGetInf(ITEMGETINF_2C)) { + Flags_SetItemGetInf(ITEMGETINF_2C); + } else { + Flags_SetItemGetInf(ITEMGETINF_2E); } this->actionFunc = func_80ABA778; } else {