diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index 53885e5c..5f89de15 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -1480,7 +1480,11 @@ static void server_command_change_bank(shared_ptr c, const std::string& throw runtime_error("invalid bank number"); } - const auto& bank = c->current_bank(); + auto& bank = c->current_bank(); + bank.assign_ids(0x99000000 + (c->lobby_client_id << 20)); + c->log.info("Assigned bank item IDs"); + c->print_bank(stderr); + send_text_message_printf(c, "%" PRIu32 " items\n%" PRIu32 " Meseta", bank.num_items.load(), bank.meseta.load()); } diff --git a/src/Lobby.cc b/src/Lobby.cc index 24c0a4ad..361ae037 100644 --- a/src/Lobby.cc +++ b/src/Lobby.cc @@ -918,8 +918,9 @@ void Lobby::assign_inventory_and_bank_item_ids(shared_ptr c, bool consum if (c->log.info("Assigned inventory item IDs%s", consume_ids ? "" : " but did not mark IDs as used")) { c->print_inventory(stderr); + auto& bank = c->current_bank(); if (p->bank.num_items) { - p->bank.assign_ids(0x99000000 + (c->lobby_client_id << 20)); + bank.assign_ids(0x99000000 + (c->lobby_client_id << 20)); c->log.info("Assigned bank item IDs"); c->print_bank(stderr); } else {