Update tp latest CreatureLib.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-08-17 12:36:21 +02:00
parent 0983658913
commit 3baabe6d79
Signed by: Deukhoofd
GPG Key ID: F63E044490819F6F
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.");

View File

@ -34,7 +34,7 @@
} else { \
ctx->PopState(); \
} \
throw ArbUt::Exception("Script didn't finish properly; message " + std::to_string(scriptResult)); \
THROW("Script didn't finish properly; message " << scriptResult); \
} \
if (newContext) { \
_ctxPool->ReturnContextToPool(ctx); \