/// <summary> /// Delete an item from the user's inventory /// /// If the inventory service has not yet delievered the inventory /// for this user then the request will be queued. /// </summary> /// <param name="item"></param> /// <returns> /// true on a successful delete or a if the request is queued. /// Returns false on an immediate failure /// </returns> public bool DeleteItem(InventoryItemBase item) { IInventoryProviderSelector selector = ProviderRegistry.Instance.Get <IInventoryProviderSelector>(); IInventoryStorage provider = selector.GetProvider(item.Owner); provider.PurgeItem(item); return(true); }
public void PurgeItem(UUID userId, UUID itemId) { InventoryItemBase item = _storage.GetItem(itemId, UUID.Zero); if (item.Owner != userId) { throw new InventorySecurityException(String.Format("Not purging item {0} for user {1}. User does not own the item", item.ID, userId)); } _storage.PurgeItem(item); }