VBify poe collector giving for rando. (#4458)
* VBify poe collector giving for rando. * Forgot an include. * Further refinement so all the action happens in the handler. Virtual full restoration of vanilla code flow. * Restored 1000 point messages before rando item give. * Cleanup redundant GI Should call.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "z_en_gb.h"
|
||||
#include "objects/object_ps/object_ps.h"
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "soh/Enhancements/game-interactor/GameInteractor_Hooks.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_TARGETABLE | ACTOR_FLAG_FRIENDLY)
|
||||
|
||||
@@ -337,10 +338,7 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
|
||||
Player_UpdateBottleHeld(play, GET_PLAYER(play), ITEM_BOTTLE, PLAYER_IA_BOTTLE);
|
||||
Rupees_ChangeBy(50);
|
||||
HIGH_SCORE(HS_POE_POINTS) += 100;
|
||||
if (
|
||||
(!IS_RANDO && HIGH_SCORE(HS_POE_POINTS) != 1000) ||
|
||||
(IS_RANDO && (HIGH_SCORE(HS_POE_POINTS) != 1000 || Flags_GetRandomizerInf(RAND_INF_10_BIG_POES)))
|
||||
) {
|
||||
if (HIGH_SCORE(HS_POE_POINTS) != 1000) {
|
||||
if (HIGH_SCORE(HS_POE_POINTS) > 1100) {
|
||||
HIGH_SCORE(HS_POE_POINTS) = 1100;
|
||||
}
|
||||
@@ -348,7 +346,6 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
|
||||
} else {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Flags_SetRandomizerInf(RAND_INF_10_BIG_POES);
|
||||
player->exchangeItemId = EXCH_ITEM_NONE;
|
||||
this->textId = 0x70F8;
|
||||
Message_ContinueTextbox(play, this->textId);
|
||||
@@ -359,13 +356,10 @@ void func_80A2FA50(EnGb* this, PlayState* play) {
|
||||
|
||||
void func_80A2FB40(EnGb* this, PlayState* play) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_DONE && Message_ShouldAdvance(play)) {
|
||||
if (!IS_RANDO) {
|
||||
if (GameInteractor_Should(VB_GIVE_ITEM_FROM_POE_COLLECTOR, true, this)) {
|
||||
Actor_OfferGetItem(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
|
||||
GiveItemEntryFromActor(&this->dyna.actor, play, getItemEntry, 100.0f, 10.0f);
|
||||
this->actionFunc = func_80A2FBB0;
|
||||
}
|
||||
this->actionFunc = func_80A2FBB0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -373,13 +367,9 @@ void func_80A2FBB0(EnGb* this, PlayState* play) {
|
||||
if (Actor_HasParent(&this->dyna.actor, play)) {
|
||||
this->dyna.actor.parent = NULL;
|
||||
this->actionFunc = func_80A2FC0C;
|
||||
} else {
|
||||
if (!IS_RANDO) {
|
||||
Actor_OfferGetItem(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
|
||||
} else {
|
||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheck(RC_MARKET_10_BIG_POES, GI_BOTTLE);
|
||||
GiveItemEntryFromActor(&this->dyna.actor, play, getItemEntry, 100.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
else {
|
||||
Actor_OfferGetItem(&this->dyna.actor, play, GI_BOTTLE, 100.0f, 10.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,4 +47,6 @@ typedef struct EnGb {
|
||||
/* 0x0388 */ EnGbCagedSoul cagedSouls[4];
|
||||
} EnGb; // size = 0x0438
|
||||
|
||||
void func_80A2FC0C(EnGb* actor, PlayState* play);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user