OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs
/// <summary>
/// Remove an item from this prim's inventory
/// </summary>
/// <param name="itemID"></param>
/// <returns>Numeric asset type of the item removed.  Returns -1 if the item did not exist
/// in this prim's inventory.</returns>
Remove an item from this prim's inventory
Remove an item from this prim ' s inventory
public int RemoveInventoryItem(UUID itemID)
        {
            TaskInventoryItem item = GetInventoryItem(itemID);
            if (item != null)
            {
                int type = m_items[itemID].InvType;
                if (type == 10) 
                {
                    RemoveScriptInstance(itemID, false);
                }
                m_items.Remove(itemID);
                m_inventorySerial++;
                m_part.TriggerScriptChangedEvent(Changed.INVENTORY);
                HasInventoryChanged = true;
                m_part.ParentGroup.HasGroupChanged = true;
                if (!ContainsScripts())
                    m_part.RemFlag(PrimFlags.Scripted);
                m_part.ScheduleFullUpdate();
                return type;
            }
            else
            {
                m_log.ErrorFormat(
                    "[PRIM INVENTORY]: " +
                    "Tried to remove item ID {0} from prim {1}, {2} at {3} in {4} but the item does not exist in this inventory",
                    itemID, m_part.Name, m_part.UUID,
                    m_part.AbsolutePosition, m_part.ParentGroup.Scene.RegionInfo.RegionName);
            }
            return -1;
        }
public int RemoveInventoryItem ( UUID itemID ) { TaskInventoryItem item = GetInventoryItem ( itemID ) ; if ( item != null ) { int type = m_items [ itemID ] . InvType ; if ( type == 10 ) { RemoveScriptInstance ( itemID , false ) ; } m_items . Remove ( itemID ) ; m_inventorySerial ++ ; m_part . TriggerScriptChangedEvent ( Changed . INVENTORY ) ; HasInventoryChanged = true ; m_part . ParentGroup . HasGroupChanged = true ; if ( ! ContainsScripts ( ) ) m_part . RemFlag ( PrimFlags . Scripted ) ; m_part . ScheduleFullUpdate ( ) ; return type ; } else { m_log . ErrorFormat ( " " + " " , itemID , m_part . Name , m_part . UUID , m_part . AbsolutePosition , m_part . ParentGroup . Scene . RegionInfo . RegionName ) ; } return - 1 ; }
Remove an item from this prim's inventory
Remove an item from this prim ' s inventory
// Script // route it through here, to handle script cleanup tasks
Numeric asset type of the item removed.  Returns -1 if the item did not exist
in this prim's inventory.
Numeric asset type of the item removed . Returns - 1 if the item did not exist in this prim ' s inventory .
itemID
UUID
None