Added Creature C Interface, misc fixes and changes for Creature.
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:
@@ -34,7 +34,7 @@ Creature* CreateCreature::Create() {
|
||||
auto rand = Arbutils::Random();
|
||||
auto species = this->_library->GetSpeciesLibrary()->Get(this->_species);
|
||||
auto variant = species->GetVariant(this->_variant);
|
||||
TalentIndex talent;
|
||||
Library::TalentIndex talent;
|
||||
if (this->_talent.Empty()) {
|
||||
talent = variant->GetRandomTalent(&rand);
|
||||
} else {
|
||||
@@ -54,8 +54,7 @@ Creature* CreateCreature::Create() {
|
||||
throw CreatureException("Invalid held item.");
|
||||
}
|
||||
}
|
||||
// FIXME: implement experience
|
||||
auto experience = 0;
|
||||
auto experience = _library->GetGrowthRateLibrary()->CalculateExperience(species->GetGrowthRate(), _level);
|
||||
|
||||
auto attacks = std::vector<LearnedAttack*>(_attacks.size());
|
||||
for (size_t i = 0; i < attacks.size(); i++) {
|
||||
|
||||
Reference in New Issue
Block a user