Fixes ocarina game skull kids to set player->getItemEntry

This commit is contained in:
Christopher Leggett 2022-08-15 22:46:52 -04:00
parent 170b297a7a
commit f8b55ea78c
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79

View File

@ -1536,11 +1536,12 @@ void EnSkj_WonOcarinaMiniGame(EnSkj* this, GlobalContext* globalCtx) {
void EnSkj_WaitToGiveReward(EnSkj* this, GlobalContext* globalCtx) { void EnSkj_WaitToGiveReward(EnSkj* this, GlobalContext* globalCtx) {
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) { if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(globalCtx)) {
func_8002F434(&this->actor, globalCtx, if (gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3) {
gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3 GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE);
? Randomizer_GetItemFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE).getItemId GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 26.0f, 26.0f);
: sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], } else {
26.0f, 26.0f); func_8002F434(&this->actor, globalCtx, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
}
this->actionFunc = EnSkj_GiveOcarinaGameReward; this->actionFunc = EnSkj_GiveOcarinaGameReward;
} }
@ -1551,11 +1552,12 @@ void EnSkj_GiveOcarinaGameReward(EnSkj* this, GlobalContext* globalCtx) {
this->actor.parent = NULL; this->actor.parent = NULL;
this->actionFunc = EnSkj_FinishOcarinaGameRound; this->actionFunc = EnSkj_FinishOcarinaGameRound;
} else { } else {
func_8002F434(&this->actor, globalCtx, if (gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3) {
gSaveContext.n64ddFlag && gSaveContext.ocarinaGameRoundNum != 3 GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE);
? Randomizer_GetItemFromKnownCheck(RC_LW_OCARINA_MEMORY_GAME, GI_HEART_PIECE).getItemId GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 26.0f, 26.0f);
: sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], } else {
26.0f, 26.0f); func_8002F434(&this->actor, globalCtx, sOcarinaGameRewards[gSaveContext.ocarinaGameRoundNum], 26.0f, 26.0f);
}
} }
} }