Only update slot's gameversion if the rootLevel actually changed

Closes #238
This commit is contained in:
jvyden 2022-04-05 14:45:30 -04:00
commit cac1953c18
No known key found for this signature in database
GPG key ID: 18BCF2BE0262B278

View file

@ -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)
{