Make LearnedAttack of Creature a smart pointer.
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:
@@ -56,10 +56,10 @@ Creature* CreateCreature::Create() {
|
||||
}
|
||||
auto experience = _library->GetGrowthRateLibrary()->CalculateExperience(species->GetGrowthRate(), _level);
|
||||
|
||||
auto attacks = ArbUt::List<LearnedAttack*>(_attacks.Count());
|
||||
auto attacks = std::vector<LearnedAttack*>(_attacks.Count());
|
||||
for (size_t i = 0; i < _attacks.Count(); i++) {
|
||||
auto kv = _attacks[i];
|
||||
attacks.Append(new LearnedAttack(std::get<0>(kv), std::get<1>(kv)));
|
||||
attacks[i] = new LearnedAttack(std::get<0>(kv), std::get<1>(kv));
|
||||
}
|
||||
auto c = new Creature(_library, species, variant, _level, experience, identifier, gender, _coloring, heldItem,
|
||||
_nickname, talent, attacks);
|
||||
|
||||
Reference in New Issue
Block a user