This commit is contained in:
@@ -56,8 +56,7 @@ export void PkmnLib_Pokemon_ChangeFriendship(Pokemon* p, i8 amount) { p->ChangeF
|
||||
SIMPLE_GET_FUNC(Pokemon, IsEgg, bool)
|
||||
export void PkmnLib_Pokemon_SetIsEgg(Pokemon* p, bool value) { p->SetIsEgg(value); }
|
||||
|
||||
|
||||
export u8 PkmnLib_Pokemon_Evolve(Pokemon* p, const PkmnLib::Library::PokemonSpecies* species,
|
||||
const PkmnLib::Library::PokemonForme* forme) {
|
||||
const PkmnLib::Library::PokemonForme* forme) {
|
||||
Try(p->Evolve(species, forme);)
|
||||
}
|
||||
@@ -7,13 +7,8 @@ export const SpeciesLibrary* PkmnLib_SpeciesLibrary_Construct(size_t initialCapa
|
||||
};
|
||||
|
||||
export u8 PkmnLib_SpeciesLibrary_FindPreEvolution(const PokemonSpecies*& out, const SpeciesLibrary* p,
|
||||
const PokemonSpecies* species) {
|
||||
const PokemonSpecies* species) {
|
||||
Try(
|
||||
auto v = p->FindPreEvolution(species);
|
||||
if (!v.has_value()){
|
||||
out = nullptr;
|
||||
} else {
|
||||
out = v.value().GetRaw();
|
||||
}
|
||||
)
|
||||
if (!v.has_value()) { out = nullptr; } else { out = v.value().GetRaw(); })
|
||||
}
|
||||
Reference in New Issue
Block a user