From 4f2bc83d4ef8614785b20e484a7c01ad538a6931 Mon Sep 17 00:00:00 2001 From: Jet the Hawk Date: Sun, 22 Jan 2023 20:34:47 -0500 Subject: [PATCH] Remove a jvydenism --- ProjectLighthouse/Match/Rooms/Room.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ProjectLighthouse/Match/Rooms/Room.cs b/ProjectLighthouse/Match/Rooms/Room.cs index 831b0923..cd67eb0c 100644 --- a/ProjectLighthouse/Match/Rooms/Room.cs +++ b/ProjectLighthouse/Match/Rooms/Room.cs @@ -19,8 +19,10 @@ public class Room this.roomId = value; } } + + - [RedisIdField] + [RedisIdField] public string RedisId { get; set; } [Indexed] @@ -43,16 +45,14 @@ public class Room public bool IsLookingForPlayers => this.State == RoomState.PlayingLevel || this.State == RoomState.DivingInWaiting; [JsonIgnore] - public int HostId { - get { - try - { + public int HostId + { + get + { + if (this.PlayerIds.Count > 0) return this.PlayerIds[0]; - } - catch - { - return -1; - } + + return -1; } }