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

@@ -34,8 +34,8 @@ Creature* CreateCreature::Create() {
auto rand = Arbutils::Random();
auto species = this->_library->GetSpeciesLibrary()->Get(this->_species);
auto variant = species->GetVariant(this->_variant);
int8_t talent;
if (this->_talent.empty()) {
TalentIndex talent;
if (this->_talent.Empty()) {
talent = variant->GetRandomTalent(&rand);
} else {
talent = variant->GetTalentIndex(this->_talent);