diff --git a/src/pokedex_plus_hgss.c b/src/pokedex_plus_hgss.c index 74b57fa3a50b..8782044769c6 100644 --- a/src/pokedex_plus_hgss.c +++ b/src/pokedex_plus_hgss.c @@ -2560,11 +2560,11 @@ static void CreatePokedexList(u8 dexMode, u8 order) } break; case ORDER_ALPHABETICAL: - for (i = 0; i < NUM_SPECIES - 1; i++) + for (i = 0; i < NATIONAL_DEX_COUNT; i++) { temp_dexNum = gPokedexOrder_Alphabetical[i]; - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN)) + if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_SEEN)) { sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; @@ -2578,7 +2578,7 @@ static void CreatePokedexList(u8 dexMode, u8 order) { temp_dexNum = gPokedexOrder_Weight[i]; - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) + if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) { sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; @@ -2592,7 +2592,7 @@ static void CreatePokedexList(u8 dexMode, u8 order) { temp_dexNum = gPokedexOrder_Weight[i]; - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) + if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) { sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; @@ -2606,7 +2606,7 @@ static void CreatePokedexList(u8 dexMode, u8 order) { temp_dexNum = gPokedexOrder_Height[i]; - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) + if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) { sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE; @@ -2620,7 +2620,7 @@ static void CreatePokedexList(u8 dexMode, u8 order) { temp_dexNum = gPokedexOrder_Height[i]; - if (NationalToHoennOrder(temp_dexNum) <= temp_dexCount && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) + if ((!temp_isHoennDex || NationalToHoennOrder(temp_dexNum) != 0) && GetSetPokedexFlag(temp_dexNum, FLAG_GET_CAUGHT)) { sPokedexView->pokedexList[sPokedexView->pokemonListCount].dexNum = temp_dexNum; sPokedexView->pokedexList[sPokedexView->pokemonListCount].seen = TRUE;