disable $bank when character overlay is present

This commit is contained in:
Martin Michelsen
2023-12-09 10:38:48 -08:00
parent 0ded423c84
commit bb3d4ac847
4 changed files with 16 additions and 1 deletions
+3
View File
@@ -1001,6 +1001,9 @@ static void server_command_change_bank(shared_ptr<Client> c, const std::string&
if (c->config.check_flag(Client::Flag::AT_BANK_COUNTER)) {
throw runtime_error("cannot change banks while at the bank counter");
}
if (c->has_overlay()) {
throw runtime_error("cannot change banks while Battle or Challenge is in progress");
}
ssize_t new_char_index = args.empty() ? (c->bb_character_index + 1) : stol(args, nullptr, 0);