Handle natures as pointers instead of values.
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user