1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

continue working on per servver topstats

This commit is contained in:
RaidMax
2019-02-26 21:25:27 -06:00
parent 03c90aeae2
commit 1182b98336
15 changed files with 96 additions and 55 deletions

View File

@ -82,13 +82,13 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
}
}
public async Task<List<TopStatsInfo>> GetTopStats(int start, int count)
public async Task<List<TopStatsInfo>> GetTopStats(int start, int count, long? serverId = null)
{
using (var context = new DatabaseContext(true))
{
// setup the query for the clients within the given rating range
var iqClientRatings = (from rating in context.Set<EFRating>()
.Where(GetRankingFunc())
.Where(GetRankingFunc(serverId))
select new
{
rating.RatingHistory.ClientId,
@ -113,7 +113,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
var iqRatingInfo = from rating in context.Set<EFRating>()
where clientIds.Contains(rating.RatingHistory.ClientId)
where rating.ServerId == null
where rating.ServerId == serverId
select new
{
rating.Ranking,