From 3baabe6d79e0c9c8b98a00de9f6e2abebe12da71 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Mon, 17 Aug 2020 12:36:21 +0200 Subject: [PATCH] Update tp latest CreatureLib. --- src/Battling/Pokemon/CreatePokemon.cpp | 4 ++-- src/ScriptResolving/AngelScript/AngelScriptScript.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Battling/Pokemon/CreatePokemon.cpp b/src/Battling/Pokemon/CreatePokemon.cpp index ac3dc41..6a1cb09 100644 --- a/src/Battling/Pokemon/CreatePokemon.cpp +++ b/src/Battling/Pokemon/CreatePokemon.cpp @@ -66,7 +66,7 @@ namespace PkmnLib::Battling { ArbUt::BorrowedPtr 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 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."); diff --git a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp index 2361712..b5e8754 100644 --- a/src/ScriptResolving/AngelScript/AngelScriptScript.cpp +++ b/src/ScriptResolving/AngelScript/AngelScriptScript.cpp @@ -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); \