incremement dexnav chain fix
This commit is contained in:
parent
3c4bf808f1
commit
abe68b7466
3 changed files with 13 additions and 1 deletions
|
@ -127,6 +127,7 @@ void TryIncrementSpeciesSearchLevel(u16 dexNum);
|
|||
void ResetDexNavSearch(void);
|
||||
bool8 TryFindHiddenPokemon(void);
|
||||
bool8 DexNavTryMakeShinyMon(void);
|
||||
void IncrementDexNavChain(void);
|
||||
|
||||
//ewram
|
||||
extern u8 gCurrentDexNavChain;
|
||||
|
|
|
@ -5072,6 +5072,11 @@ static void FreeResetData_ReturnToOvOrDoEvolutions(void)
|
|||
{
|
||||
if (!gPaletteFade.active)
|
||||
{
|
||||
if (gDexnavBattle && (gBattleOutcome == B_OUTCOME_WON || gBattleOutcome == B_OUTCOME_CAUGHT))
|
||||
IncrementDexNavChain();
|
||||
else
|
||||
gSaveBlock1Ptr->dexNavChain = 0;
|
||||
|
||||
ResetSpriteData();
|
||||
if (gLeveledUpInBattle == 0 || gBattleOutcome != B_OUTCOME_WON)
|
||||
{
|
||||
|
|
|
@ -2721,3 +2721,9 @@ void ResetDexNavSearch(void)
|
|||
if (FlagGet(FLAG_SYS_DEXNAV_SEARCH))
|
||||
EndDexNavSearch(FindTaskIdByFunc(Task_DexNavSearch)); //moving to new map ends dexnav search
|
||||
}
|
||||
|
||||
void IncrementDexNavChain(void)
|
||||
{
|
||||
if (gSaveBlock1Ptr->dexNavChain < DEXNAV_CHAIN_MAX)
|
||||
gSaveBlock1Ptr->dexNavChain++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue