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

@@ -42,7 +42,7 @@ namespace CreatureLib::Battling {
bool _onBattleField = false;
std::string _nickname = "";
int8_t _talentIndex;
TalentIndex _talentIndex;
Script* _activeTalent = nullptr;
bool _hasOverridenTalent;
@@ -61,7 +61,7 @@ namespace CreatureLib::Battling {
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);
const TalentIndex& talent, std::vector<LearnedAttack*> attacks);
virtual ~Creature() {
for (auto attack : _attacks) {