예제 #1
0
        public Entity GetFirstEntityWithDataBlob(AuthenticationToken authToken, int typeIndex)
        {
            Entity entity = GetFirstEntityWithDataBlob(typeIndex);

            if (EntityAccessControl.IsAuthorized(Game, authToken, entity))
            {
                return(entity);
            }
            return(Entity.InvalidEntity);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }