Update to latest CreatureLib.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -73,13 +73,13 @@ PkmnLib::Battling::Pokemon* PkmnLib::Battling::CreatePokemon::Build() {
|
||||
auto experience = _library->GetGrowthRateLibrary()->CalculateExperience(species->GetGrowthRate(), _level);
|
||||
|
||||
auto attacks = List<CreatureLib::Battling::LearnedAttack*>(_attacks.Count());
|
||||
for (size_t i = 0; i < attacks.Count(); i++) {
|
||||
for (size_t i = 0; i < _attacks.Count(); i++) {
|
||||
auto& kv = _attacks[i];
|
||||
auto move = kv.Move;
|
||||
if (move != nullptr)
|
||||
attacks[i] = new LearnedMove(move, kv.LearnMethod);
|
||||
attacks.Append(new LearnedMove(move, kv.LearnMethod));
|
||||
else
|
||||
attacks[i] = nullptr;
|
||||
attacks.Append(nullptr);
|
||||
}
|
||||
auto ivs = CreatureLib::Library::StatisticSet(_ivHp, _ivAttack, _ivDefense, _ivSpAtt, _ivSpDef, _ivSpeed);
|
||||
auto evs = CreatureLib::Library::StatisticSet(_evHp, _evAttack, _evDefense, _evSpAtt, _evSpDef, _evSpeed);
|
||||
@@ -158,8 +158,6 @@ PkmnLib::Battling::CreatePokemon::LearnMove(const Arbutils::CaseInsensitiveConst
|
||||
throw CreatureException("This pokemon already has the maximal allowed moves.");
|
||||
}
|
||||
Assert(move != nullptr);
|
||||
auto& c = _attacks[_currentMove++];
|
||||
c.Move = move;
|
||||
c.LearnMethod = method;
|
||||
_attacks.Append(ToLearnMethod(move, method));
|
||||
return *this;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user