Fixes order of operations so Rupees will be spent.

This commit is contained in:
Christopher Leggett 2022-09-06 01:12:11 -04:00
parent 5d38b23850
commit 4d9bf936b1
No known key found for this signature in database
GPG Key ID: 7093AE5FF7037D79
1 changed files with 1 additions and 1 deletions

View File

@ -978,6 +978,7 @@ void EnGirlA_BuyEvent_ObtainBombchuPack(GlobalContext* globalCtx, EnGirlA* this)
void EnGirlA_BuyEvent_Randomizer(GlobalContext* globalCtx, EnGirlA* this) {
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(globalCtx->sceneNum, this->randoSlotIndex);
Flags_SetRandomizerInf(shopItemIdentity.randomizerInf);
Rupees_ChangeBy(-this->basePrice);
if (shopItemIdentity.enGirlAShopItem == -1) {
ShopItemEntry* itemEntry = &shopItemEntries[SI_SOLD_OUT];
this->actor.textId = itemEntry->itemDescTextId;
@ -990,7 +991,6 @@ void EnGirlA_BuyEvent_Randomizer(GlobalContext* globalCtx, EnGirlA* this) {
this->itemCount = itemEntry->count;
this->giDrawId = itemEntry->giDrawId;
}
Rupees_ChangeBy(-this->basePrice);
}
void EnGirlA_Noop(EnGirlA* this, GlobalContext* globalCtx) {