Fix bean salesman bug (#4410)

This commit is contained in:
Garrett Cox 2024-10-15 02:11:33 +00:00 committed by GitHub
parent 4dbb86e980
commit eafe15ddf2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -554,18 +554,6 @@ void CheckTrackerTransition(uint32_t sceneNum) {
}
}
void CheckTrackerFrame() {
if (!GameInteractor::IsSaveLoaded()) {
return;
}
// TODO: Move to OnAmmoChange hook once it gets added.
if (!OTRGlobals::Instance->gRandoContext->GetItemLocation(RC_ZR_MAGIC_BEAN_SALESMAN)->HasObtained()) {
if (BEANS_BOUGHT >= 10) {
SetCheckCollected(RC_ZR_MAGIC_BEAN_SALESMAN);
}
}
}
void CheckTrackerItemReceive(GetItemEntry giEntry) {
if (!GameInteractor::IsSaveLoaded() || vector_contains_scene(skipScenes, gPlayState->sceneNum)) {
return;
@ -1738,7 +1726,6 @@ void CheckTrackerWindow::InitElement() {
Teardown();
});
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnItemReceive>(CheckTrackerItemReceive);
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnGameFrameUpdate>(CheckTrackerFrame);
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnTransitionEnd>(CheckTrackerTransition);
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnShopSlotChange>(CheckTrackerShopSlotChange);
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneFlagSet>(CheckTrackerSceneFlagSet);