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