mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 23:31:13 -05:00
update stats plugin for server caching and better DI usage
This commit is contained in:
@ -8,7 +8,6 @@ using System.Threading.Tasks;
|
||||
using Data.Abstractions;
|
||||
using Data.Models.Client.Stats;
|
||||
using IW4MAdmin.Plugins.Stats.Helpers;
|
||||
using Stats.Config;
|
||||
|
||||
namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
@ -35,7 +34,7 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
{
|
||||
if (gameEvent.Origin.ClientNumber >= 0)
|
||||
{
|
||||
var serverId = Helpers.StatManager.GetIdForServer(gameEvent.Owner);
|
||||
var serverId = (gameEvent.Owner as IGameServer).LegacyDatabaseId;
|
||||
|
||||
await using var context = _contextFactory.CreateContext();
|
||||
var clientStats = await context.Set<EFClientStatistics>()
|
||||
|
Reference in New Issue
Block a user