コード例 #1
0
        public bool CanDeleteObject(SceneObjectGroup sog, IClientAPI client)
        {
            bool result = true;

            DeleteObjectHandler handler = OnDeleteObject;

            if (handler != null)
            {
                if (sog == null || client == null || client.SceneAgent == null)
                {
                    return(false);
                }

                ScenePresence sp = client.SceneAgent as ScenePresence;

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

            return(result);
        }
コード例 #2
0
        public bool CanDeleteObject(UUID objectID, UUID deleter)
        {
            DeleteObjectHandler handler = OnDeleteObject;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                return(list.Cast <DeleteObjectHandler>().All(h => h(objectID, deleter, m_scene) != false));
            }
            return(true);
        }
コード例 #3
0
        public bool CanDeleteObject(UUID objectID, UUID deleter)
        {
            DeleteObjectHandler handler = OnDeleteObject;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                foreach (DeleteObjectHandler h in list)
                {
                    if (h(objectID, deleter, m_scene) == false)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }