public bool CanEditObject(UUID objectID, UUID editorID)
        {
            EditObjectHandler handler = OnEditObject;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                return(list.Cast <EditObjectHandler>().All(h => h(objectID, editorID, m_scene) != false));
            }
            return(true);
        }
Beispiel #2
0
        public bool CanEditObject(UUID objectID, UUID editorID)
        {
            EditObjectHandler handler = OnEditObject;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                foreach (EditObjectHandler h in list)
                {
                    if (h(objectID, editorID, m_scene) == false)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
        public bool CanEditObject(SceneObjectGroup sog, IClientAPI client)
        {
            EditObjectHandler handler = OnEditObject;

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

                ScenePresence sp = client.SceneAgent as ScenePresence;

                Delegate[] list = handler.GetInvocationList();
                foreach (EditObjectHandler h in list)
                {
                    if (h(sog, sp) == false)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }