Reworked retrieving talent, new method is cleaner and harder to misunderstand.
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2020-03-02 13:59:49 +01:00
parent bfc049a97c
commit 0c1580ade6
8 changed files with 62 additions and 27 deletions

View File

@@ -9,7 +9,7 @@ using namespace CreatureLib;
Battling::Creature::Creature(const BattleLibrary* library, const Library::CreatureSpecies* species,
const Library::SpeciesVariant* variant, uint8_t level, uint32_t experience, uint32_t uid,
Library::Gender gender, uint8_t coloring, const Library::Item* heldItem,
std::string nickname, int8_t talent, std::vector<LearnedAttack*> attacks)
std::string nickname, const TalentIndex& talent, std::vector<LearnedAttack*> attacks)
: _library(library), _species(species), _variant(variant), _level(level), _experience(experience),
_uniqueIdentifier(uid), _gender(gender), _coloring(coloring), _heldItem(heldItem), _nickname(std::move(nickname)),
_talentIndex(talent), _hasOverridenTalent(false), _attacks(std::move(attacks)) {