Use Arbutils exception Macros, instead of own ones.
All checks were successful
continuous-integration/drone/push Build is passing

Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
2020-08-17 12:18:01 +02:00
parent 9d5316edff
commit 98dacbccde
20 changed files with 44 additions and 60 deletions

View File

@@ -23,7 +23,7 @@ CreateCreature CreateCreature::WithGender(Library::Gender gender) {
CreateCreature CreateCreature::WithAttack(const ArbUt::StringView& attackName, AttackLearnMethod learnMethod) {
if (_attacks.Count() >= _library->GetSettings()->GetMaximalAttacks()) {
THROW_CREATURE("You have already set the maximum amount of allowed moves.");
THROW("You have already set the maximum amount of allowed moves.");
}
auto attackData = _library->GetAttackLibrary()->Get(attackName.GetHash());
@@ -52,7 +52,7 @@ Creature* CreateCreature::Create() {
ArbUt::BorrowedPtr<const Library::Item> heldItem;
if (!this->_heldItem.IsEmpty()) {
if (!_library->GetItemLibrary()->TryGet(this->_heldItem.GetHash(), heldItem)) {
THROW_CREATURE("Invalid held item '" << this->_heldItem.c_str() << "'.");
THROW("Invalid held item '" << this->_heldItem.c_str() << "'.");
}
}
auto experience = _library->GetGrowthRateLibrary()->CalculateExperience(species->GetGrowthRate(), _level);