From a6c17b0e1632356d17dddd9191e469019bdc2bdb Mon Sep 17 00:00:00 2001 From: Slendy Date: Tue, 20 Sep 2022 16:55:56 -0500 Subject: [PATCH] Fix leaderboards for non-adventure levels --- .../Controllers/Slots/ScoreController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs index f10f10c2..6a611f80 100644 --- a/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs +++ b/ProjectLighthouse.Servers.GameServer/Controllers/Slots/ScoreController.cs @@ -118,11 +118,11 @@ public class ScoreController : ControllerBase Type = score.Type, Points = score.Points, SlotId = score.SlotId, - ChildSlotId = score.ChildSlotId + ChildSlotId = score.ChildSlotId, }; IQueryable existingScore = this.database.Scores.Where(s => s.SlotId == playerScore.SlotId) - .Where(s => childId != 0 || s.ChildSlotId == childId) + .Where(s => s.ChildSlotId == 0 || s.ChildSlotId == childId) .Where(s => s.PlayerIdCollection == playerScore.PlayerIdCollection) .Where(s => s.Type == playerScore.Type); if (existingScore.Any()) @@ -213,7 +213,7 @@ public class ScoreController : ControllerBase // var needed for Anonymous type returned from SELECT var rankedScores = this.database.Scores .Where(s => s.SlotId == slotId && s.Type == type) - .Where(s => s.ChildSlotId == null || s.ChildSlotId == childId) + .Where(s => s.ChildSlotId == 0 || s.ChildSlotId == childId) .Where(s => playerIds == null || playerIds.Any(id => s.PlayerIdCollection.Contains(id))) .AsEnumerable() .OrderByDescending(s => s.Points)