Update to newer Arbutils version.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-05-26 18:31:06 +02:00
parent d746b3ecce
commit 25f65eb47b
68 changed files with 334 additions and 354 deletions

View File

@@ -5,7 +5,7 @@
using namespace CreatureLib::Battling;
CreateCreature CreateCreature::WithVariant(const Arbutils::CaseInsensitiveConstString& variant) {
CreateCreature CreateCreature::WithVariant(const ArbUt::CaseInsensitiveConstString& variant) {
this->_variant = variant;
return *this;
}
@@ -20,7 +20,7 @@ CreateCreature CreateCreature::WithGender(Library::Gender gender) {
return *this;
}
CreateCreature CreateCreature::WithAttack(const Arbutils::CaseInsensitiveConstString& attackName,
CreateCreature CreateCreature::WithAttack(const ArbUt::CaseInsensitiveConstString& attackName,
AttackLearnMethod learnMethod) {
if (_attacks.Count() >= _library->GetSettings()->GetMaximalMoves())
throw CreatureException("You have already set the maximum amount of allowed moves.");
@@ -31,7 +31,7 @@ CreateCreature CreateCreature::WithAttack(const Arbutils::CaseInsensitiveConstSt
}
Creature* CreateCreature::Create() {
auto rand = Arbutils::Random();
auto rand = ArbUt::Random();
auto species = this->_library->GetSpeciesLibrary()->Get(this->_species.GetHash());
auto variant = species->GetVariant(this->_variant);
Library::TalentIndex talent;
@@ -48,7 +48,7 @@ Creature* CreateCreature::Create() {
if (gender == static_cast<Library::Gender>(-1)) {
gender = species->GetRandomGender(rand);
}
borrowed_ptr<const Library::Item> heldItem;
ArbUt::BorrowedPtr<const Library::Item> heldItem;
if (!this->_heldItem.Empty()) {
if (!_library->GetItemLibrary()->TryGet(this->_heldItem.GetHash(), heldItem)) {
throw CreatureException("Invalid held item.");
@@ -56,7 +56,7 @@ Creature* CreateCreature::Create() {
}
auto experience = _library->GetGrowthRateLibrary()->CalculateExperience(species->GetGrowthRate(), _level);
auto attacks = List<LearnedAttack*>(_attacks.Count());
auto attacks = ArbUt::List<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)));