Fixes Anju to set player->getItemEntry.

This commit is contained in:
Christopher Leggett 2022-08-15 23:28:08 -04:00
parent d06b17f871
commit 5d01a71797
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79
2 changed files with 11 additions and 7 deletions

View File

@ -88,6 +88,7 @@ void EnNiwLady_Init(Actor* thisx, GlobalContext* globalCtx) {
osSyncPrintf("\n\n");
this->actionFunc = func_80AB9F24;
thisx->uncullZoneForward = 600.0f;
this->getItemEntry = (GetItemEntry)GET_ITEM_NONE;
}
void EnNiwLady_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@ -308,9 +309,8 @@ void func_80ABA654(EnNiwLady* this, GlobalContext* globalCtx) {
this->getItemId = GI_BOTTLE;
func_8002F434(&this->actor, globalCtx, GI_BOTTLE, 100.0f, 50.0f);
} else {
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_CHILD, GI_BOTTLE);
this->getItemId = getItemEntry.getItemId;
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 100.0f, 50.0f);
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_CHILD, GI_BOTTLE);
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, 100.0f, 50.0f);
}
this->actionFunc = func_80ABAC00;
@ -399,8 +399,8 @@ void func_80ABA9B8(EnNiwLady* this, GlobalContext* globalCtx) {
func_8002F434(&this->actor, globalCtx, GI_POCKET_EGG, 200.0f, 100.0f);
} else {
// TODO: get-item-rework Adult trade sequence
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG);
GiveItemEntryFromActor(&this->actor, globalCtx, getItemEntry, 200.0f, 100.0f);
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG);
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, 200.0f, 100.0f);
}
this->actionFunc = func_80ABAC00;
@ -458,10 +458,13 @@ void func_80ABAC00(EnNiwLady* this, GlobalContext* globalCtx) {
if (gSaveContext.n64ddFlag && getItemId == GI_POCKET_EGG) {
// TODO: get-item-rework Adult trade sequence
getItemId = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG).getItemId;
this->getItemEntry = Randomizer_GetItemFromKnownCheck(RC_KAK_ANJU_AS_ADULT, GI_POCKET_EGG);
GiveItemEntryFromActor(&this->actor, globalCtx, this->getItemEntry, 200.0f, 100.0f);
}
}
func_8002F434(&this->actor, globalCtx, getItemId, 200.0f, 100.0f);
if (this->getItemEntry.getItemId == GI_NONE) {
func_8002F434(&this->actor, globalCtx, getItemId, 200.0f, 100.0f);
}
}
}

View File

@ -40,6 +40,7 @@ typedef struct EnNiwLady {
/* 0x0284 */ s32 getItemId;
/* 0x0288 */ struct_80034A14_arg1 unk_288;
/* 0x02B0 */ ColliderCylinder collider;
/* 0x02FC */ GetItemEntry getItemEntry;
} EnNiwLady; // size = 0x02FC
#endif