mirror of
https://github.com/pret/pokeplatinum.git
synced 2026-09-13 12:16:03 -05:00
19 lines
626 B
C
19 lines
626 B
C
#include "save_catchrecords.h"
|
|
|
|
#include "game_records.h"
|
|
#include "pokedex.h"
|
|
#include "pokemon.h"
|
|
#include "poketch.h"
|
|
#include "savedata.h"
|
|
|
|
void SaveData_UpdateCatchRecords(SaveData *saveData, const Pokemon *mon)
|
|
{
|
|
if (Pokemon_GetValue(mon, MON_DATA_IS_EGG, NULL) == FALSE) {
|
|
Pokedex *pokedex = SaveData_GetPokedex(saveData);
|
|
|
|
GameRecords_IncrementTrainerScoreOnCatch(SaveData_GetGameRecords(saveData), pokedex, Pokemon_GetValue(mon, MON_DATA_SPECIES, NULL));
|
|
Pokedex_Capture(pokedex, mon);
|
|
Poketch_PokemonHistoryEnqueue(SaveData_GetPoketch(saveData), (const BoxPokemon *)mon);
|
|
}
|
|
}
|