reset item flags on new game (#5363)
Co-authored-by: ghoulslash <pokevoyager0@gmail.com>
This commit is contained in:
parent
4c49dfdd1d
commit
2b20e6cae1
1 changed files with 9 additions and 0 deletions
|
@ -51,6 +51,7 @@ extern const u8 EventScript_ResetAllMapFlags[];
|
|||
static void ClearFrontierRecord(void);
|
||||
static void WarpToTruck(void);
|
||||
static void ResetMiniGamesRecords(void);
|
||||
static void ResetItemFlags(void);
|
||||
|
||||
EWRAM_DATA bool8 gDifferentSaveFile = FALSE;
|
||||
EWRAM_DATA bool8 gEnableContestDebugging = FALSE;
|
||||
|
@ -204,6 +205,7 @@ void NewGameInitData(void)
|
|||
WipeTrainerNameRecords();
|
||||
ResetTrainerHillResults();
|
||||
ResetContestLinkResults();
|
||||
ResetItemFlags();
|
||||
}
|
||||
|
||||
static void ResetMiniGamesRecords(void)
|
||||
|
@ -213,3 +215,10 @@ static void ResetMiniGamesRecords(void)
|
|||
ResetPokemonJumpRecords();
|
||||
CpuFill16(0, &gSaveBlock2Ptr->berryPick, sizeof(struct BerryPickingResults));
|
||||
}
|
||||
|
||||
static void ResetItemFlags(void)
|
||||
{
|
||||
#if OW_SHOW_ITEM_DESCRIPTIONS == OW_ITEM_DESCRIPTIONS_FIRST_TIME
|
||||
memset(&gSaveBlock3Ptr->itemFlags, 0, sizeof(gSaveBlock3Ptr->itemFlags));
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue