2024-07-05 17:33:09 -07:00
|
|
|
#include "unk_0202F180.h"
|
|
|
|
|
2022-12-30 11:04:32 +01:00
|
|
|
#include <nitro.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2024-02-12 04:17:03 +11:00
|
|
|
#include "struct_decls/pokedexdata_decl.h"
|
2022-12-30 11:04:32 +01:00
|
|
|
|
2024-06-21 08:27:02 -07:00
|
|
|
#include "game_records.h"
|
2025-01-17 23:22:10 -05:00
|
|
|
#include "pokedex.h"
|
2023-09-05 10:50:28 +01:00
|
|
|
#include "pokemon.h"
|
2025-01-17 23:22:10 -05:00
|
|
|
#include "poketch.h"
|
2024-07-05 17:33:09 -07:00
|
|
|
#include "savedata.h"
|
2022-12-30 11:04:32 +01:00
|
|
|
|
2025-01-14 07:37:32 -05:00
|
|
|
void sub_0202F180(SaveData *saveData, const Pokemon *pokemon)
|
2022-12-30 11:04:32 +01:00
|
|
|
{
|
2025-01-14 07:37:32 -05:00
|
|
|
if (Pokemon_GetValue((Pokemon *)pokemon, MON_DATA_IS_EGG, NULL) == 0) {
|
|
|
|
Pokedex *pokedex = SaveData_GetPokedex(saveData);
|
2022-12-30 11:04:32 +01:00
|
|
|
|
2025-01-14 07:37:32 -05:00
|
|
|
GameRecords_IncrementTrainerScoreOnCatch(SaveData_GetGameRecordsPtr(saveData), pokedex, Pokemon_GetValue((Pokemon *)pokemon, MON_DATA_SPECIES, NULL));
|
|
|
|
Pokedex_Capture(pokedex, (Pokemon *)pokemon);
|
2025-01-17 23:22:10 -05:00
|
|
|
Poketch_PokemonHistoryEnqueue(SaveData_PoketchData(saveData), (const BoxPokemon *)pokemon);
|
2022-12-30 11:04:32 +01:00
|
|
|
}
|
|
|
|
}
|