mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 12:38:55 -04:00
Fix problems with Zelda's Letter & Weird Egg hatching (#6962)
This commit is contained in:
@@ -6,8 +6,6 @@
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#include "soh/ResourceManagerHelpers.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
#include "soh/Enhancements/savestate_serialize.h"
|
||||
|
||||
typedef enum {
|
||||
@@ -2097,9 +2095,8 @@ void func_80075B44(PlayState* play) {
|
||||
gSaveContext.bgsDayCount++;
|
||||
gSaveContext.dogIsLost = true;
|
||||
Sfx_PlaySfxCentered(NA_SE_EV_CHICKEN_CRY_M);
|
||||
if ((Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN) || Inventory_HatchPocketCucco(play)) &&
|
||||
play->csCtx.state == 0 && !Player_InCsMode(play)) {
|
||||
GameInteractor_ExecuteOnCuccoOrChickenHatch();
|
||||
if ((Inventory_HatchWeirdEgg(play) || Inventory_HatchPocketCucco(play)) && play->csCtx.state == 0 &&
|
||||
!Player_InCsMode(play)) {
|
||||
Message_StartTextbox(play, 0x3066, NULL);
|
||||
}
|
||||
play->envCtx.unk_E0++;
|
||||
|
||||
@@ -2721,6 +2721,23 @@ s32 Inventory_ConsumeFairy(PlayState* play) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// SOH helper
|
||||
bool Inventory_HatchWeirdEgg(PlayState* play) {
|
||||
if (!IS_RANDO) {
|
||||
return Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN);
|
||||
}
|
||||
|
||||
if (!LINK_IS_CHILD || !Flags_GetRandomizerInf(RAND_INF_CHILD_TRADES_HAS_WEIRD_EGG)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Flags_UnsetRandomizerInf(RAND_INF_CHILD_TRADES_HAS_WEIRD_EGG);
|
||||
Flags_SetRandomizerInf(RAND_INF_CHILD_TRADES_HAS_CHICKEN);
|
||||
Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN);
|
||||
return 1;
|
||||
}
|
||||
|
||||
// SOH helper
|
||||
bool Inventory_HatchPocketCucco(PlayState* play) {
|
||||
if (!IS_RANDO) {
|
||||
return Inventory_ReplaceItem(play, ITEM_POCKET_EGG, ITEM_POCKET_CUCCO);
|
||||
|
||||
@@ -500,8 +500,7 @@ void Play_Init(GameState* thisx) {
|
||||
gSaveContext.bgsDayCount++;
|
||||
gSaveContext.dogIsLost = true;
|
||||
|
||||
if (Inventory_ReplaceItem(play, ITEM_WEIRD_EGG, ITEM_CHICKEN) || Inventory_HatchPocketCucco(play)) {
|
||||
GameInteractor_ExecuteOnCuccoOrChickenHatch();
|
||||
if (Inventory_HatchWeirdEgg(play) || Inventory_HatchPocketCucco(play)) {
|
||||
Message_StartTextbox(play, 0x3066, NULL);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user