コード例 #1
0
        public bool CanReturnObjects(ILandObject land, UUID user, List <SceneObjectGroup> objects)
        {
            bool result = true;

            ReturnObjectsHandler handler = OnReturnObjects;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                foreach (ReturnObjectsHandler h in list)
                {
                    if (h(land, user, objects, m_scene) == false)
                    {
                        result = false;
                        break;
                    }
                }
            }

            //            m_log.DebugFormat(
            //                "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}",
            //                user, objects.Count, land.LandData.Name, result);

            return(result);
        }
コード例 #2
0
        public bool CanReturnObjects(ILandObject land, UUID user, List <ISceneEntity> objects)
        {
            ReturnObjectsHandler handler = OnReturnObjects;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                return(list.Cast <ReturnObjectsHandler>().All(h => h(land, user, objects, m_scene) != false));
            }
            return(true);
        }
コード例 #3
0
        public bool CanReturnObjects(ILandObject land, UUID user, List <ISceneEntity> objects)
        {
            ReturnObjectsHandler handler = OnReturnObjects;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                foreach (ReturnObjectsHandler h in list)
                {
                    if (h(land, user, objects, m_scene) == false)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
コード例 #4
0
        public bool CanReturnObjects(ILandObject land, IClientAPI client, List <SceneObjectGroup> objects)
        {
            bool result = true;

            ReturnObjectsHandler handler = OnReturnObjects;

            if (handler != null)
            {
                if (objects == null)
                {
                    return(false);
                }

                ScenePresence sp = null;
                if (client != null && client.SceneAgent != null)
                {
                    sp = client.SceneAgent as ScenePresence;
                }

                Delegate[] list = handler.GetInvocationList();
                foreach (ReturnObjectsHandler h in list)
                {
                    if (h(land, sp, objects) == false)
                    {
                        result = false;
                        break;
                    }
                }
            }

//            m_log.DebugFormat(
//                "[SCENE PERMISSIONS]: CanReturnObjects() fired for user {0} for {1} objects on {2}, result {3}",
//                user, objects.Count, land.LandData.Name, result);

            return(result);
        }