/// <summary>
        ///     Check whether the specified user is allowed to directly create the given inventory type in a prim's
        ///     inventory (e.g. the New Script button in the 1.21 Linden Lab client).
        /// </summary>
        /// <param name="invType"></param>
        /// <param name="objectID"></param>
        /// <param name="userID"></param>
        /// <returns></returns>
        public bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID)
        {
            CreateObjectInventoryHandler handler = OnCreateObjectInventory;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                return(list.Cast <CreateObjectInventoryHandler>().All(h => h(invType, objectID, userID) != false));
            }
            return(true);
        }
示例#2
0
        /// Check whether the specified user is allowed to directly create the given inventory type in a prim's
        /// inventory (e.g. the New Script button in the 1.21 Linden Lab client).
        /// </summary>
        /// <param name="invType"></param>
        /// <param name="objectID"></param>
        /// <param name="userID"></param>
        /// <returns></returns>
        public bool CanCreateObjectInventory(int invType, UUID objectID, UUID userID)
        {
            CreateObjectInventoryHandler handler = OnCreateObjectInventory;

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