Handle natures as pointers instead of values.
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
2020-04-17 18:39:04 +02:00
parent 086438f547
commit 6b704224d0
8 changed files with 32 additions and 22 deletions

View File

@@ -83,6 +83,7 @@ PkmnLib::Battling::Pokemon* PkmnLib::Battling::CreatePokemon::Build() {
if (_nature.Empty()) {
_nature = _library->GetNatureLibrary()->GetRandomNatureName(rand);
}
auto nature = _library->GetNatureLibrary()->GetNatureByName(_nature);
auto shiny = false;
if (_shininessSet) {
@@ -92,7 +93,7 @@ PkmnLib::Battling::Pokemon* PkmnLib::Battling::CreatePokemon::Build() {
}
auto pkmn = new Pokemon(_library, species, forme, _level, experience, identifier, gender, shiny, heldItem,
_nickname, ability, attacks, ivs, evs, _nature);
_nickname, ability, attacks, ivs, evs, nature);
pkmn->Initialize();
return pkmn;
}