mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-19 13:00:11 -07:00
Don't autosave immediately after purchasing from a shop (#2079)
This commit is contained in:
parent
8c23bcd67c
commit
26ec69606a
11 changed files with 71 additions and 25 deletions
|
@ -245,6 +245,7 @@ typedef struct {
|
||||||
/* 0x1420 */ s16 worldMapArea;
|
/* 0x1420 */ s16 worldMapArea;
|
||||||
/* 0x1422 */ s16 sunsSongState; // controls the effects of suns song
|
/* 0x1422 */ s16 sunsSongState; // controls the effects of suns song
|
||||||
/* 0x1424 */ s16 healthAccumulator;
|
/* 0x1424 */ s16 healthAccumulator;
|
||||||
|
/* 0x1426 */ u16 pendingSale;
|
||||||
// #region SOH [General]
|
// #region SOH [General]
|
||||||
// Upstream TODO: Move these to their own struct or name to more obviously specific to SoH
|
// Upstream TODO: Move these to their own struct or name to more obviously specific to SoH
|
||||||
/* */ uint32_t isMasterQuest;
|
/* */ uint32_t isMasterQuest;
|
||||||
|
|
|
@ -542,6 +542,7 @@ void SaveManager::InitFileNormal() {
|
||||||
gSaveContext.magicLevel = 0;
|
gSaveContext.magicLevel = 0;
|
||||||
gSaveContext.infTable[29] = 1;
|
gSaveContext.infTable[29] = 1;
|
||||||
gSaveContext.sceneFlags[5].swch = 0x40000000;
|
gSaveContext.sceneFlags[5].swch = 0x40000000;
|
||||||
|
gSaveContext.pendingSale = ITEM_NONE;
|
||||||
//RANDOTODO (ADD ITEMLOCATIONS TO GSAVECONTEXT)
|
//RANDOTODO (ADD ITEMLOCATIONS TO GSAVECONTEXT)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2715,8 +2715,9 @@ u8 Item_CheckObtainability(u8 item) {
|
||||||
return gSaveContext.inventory.items[slot];
|
return gSaveContext.inventory.items[slot];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save when receiving an item, unless it's purchased from a shop
|
||||||
void PerformAutosave(PlayState* play, u8 item) {
|
void PerformAutosave(PlayState* play, u8 item) {
|
||||||
if (CVar_GetS32("gAutosave", 0) && (play && play->sceneNum != SCENE_KENJYANOMA)) {
|
if (CVar_GetS32("gAutosave", 0) && (play != NULL) && (play->sceneNum != SCENE_KENJYANOMA) && (gSaveContext.pendingSale == ITEM_NONE)) {
|
||||||
if (CVar_GetS32("gAutosaveAllItems", 0)) {
|
if (CVar_GetS32("gAutosaveAllItems", 0)) {
|
||||||
Play_PerformSave(play);
|
Play_PerformSave(play);
|
||||||
} else if (CVar_GetS32("gAutosaveMajorItems", 1)) {
|
} else if (CVar_GetS32("gAutosaveMajorItems", 1)) {
|
||||||
|
@ -6301,6 +6302,11 @@ void Interface_Update(PlayState* play) {
|
||||||
gSaveContext.rupees--;
|
gSaveContext.rupees--;
|
||||||
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
Audio_PlaySoundGeneral(NA_SE_SY_RUPY_COUNT, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E8);
|
||||||
}
|
}
|
||||||
|
if (gSaveContext.rupeeAccumulator == 0) {
|
||||||
|
u16 tempSaleItem = gSaveContext.pendingSale;
|
||||||
|
gSaveContext.pendingSale = ITEM_NONE;
|
||||||
|
PerformAutosave(play, tempSaleItem);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
gSaveContext.rupeeAccumulator = 0;
|
gSaveContext.rupeeAccumulator = 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -401,24 +401,28 @@ void EnDns_Talk(EnDns* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void func_809EFDD0(EnDns* this, PlayState* play) {
|
void func_809EFDD0(EnDns* this, PlayState* play) {
|
||||||
|
u16 pendingGetItemId;
|
||||||
if (!gSaveContext.n64ddFlag || !this->scrubIdentity.isShuffled) {
|
if (!gSaveContext.n64ddFlag || !this->scrubIdentity.isShuffled) {
|
||||||
if (this->actor.params == 0x9) {
|
if (this->actor.params == 0x9) {
|
||||||
if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
|
if (CUR_UPG_VALUE(UPG_STICKS) < 2) {
|
||||||
func_8002F434(&this->actor, play, GI_STICK_UPGRADE_20, 130.0f, 100.0f);
|
pendingGetItemId = GI_STICK_UPGRADE_20;
|
||||||
} else {
|
} else {
|
||||||
func_8002F434(&this->actor, play, GI_STICK_UPGRADE_30, 130.0f, 100.0f);
|
pendingGetItemId = GI_STICK_UPGRADE_30;
|
||||||
}
|
}
|
||||||
} else if (this->actor.params == 0xA) {
|
} else if (this->actor.params == 0xA) {
|
||||||
if (CUR_UPG_VALUE(UPG_NUTS) < 2) {
|
if (CUR_UPG_VALUE(UPG_NUTS) < 2) {
|
||||||
func_8002F434(&this->actor, play, GI_NUT_UPGRADE_30, 130.0f, 100.0f);
|
pendingGetItemId = GI_NUT_UPGRADE_30;
|
||||||
} else {
|
} else {
|
||||||
func_8002F434(&this->actor, play, GI_NUT_UPGRADE_40, 130.0f, 100.0f);
|
pendingGetItemId = GI_NUT_UPGRADE_40;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
func_8002F434(&this->actor, play, this->dnsItemEntry->getItemId, 130.0f, 100.0f);
|
pendingGetItemId = this->dnsItemEntry->getItemId;
|
||||||
}
|
}
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(pendingGetItemId).itemId;
|
||||||
|
func_8002F434(&this->actor, play, pendingGetItemId, 130.0f, 100.0f);
|
||||||
} else {
|
} else {
|
||||||
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(this->scrubIdentity.randomizerCheck, this->scrubIdentity.getItemId);
|
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(this->scrubIdentity.randomizerCheck, this->scrubIdentity.getItemId);
|
||||||
|
gSaveContext.pendingSale = itemEntry.itemId;
|
||||||
GiveItemEntryFromActor(&this->actor, play, itemEntry, 130.0f, 100.0f);
|
GiveItemEntryFromActor(&this->actor, play, itemEntry, 130.0f, 100.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,6 +205,7 @@ void EnDs_OfferBluePotion(EnDs* this, PlayState* play) {
|
||||||
case 2: // have 100 rupees and empty bottle
|
case 2: // have 100 rupees and empty bottle
|
||||||
Rupees_ChangeBy(-100);
|
Rupees_ChangeBy(-100);
|
||||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(GI_POTION_BLUE).itemId;
|
||||||
func_8002F434(&this->actor, play, GI_POTION_BLUE, 10000.0f, 50.0f);
|
func_8002F434(&this->actor, play, GI_POTION_BLUE, 10000.0f, 50.0f);
|
||||||
this->actionFunc = EnDs_GiveBluePotion;
|
this->actionFunc = EnDs_GiveBluePotion;
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -794,11 +794,13 @@ s32 EnGirlA_CanBuy_Randomizer(PlayState* play, EnGirlA* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_Arrows(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_Arrows(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Inventory_ChangeAmmo(ITEM_BOW, this->itemCount);
|
Inventory_ChangeAmmo(ITEM_BOW, this->itemCount);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_Bombs(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_Bombs(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
switch (this->itemCount) {
|
switch (this->itemCount) {
|
||||||
case 5:
|
case 5:
|
||||||
Item_Give(play, ITEM_BOMBS_5);
|
Item_Give(play, ITEM_BOMBS_5);
|
||||||
|
@ -817,6 +819,7 @@ void EnGirlA_ItemGive_Bombs(PlayState* play, EnGirlA* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_DekuNuts(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_DekuNuts(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
switch (this->itemCount) {
|
switch (this->itemCount) {
|
||||||
case 5:
|
case 5:
|
||||||
Item_Give(play, ITEM_NUTS_5);
|
Item_Give(play, ITEM_NUTS_5);
|
||||||
|
@ -829,65 +832,78 @@ void EnGirlA_ItemGive_DekuNuts(PlayState* play, EnGirlA* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_DekuSticks(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_DekuSticks(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_STICK);
|
Item_Give(play, ITEM_STICK);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_Longsword(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_Longsword(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
func_800849EC(play);
|
func_800849EC(play);
|
||||||
gSaveContext.swordHealth = 8;
|
gSaveContext.swordHealth = 8;
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_HylianShield(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_HylianShield(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_SHIELD_HYLIAN);
|
Item_Give(play, ITEM_SHIELD_HYLIAN);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_DekuShield(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_DekuShield(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_SHIELD_DEKU);
|
Item_Give(play, ITEM_SHIELD_DEKU);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_GoronTunic(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_GoronTunic(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_TUNIC_GORON);
|
Item_Give(play, ITEM_TUNIC_GORON);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_ZoraTunic(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_ZoraTunic(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_TUNIC_ZORA);
|
Item_Give(play, ITEM_TUNIC_ZORA);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_Health(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_Health(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Health_ChangeBy(play, this->itemCount);
|
Health_ChangeBy(play, this->itemCount);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_MilkBottle(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_MilkBottle(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_MILK_BOTTLE);
|
Item_Give(play, ITEM_MILK_BOTTLE);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_WeirdEgg(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_WeirdEgg(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_WEIRD_EGG);
|
Item_Give(play, ITEM_WEIRD_EGG);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_Unk19(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_Unk19(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_Unk20(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_Unk20(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_DekuSeeds(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_DekuSeeds(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Item_Give(play, ITEM_SEEDS_30);
|
Item_Give(play, ITEM_SEEDS_30);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_ItemGive_BottledItem(PlayState* play, EnGirlA* this) {
|
void EnGirlA_ItemGive_BottledItem(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
switch (this->actor.params) {
|
switch (this->actor.params) {
|
||||||
case SI_FISH:
|
case SI_FISH:
|
||||||
Item_Give(play, ITEM_FISH);
|
Item_Give(play, ITEM_FISH);
|
||||||
|
@ -927,6 +943,7 @@ void EnGirlA_ItemGive_Randomizer(PlayState* play, EnGirlA* this) {
|
||||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||||
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||||
|
|
||||||
|
gSaveContext.pendingSale = getItemEntry.itemId;
|
||||||
if (getItemEntry.modIndex == MOD_NONE) {
|
if (getItemEntry.modIndex == MOD_NONE) {
|
||||||
// RANDOTOD: Move this into Item_Give() or some other more central location
|
// RANDOTOD: Move this into Item_Give() or some other more central location
|
||||||
if (getItemEntry.getItemId == GI_SWORD_BGS) {
|
if (getItemEntry.getItemId == GI_SWORD_BGS) {
|
||||||
|
@ -942,6 +959,7 @@ void EnGirlA_ItemGive_Randomizer(PlayState* play, EnGirlA* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyEvent_ShieldDiscount(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyEvent_ShieldDiscount(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
if (this->actor.params == SI_HYLIAN_SHIELD) {
|
if (this->actor.params == SI_HYLIAN_SHIELD) {
|
||||||
if (gSaveContext.infTable[7] & 0x40) {
|
if (gSaveContext.infTable[7] & 0x40) {
|
||||||
Rupees_ChangeBy(-(this->basePrice - sShieldDiscounts[(s32)Rand_ZeroFloat(7.9f)]));
|
Rupees_ChangeBy(-(this->basePrice - sShieldDiscounts[(s32)Rand_ZeroFloat(7.9f)]));
|
||||||
|
@ -952,14 +970,17 @@ void EnGirlA_BuyEvent_ShieldDiscount(PlayState* play, EnGirlA* this) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyEvent_GoronTunic(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyEvent_GoronTunic(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyEvent_ZoraTunic(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyEvent_ZoraTunic(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGirlA_BuyEvent_ObtainBombchuPack(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyEvent_ObtainBombchuPack(PlayState* play, EnGirlA* this) {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(this->getItemId).itemId;
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
|
|
||||||
// Normally, buying a bombchu pack sets a flag indicating the pack is now sold out
|
// Normally, buying a bombchu pack sets a flag indicating the pack is now sold out
|
||||||
|
@ -1000,6 +1021,8 @@ void EnGirlA_BuyEvent_ObtainBombchuPack(PlayState* play, EnGirlA* this) {
|
||||||
// The giving of the item is handled in ossan.c, and a fanfare is played
|
// The giving of the item is handled in ossan.c, and a fanfare is played
|
||||||
void EnGirlA_BuyEvent_Randomizer(PlayState* play, EnGirlA* this) {
|
void EnGirlA_BuyEvent_Randomizer(PlayState* play, EnGirlA* this) {
|
||||||
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
ShopItemIdentity shopItemIdentity = Randomizer_IdentifyShopItem(play->sceneNum, this->randoSlotIndex);
|
||||||
|
GetItemEntry getItemEntry = Randomizer_GetItemFromKnownCheckWithoutObtainabilityCheck(shopItemIdentity.randomizerCheck, shopItemIdentity.ogItemId);
|
||||||
|
gSaveContext.pendingSale = getItemEntry.itemId;
|
||||||
Flags_SetRandomizerInf(shopItemIdentity.randomizerInf);
|
Flags_SetRandomizerInf(shopItemIdentity.randomizerInf);
|
||||||
Rupees_ChangeBy(-this->basePrice);
|
Rupees_ChangeBy(-this->basePrice);
|
||||||
}
|
}
|
||||||
|
|
|
@ -253,14 +253,16 @@ void EnGm_ProcessChoiceIndex(EnGm* this, PlayState* play) {
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||||
GiveItemEntryFromActor(&this->actor, play,
|
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||||
Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE), 415.0f, 10.0f);
|
gSaveContext.pendingSale = itemEntry.itemId;
|
||||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||||
gSaveContext.infTable[11] |= 2;
|
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||||
this->actionFunc = func_80A3DF00;
|
gSaveContext.infTable[11] |= 2;
|
||||||
|
this->actionFunc = func_80A3DF00;
|
||||||
} else {
|
} else {
|
||||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
gSaveContext.pendingSale = ItemTable_Retrieve(GI_SWORD_KNIFE).itemId;
|
||||||
this->actionFunc = func_80A3DF00;
|
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||||
|
this->actionFunc = func_80A3DF00;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -277,14 +279,16 @@ void func_80A3DF00(EnGm* this, PlayState* play) {
|
||||||
this->actor.parent = NULL;
|
this->actor.parent = NULL;
|
||||||
this->actionFunc = func_80A3DF60;
|
this->actionFunc = func_80A3DF60;
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
if (gSaveContext.n64ddFlag && (Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF) &&
|
||||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON)) {
|
||||||
GiveItemEntryFromActor(&this->actor, play,
|
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE);
|
||||||
Randomizer_GetItemFromKnownCheck(RC_GC_MEDIGORON, GI_SWORD_KNIFE), 415.0f, 10.0f);
|
gSaveContext.pendingSale = itemEntry.itemId;
|
||||||
|
GiveItemEntryFromActor(&this->actor, play, itemEntry, 415.0f, 10.0f);
|
||||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_MEDIGORON);
|
||||||
gSaveContext.infTable[11] |= 2;
|
gSaveContext.infTable[11] |= 2;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(GI_SWORD_KNIFE).itemId;
|
||||||
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
func_8002F434(&this->actor, play, GI_SWORD_KNIFE, 415.0f, 10.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,13 +131,14 @@ void func_80A89160(EnJs* this, PlayState* play) {
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MERCHANTS) != RO_SHUFFLE_MERCHANTS_OFF &&
|
||||||
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)) {
|
!Flags_GetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN)) {
|
||||||
GiveItemEntryFromActor(&this->actor, play,
|
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_WASTELAND_BOMBCHU_SALESMAN, GI_BOMBCHUS_10);
|
||||||
Randomizer_GetItemFromKnownCheck(RC_WASTELAND_BOMBCHU_SALESMAN, GI_BOMBCHUS_10), 90.0f, 10.0f);
|
gSaveContext.pendingSale = itemEntry.itemId;
|
||||||
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN);
|
GiveItemEntryFromActor(&this->actor, play, itemEntry, 90.0f, 10.0f);
|
||||||
|
Flags_SetRandomizerInf(RAND_INF_MERCHANTS_CARPET_SALESMAN);
|
||||||
} else {
|
} else {
|
||||||
func_8002F434(&this->actor, play, GI_BOMBCHUS_10, 10000.0f, 50.0f);
|
gSaveContext.pendingSale = ItemTable_Retrieve(GI_BOMBCHUS_10).itemId;
|
||||||
|
func_8002F434(&this->actor, play, GI_BOMBCHUS_10, 10000.0f, 50.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -156,10 +156,12 @@ void EnMs_Sell(EnMs* this, PlayState* play) {
|
||||||
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase;
|
(gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) ? EnMs_Wait : EnMs_TalkAfterPurchase;
|
||||||
} else {
|
} else {
|
||||||
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
|
if (gSaveContext.n64ddFlag && Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS)) {
|
||||||
GiveItemEntryFromActor(&this->actor, play,
|
GetItemEntry itemEntry = Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN);
|
||||||
Randomizer_GetItemFromKnownCheck(RC_ZR_MAGIC_BEAN_SALESMAN, GI_BEAN), 90.0f, 10.0f);
|
gSaveContext.pendingSale = itemEntry.itemId;
|
||||||
|
GiveItemEntryFromActor(&this->actor, play, itemEntry, 90.0f, 10.0f);
|
||||||
BEANS_BOUGHT = 10;
|
BEANS_BOUGHT = 10;
|
||||||
} else {
|
} else {
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(GI_BEAN).itemId;
|
||||||
func_8002F434(&this->actor, play, GI_BEAN, 90.0f, 10.0f);
|
func_8002F434(&this->actor, play, GI_BEAN, 90.0f, 10.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1716,7 +1716,9 @@ void EnOssan_State_ItemPurchased(EnOssan* this, PlayState* play, Player* player)
|
||||||
} else {
|
} else {
|
||||||
getItemEntry = ItemTable_Retrieve(this->shelfSlots[this->cursorIndex]->getItemId);
|
getItemEntry = ItemTable_Retrieve(this->shelfSlots[this->cursorIndex]->getItemId);
|
||||||
}
|
}
|
||||||
|
if (gSaveContext.pendingSale == ITEM_NONE) {
|
||||||
|
gSaveContext.pendingSale = getItemEntry.itemId;
|
||||||
|
}
|
||||||
|
|
||||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||||
if (this->actor.params == OSSAN_TYPE_MASK) {
|
if (this->actor.params == OSSAN_TYPE_MASK) {
|
||||||
|
|
|
@ -917,6 +917,7 @@ void func_80B15FE8(EnTa* this, PlayState* play) {
|
||||||
this->unk_2E0 |= 2;
|
this->unk_2E0 |= 2;
|
||||||
func_80B13AA0(this, func_80B15E80, func_80B16938);
|
func_80B13AA0(this, func_80B15E80, func_80B16938);
|
||||||
Rupees_ChangeBy(-30);
|
Rupees_ChangeBy(-30);
|
||||||
|
gSaveContext.pendingSale = ItemTable_Retrieve(GI_MILK).itemId;
|
||||||
func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 50.0f);
|
func_8002F434(&this->actor, play, GI_MILK, 10000.0f, 50.0f);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue