fix item ID conflicts in lobbies

This commit is contained in:
Martin Michelsen
2023-12-28 11:29:09 -08:00
parent b6cfb5b2a2
commit 0bd3bb7b77
13 changed files with 155 additions and 149 deletions
+3 -1
View File
@@ -169,13 +169,15 @@ struct Lobby : public std::enable_shared_from_this<Lobby> {
uint64_t idle_timeout_usecs;
std::unique_ptr<struct event, void (*)(struct event*)> idle_timeout_event;
Lobby(std::shared_ptr<ServerState> s, uint32_t id);
Lobby(std::shared_ptr<ServerState> s, uint32_t id, bool is_game);
Lobby(const Lobby&) = delete;
Lobby(Lobby&&) = delete;
~Lobby();
Lobby& operator=(const Lobby&) = delete;
Lobby& operator=(Lobby&&) = delete;
void reset_next_item_ids();
[[nodiscard]] inline bool check_flag(Flag flag) const {
return !!(this->enabled_flags & static_cast<uint32_t>(flag));
}