1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-17 10:42:19 -05:00

update stats plugin for server caching and better DI usage

This commit is contained in:
RaidMax
2023-04-05 10:15:10 -05:00
parent ebe69a94ad
commit 8d2ac47756
8 changed files with 56 additions and 139 deletions

View File

@ -9,7 +9,6 @@ using Data.Models.Client.Stats;
using SharedLibraryCore.Database.Models;
using SharedLibraryCore.Configuration;
using SharedLibraryCore.Interfaces;
using IW4MAdmin.Plugins.Stats.Helpers;
using Stats.Config;
namespace IW4MAdmin.Plugins.Stats.Commands;
@ -33,7 +32,7 @@ class MostKillsCommand : Command
public override async Task ExecuteAsync(GameEvent gameEvent)
{
var mostKills = await GetMostKills(StatManager.GetIdForServer(gameEvent.Owner), _statsConfig,
var mostKills = await GetMostKills((gameEvent.Owner as IGameServer).LegacyDatabaseId, _statsConfig,
_contextFactory, _translationLookup);
if (!gameEvent.Message.IsBroadcastCommand(_config.BroadcastCommandPrefix))
{