huge commit for advanced stats feature.

broke data out into its own library.
may be breaking changes with existing plugins
This commit is contained in:
RaidMax
2021-03-22 11:09:25 -05:00
parent db2e1deb2f
commit c5375b661b
505 changed files with 13671 additions and 3271 deletions

View File

@ -6,6 +6,7 @@ using System.Globalization;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using SharedLibraryCore.Configuration;
using SharedLibraryCore.Interfaces;
using ILogger = Microsoft.Extensions.Logging.ILogger;
@ -24,12 +25,14 @@ namespace LiveRadar
private bool addedPage;
private readonly object lockObject = new object();
private readonly ILogger _logger;
private readonly ApplicationConfiguration _appConfig;
public Plugin(ILogger<Plugin> logger, IConfigurationHandlerFactory configurationHandlerFactory)
public Plugin(ILogger<Plugin> logger, IConfigurationHandlerFactory configurationHandlerFactory, ApplicationConfiguration appConfig)
{
_configurationHandler = configurationHandlerFactory.GetConfigurationHandler<LiveRadarConfiguration>("LiveRadarConfiguration");
_botGuidLookups = new Dictionary<string, long>();
_logger = logger;
_appConfig = appConfig;
}
public Task OnEventAsync(GameEvent E, Server S)
@ -64,6 +67,11 @@ namespace LiveRadar
{
try
{
if (((string) E.Extra).IsBotGuid() && _appConfig.IgnoreBots)
{
return Task.CompletedTask;
}
string botKey = $"BotGuid_{E.Extra}";
long generatedBotGuid;