From d5f0c6aceb32cb3289a8b348afc6361c9d1d7add Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Fri, 3 Oct 2025 08:41:45 -0700 Subject: [PATCH] fix shared bank creation --- src/Client.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Client.cc b/src/Client.cc index 274c0b29..fcd146d9 100644 --- a/src/Client.cc +++ b/src/Client.cc @@ -766,7 +766,7 @@ std::shared_ptr Client::bank_file(bool allow_load) { if (this->bb_bank_character_index == this->bb_character_index) { this->bank_data = std::make_shared(this->character_file(true, false)->bank); this->log.info_f("Using bank data from loaded character"); - } else { + } else if (this->bb_bank_character_index >= 0) { if (!this->login || !this->login->bb_license) { throw logic_error("client is not logged in"); } @@ -774,6 +774,10 @@ std::shared_ptr Client::bank_file(bool allow_load) { auto character = PSOCHARFile::load_shared(filename, false).character_file; this->bank_data = std::make_shared(character->bank); this->log.info_f("Using bank data from {}", filename); + } else { + // The shared bank doesn't exist; make a new one + this->bank_data = make_shared(); + this->log.info_f("Created new shared bank"); } }