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,7 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using System.Threading.Tasks;
using static SharedLibraryCore.Database.Models.EFClient;
using Data.Models.Client;
using static SharedLibraryCore.GameEvent;
namespace WebfrontCore.Middleware
@ -36,10 +36,10 @@ namespace WebfrontCore.Middleware
private void OnGameEvent(object sender, GameEvent gameEvent)
{
if (gameEvent.Type == EventType.ChangePermission &&
gameEvent.Extra is Permission perm)
gameEvent.Extra is EFClient.Permission perm)
{
// we want to remove the claims when the client is demoted
if (perm < Permission.Trusted)
if (perm < EFClient.Permission.Trusted)
{
lock (_privilegedClientIds)
{
@ -47,7 +47,7 @@ namespace WebfrontCore.Middleware
}
}
// and add if promoted
else if (perm > Permission.Trusted &&
else if (perm > EFClient.Permission.Trusted &&
!_privilegedClientIds.Contains(gameEvent.Target.ClientId))
{
lock (_privilegedClientIds)