Update tp latest CreatureLib.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-08-17 12:36:21 +02:00
parent 0983658913
commit 3baabe6d79
2 changed files with 3 additions and 3 deletions

View File

@@ -66,7 +66,7 @@ namespace PkmnLib::Battling {
ArbUt::BorrowedPtr<const Library::Item> heldItem = nullptr;
if (!this->_heldItem.IsEmpty()) {
if (!_library->GetItemLibrary()->TryGet(this->_heldItem, heldItem)) {
THROW_CREATURE("Unknown Item: " << this->_heldItem.std_str());
THROW("Unknown Item: " << this->_heldItem.std_str());
}
AssertNotNull(heldItem);
}
@@ -148,7 +148,7 @@ namespace PkmnLib::Battling {
CreatureLib::Battling::AttackLearnMethod method) {
ArbUt::BorrowedPtr<const PkmnLib::Library::MoveData> move = nullptr;
if (!_library->GetMoveLibrary()->TryGet(moveName, move)) {
THROW_CREATURE("Invalid Move given: " << moveName.std_str());
THROW("Invalid Move given: " << moveName.std_str());
}
if (_currentMove >= _library->GetSettings()->GetMaximalAttacks()) {
throw ArbUt::Exception("This pokemon already has the maximal allowed moves.");