top stats info is per server instead of total when selecting each tab

fix issue with ingame name failing to match when using color codes
only show live radar for servers that support it
This commit is contained in:
RaidMax
2019-08-10 09:08:26 -05:00
parent a0266c5e69
commit 85d88815f1
6 changed files with 47 additions and 11 deletions

View File

@ -132,6 +132,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
var iqStatsInfo = (from stat in context.Set<EFClientStatistics>()
where clientIds.Contains(stat.ClientId)
where stat.Kills > 0 || stat.Deaths > 0
where serverId == null ? true : stat.ServerId == serverId
group stat by stat.ClientId into s
select new
{
@ -139,7 +140,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
Kills = s.Sum(c => c.Kills),
Deaths = s.Sum(c => c.Deaths),
KDR = s.Sum(c => (c.Kills / (double)(c.Deaths == 0 ? 1 : c.Deaths)) * c.TimePlayed) / s.Sum(c => c.TimePlayed),
TotalTimePlayed = s.Sum(c => c.TimePlayed)
TotalTimePlayed = s.Sum(c => c.TimePlayed),
});
#if DEBUG == true