Fix crash on selling big poe (#5733)

* Fix crash on selling big poe

Easiest steps to reproduce: set poe's to 0, put big poe in inventory, trigger text using big poe bottle

I overlooked selling poes with using bottle instead of talking to collector

* disable hint when count zero
This commit is contained in:
Philip Dubé
2025-08-25 19:01:17 +00:00
committed by GitHub
parent 9eafa852b5
commit 3128fb0112
2 changed files with 5 additions and 4 deletions

View File

@@ -1091,7 +1091,8 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
break;
}
case VB_SELL_POES_TO_POE_COLLECTOR: {
if (!Flags_GetRandomizerInf(RAND_INF_10_BIG_POES) && HIGH_SCORE(HS_POE_POINTS) >= 1000) {
if (!Flags_GetRandomizerInf(RAND_INF_10_BIG_POES) && HIGH_SCORE(HS_POE_POINTS) >= 1000 &&
!(GET_PLAYER(gPlayState)->stateFlags1 & PLAYER_STATE1_IN_ITEM_CS)) {
EnGb* enGb = va_arg(args, EnGb*);
enGb->textId = 0x70F8;
Message_ContinueTextbox(gPlayState, enGb->textId);

View File

@@ -2515,10 +2515,10 @@ void Settings::UpdateOptionProperties() {
"setting where you present the loach to the fishing pond owner.");
}
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("CuccosToReturn"), 7) == 0) {
mOptions[RSK_CHICKENS_HINT].Disable("Anju will just give you the item instead with 0 chickens.");
if (CVarGetInteger(CVAR_RANDOMIZER_SETTING("BigPoeTargetCount"), 10) == 0) {
mOptions[RSK_BIG_POES_HINT].Disable("Poe Collector will just give you the item instead with 0 big poes.");
} else {
mOptions[RSK_CHICKENS_HINT].Enable();
mOptions[RSK_BIG_POES_HINT].Enable();
}
}