Update to new Throw message.
This commit is contained in:
parent
2a4ec47d15
commit
9685037cf3
|
@ -155,7 +155,7 @@ class BattleFunctions {
|
|||
static void LearnMove(PkmnLib::Battling::Pokemon* user, const ArbUt::StringView& moveName) {
|
||||
auto move = Globals::Library.GetValue()->GetMoveLibrary()->TryGet(moveName);
|
||||
if (!move.has_value()) {
|
||||
THROW("Unknown move: " << moveName);
|
||||
THROW("Unknown move: ", moveName);
|
||||
}
|
||||
user->AddAttack(
|
||||
new PkmnLib::Battling::LearnedMove(move.value(), CreatureLib::Battling::AttackLearnMethod::Unknown));
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
class MiscMockFunctions {
|
||||
static CScriptHandle CreateMoveScript(const ArbUt::StringView& name) {
|
||||
auto script = Globals::Library.GetValue()->GetScriptResolver()->LoadScript(nullptr, ScriptCategory::Attack, name);
|
||||
auto script =
|
||||
Globals::Library.GetValue()->GetScriptResolver()->LoadScript(nullptr, ScriptCategory::Attack, name);
|
||||
if (script != nullptr) {
|
||||
auto* ctx = asGetActiveContext();
|
||||
TestEnvironment* env = static_cast<TestEnvironment*>(ctx->GetUserData(684));
|
||||
|
@ -25,7 +26,7 @@ class MiscMockFunctions {
|
|||
|
||||
auto move = Globals::Library.GetValue()->GetMoveLibrary()->TryGet(moveName);
|
||||
if (!move.has_value()) {
|
||||
THROW("Unknown move: " << moveName);
|
||||
THROW("Unknown move: ", moveName);
|
||||
}
|
||||
auto learnedMove =
|
||||
new PkmnLib::Battling::LearnedMove(move.value(), CreatureLib::Battling::AttackLearnMethod::Unknown);
|
||||
|
|
Loading…
Reference in New Issue