mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 23:31:13 -05:00
refactor some event handling
add concept of blocking events
This commit is contained in:
@ -36,7 +36,7 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
clientStats.EloRating = 200.0;
|
||||
|
||||
// reset the cached version
|
||||
Plugin.Manager.ResetStats(E.Origin.ClientId, serverId);
|
||||
Plugin.Manager.ResetStats(E.Origin);
|
||||
|
||||
// fixme: this doesn't work properly when another context exists
|
||||
await ctx.SaveChangesAsync();
|
||||
|
@ -52,7 +52,7 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
|
||||
if (E.Owner.GetClientsAsList().Any(_client => _client.Equals(E.Target)))
|
||||
{
|
||||
pStats = Plugin.Manager.GetClientStats(E.Target.ClientId, serverId);
|
||||
pStats = E.Target.GetAdditionalProperty<EFClientStatistics>(StatManager.CLIENT_STATS_KEY);
|
||||
}
|
||||
|
||||
else
|
||||
@ -72,7 +72,7 @@ namespace IW4MAdmin.Plugins.Stats.Commands
|
||||
|
||||
if (E.Owner.GetClientsAsList().Any(_client => _client.Equals(E.Origin)))
|
||||
{
|
||||
pStats = Plugin.Manager.GetClientStats(E.Origin.ClientId, serverId);
|
||||
pStats = E.Origin.GetAdditionalProperty<EFClientStatistics>(StatManager.CLIENT_STATS_KEY);
|
||||
}
|
||||
|
||||
else
|
||||
|
Reference in New Issue
Block a user