mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-05-29 20:22:32 +00:00
Fix leaderboards for non-adventure levels
This commit is contained in:
parent
3b6298d265
commit
a6c17b0e16
1 changed files with 3 additions and 3 deletions
|
@ -118,11 +118,11 @@ public class ScoreController : ControllerBase
|
|||
Type = score.Type,
|
||||
Points = score.Points,
|
||||
SlotId = score.SlotId,
|
||||
ChildSlotId = score.ChildSlotId
|
||||
ChildSlotId = score.ChildSlotId,
|
||||
};
|
||||
|
||||
IQueryable<Score> 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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue