public Entity GetFirstEntityWithDataBlob(AuthenticationToken authToken, int typeIndex) { Entity entity = GetFirstEntityWithDataBlob(typeIndex); if (EntityAccessControl.IsAuthorized(Game, authToken, entity)) { return(entity); } return(Entity.InvalidEntity); }
public List <Entity> GetAllEntitiesWithOUTDataBlobs(AuthenticationToken authToken, [NotNull] ComparableBitArray dataBlobMask) { List <Entity> allEntities = GetAllEntitiesWithOUTDataBlobs(dataBlobMask); var authorizedEntities = new List <Entity>(); foreach (Entity entity in allEntities) { if (EntityAccessControl.IsAuthorized(Game, authToken, entity)) { authorizedEntities.Add(entity); } } return(authorizedEntities); }
public List <Entity> GetAllEntitiesWithDataBlob <T>(AuthenticationToken authToken) where T : BaseDataBlob { List <Entity> allEntities = GetAllEntitiesWithDataBlob <T>(); var authorizedEntities = new List <Entity>(); foreach (Entity entity in allEntities) { if (EntityAccessControl.IsAuthorized(Game, authToken, entity)) { authorizedEntities.Add(entity); } } return(authorizedEntities); }