Ejemplo n.º 1
0
        public Entity GetFirstEntityWithDataBlob(AuthenticationToken authToken, int typeIndex)
        {
            Entity entity = GetFirstEntityWithDataBlob(typeIndex);

            if (EntityAccessControl.IsAuthorized(Game, authToken, entity))
            {
                return(entity);
            }
            return(Entity.InvalidEntity);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }