mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-26 19:32:17 -05:00
Rando: Fix being able to get Sun's Song check multiple times (#1185)
This commit is contained in:
parent
0f2e7db8e0
commit
cd37a56161
@ -323,13 +323,9 @@ void func_80ABF708(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void GivePlayerRandoRewardSunSong(EnOkarinaTag* song, GlobalContext* globalCtx, RandomizerCheck check) {
|
void GivePlayerRandoRewardSunSong(EnOkarinaTag* song, GlobalContext* globalCtx, RandomizerCheck check) {
|
||||||
if (song->actor.parent != NULL && song->actor.parent->id == GET_PLAYER(globalCtx)->actor.id &&
|
|
||||||
!Flags_GetTreasure(globalCtx, 0x1F)) {
|
|
||||||
Flags_SetTreasure(globalCtx, 0x1F);
|
Flags_SetTreasure(globalCtx, 0x1F);
|
||||||
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
|
||||||
GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
GetItemID getItemId = Randomizer_GetItemIdFromKnownCheck(check, GI_LETTER_ZELDA);
|
||||||
func_8002F434(&song->actor, globalCtx, getItemId, 10000.0f, 100.0f);
|
func_8002F434(&song->actor, globalCtx, getItemId, 10000.0f, 100.0f);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_80ABF7CC(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
void func_80ABF7CC(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
||||||
@ -338,16 +334,12 @@ void func_80ABF7CC(EnOkarinaTag* this, GlobalContext* globalCtx) {
|
|||||||
|
|
||||||
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
if ((Message_GetState(&globalCtx->msgCtx) == TEXT_STATE_EVENT) && Message_ShouldAdvance(globalCtx)) {
|
||||||
Message_CloseTextbox(globalCtx);
|
Message_CloseTextbox(globalCtx);
|
||||||
if (!gSaveContext.n64ddFlag) {
|
if (!gSaveContext.n64ddFlag && !CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
|
||||||
if (!CHECK_QUEST_ITEM(QUEST_SONG_SUN)) {
|
|
||||||
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gSunSongGraveSunSongTeachCs);
|
globalCtx->csCtx.segment = SEGMENTED_TO_VIRTUAL(&gSunSongGraveSunSongTeachCs);
|
||||||
gSaveContext.cutsceneTrigger = 1;
|
gSaveContext.cutsceneTrigger = 1;
|
||||||
}
|
} else if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
||||||
} else {
|
|
||||||
if (!Flags_GetTreasure(globalCtx, 0x1F)) {
|
|
||||||
GivePlayerRandoRewardSunSong(this, globalCtx, RC_SONG_FROM_ROYAL_FAMILYS_TOMB);
|
GivePlayerRandoRewardSunSong(this, globalCtx, RC_SONG_FROM_ROYAL_FAMILYS_TOMB);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
this->actionFunc = func_80ABF708;
|
this->actionFunc = func_80ABF708;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user