ignore duplicate item pickup requests

This commit is contained in:
Martin Michelsen
2023-10-29 16:49:49 -07:00
parent 4e2e423a4b
commit 5ec969ece3
4 changed files with 21 additions and 16 deletions
+4
View File
@@ -313,6 +313,10 @@ uint8_t Lobby::game_event_for_lobby_event(uint8_t lobby_event) {
return lobby_event;
}
bool Lobby::item_exists(uint32_t item_id) const {
return this->item_id_to_floor_item.count(item_id);
}
void Lobby::add_item(const ItemData& data, uint8_t area, float x, float z) {
auto& fi = this->item_id_to_floor_item[data.id];
fi.data = data;