[ADD] add updating lobbies on exiting window

This commit is contained in:
Sem van der Hoeven
2020-10-21 21:40:35 +02:00
parent c339746a82
commit 442cdccc49
6 changed files with 50 additions and 15 deletions

View File

@@ -166,6 +166,11 @@ namespace Server.Models
sendMessage(JSONConvert.ConstructLobbyJoinSuccessMessage());
ServerCommunication.INSTANCE.sendToAll(JSONConvert.ConstructLobbyListMessage(ServerCommunication.INSTANCE.lobbies.ToArray()));
break;
case LobbyIdentifier.LEAVE:
id = JSONConvert.GetLobbyID(payload);
ServerCommunication.INSTANCE.LeaveLobby(User, id);
ServerCommunication.INSTANCE.sendToAll(JSONConvert.ConstructLobbyListMessage(ServerCommunication.INSTANCE.lobbies.ToArray()));
break;
}
}