From cac1953c18d57fb5e52610cfa323e9c36298f197 Mon Sep 17 00:00:00 2001 From: jvyden Date: Tue, 5 Apr 2022 14:45:30 -0400 Subject: [PATCH] Only update slot's gameversion if the rootLevel actually changed Closes #238 --- .../Controllers/GameApi/Slots/PublishController.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ProjectLighthouse/Controllers/GameApi/Slots/PublishController.cs b/ProjectLighthouse/Controllers/GameApi/Slots/PublishController.cs index b83811e3..60bae1f2 100644 --- a/ProjectLighthouse/Controllers/GameApi/Slots/PublishController.cs +++ b/ProjectLighthouse/Controllers/GameApi/Slots/PublishController.cs @@ -115,6 +115,8 @@ public class PublishController : ControllerBase slot.LocationId = oldSlot.LocationId; slot.SlotId = oldSlot.SlotId; + #region Set plays + slot.PlaysLBP1 = oldSlot.PlaysLBP1; slot.PlaysLBP1Complete = oldSlot.PlaysLBP1Complete; slot.PlaysLBP1Unique = oldSlot.PlaysLBP1Unique; @@ -131,12 +133,15 @@ public class PublishController : ControllerBase slot.PlaysLBPVitaComplete = oldSlot.PlaysLBPVitaComplete; slot.PlaysLBPVitaUnique = oldSlot.PlaysLBPVitaUnique; + #endregion + slot.FirstUploaded = oldSlot.FirstUploaded; slot.LastUpdated = TimeHelper.UnixTimeMilliseconds(); slot.TeamPick = oldSlot.TeamPick; - slot.GameVersion = gameToken.GameVersion; + // Only update a slot's gameVersion if the level was actually change + if (oldSlot.RootLevel != slot.RootLevel) slot.GameVersion = gameToken.GameVersion; if (slot.MinimumPlayers == 0 || slot.MaximumPlayers == 0) {