From b3ed24902151115d6a38e58ceebd1ee6567c4611 Mon Sep 17 00:00:00 2001 From: Christopher Leggett Date: Wed, 19 Mar 2025 23:03:42 -0400 Subject: [PATCH] Fix Pot Shuffle crash caused by removal of id check (#5158) * Fix Pot Shuffle crash caused by removal of id check. * Properly unregister ShufflePots Hook --- soh/soh/Enhancements/randomizer/hook_handlers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/soh/soh/Enhancements/randomizer/hook_handlers.cpp b/soh/soh/Enhancements/randomizer/hook_handlers.cpp index a4db9f428..f0baa4c35 100644 --- a/soh/soh/Enhancements/randomizer/hook_handlers.cpp +++ b/soh/soh/Enhancements/randomizer/hook_handlers.cpp @@ -2389,7 +2389,7 @@ void RandomizerRegisterHooks() { GameInteractor::Instance->UnregisterGameHook(fishsanityOnVanillaBehaviorHook); GameInteractor::Instance->UnregisterGameHook(fishsanityOnItemReceiveHook); - GameInteractor::Instance->UnregisterGameHook(shufflePotsOnActorInitHook); + GameInteractor::Instance->UnregisterGameHookForID(shufflePotsOnActorInitHook); GameInteractor::Instance->UnregisterGameHook(shufflePotsOnVanillaBehaviorHook); GameInteractor::Instance->UnregisterGameHook(shuffleFreestandingOnVanillaBehaviorHook); @@ -2465,7 +2465,7 @@ void RandomizerRegisterHooks() { } if (RAND_GET_OPTION(RSK_SHUFFLE_POTS) != RO_SHUFFLE_POTS_OFF) { - shufflePotsOnActorInitHook = GameInteractor::Instance->RegisterGameHook(ObjTsubo_RandomizerInit); + shufflePotsOnActorInitHook = GameInteractor::Instance->RegisterGameHookForID(ACTOR_OBJ_TSUBO, ObjTsubo_RandomizerInit); shufflePotsOnVanillaBehaviorHook = GameInteractor::Instance->RegisterGameHook(ShufflePots_OnVanillaBehaviorHandler); }