Use Arbutils exception Macros, instead of own ones.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: Deukhoofd <Deukhoofd@gmail.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user