/// <summary> /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. /// </summary> /// <param name="itemID"></param> /// <param name="userID"></param> /// <returns></returns> public bool CanEditUserInventory(UUID itemID, UUID userID) { EditUserInventoryHandler handler = OnEditUserInventory; if (handler != null) { Delegate[] list = handler.GetInvocationList(); return(list.Cast <EditUserInventoryHandler>().All(h => h(itemID, userID) != false)); } return(true); }
/// <summary> /// Check whether the specified user is allowed to edit the given inventory item within their own inventory. /// </summary> /// <param name="itemID"></param> /// <param name="userID"></param> /// <returns></returns> public bool CanEditUserInventory(UUID itemID, UUID userID) { EditUserInventoryHandler handler = OnEditUserInventory; if (handler != null) { Delegate[] list = handler.GetInvocationList(); foreach (EditUserInventoryHandler h in list) { if (h(itemID, userID) == false) { return(false); } } } return(true); }