Package com.ngt.jopenmetaverse.shared.sim.inventory

Examples of com.ngt.jopenmetaverse.shared.sim.inventory.InventoryItem


    List<InventoryWearable> wearables = new ArrayList<InventoryWearable>();
    List<InventoryItem> attachments = new ArrayList<InventoryItem>();

    for (int i = 0; i < wearableItems.size(); i++)
    {
      InventoryItem item = wearableItems.get(i);
      if (item instanceof InventoryWearable)
        wearables.add((InventoryWearable)item);
      else if ((item instanceof InventoryAttachment) || (item instanceof InventoryObject))
        attachments.add(item);
    }
View Full Code Here


    List<InventoryWearable> wearables = new ArrayList<InventoryWearable>();
    List<InventoryItem> attachments = new ArrayList<InventoryItem>();

    for (int i = 0; i < wearableItems.size(); i++)
    {
      InventoryItem item = wearableItems.get(i);

      if (item instanceof InventoryWearable)
        wearables.add((InventoryWearable)item);
      else if (item instanceof InventoryAttachment || item instanceof InventoryObject)
        attachments.add(item);
View Full Code Here

    List<InventoryWearable> wearables = new ArrayList<InventoryWearable>();
    List<InventoryItem> attachments = new ArrayList<InventoryItem>();

    for (int i = 0; i < wearableItems.size(); i++)
    {
      InventoryItem item = wearableItems.get(i);

      if (item instanceof InventoryWearable)
        wearables.add((InventoryWearable)item);
      else if (item instanceof InventoryAttachment || item instanceof InventoryObject)
        attachments.add(item);
View Full Code Here

            {
                output.append("{\n");

                for (int i = 0; i < EmbeddedItems.size(); i++)
                {
                    InventoryItem item = EmbeddedItems.get(i);

                    output.append("ext char index " + i + "\n");

                    output.append("\tinv_item\t0\n");
                    output.append("\t{\n");
View Full Code Here

                        else if (key.equals("creation_date"))
                        {
                            creationDate = Utils.unixTimeToDate(Integer.parseInt(val.toString()));
                        }
                    }
                    InventoryItem finalEmbedded = InventoryManager.CreateInventoryItem(inventoryType, uuid);

                    finalEmbedded.CreatorID = creatorID;
                    finalEmbedded.OwnerID = ownerID;
                    finalEmbedded.LastOwnerID = lastOwnerID;
                    finalEmbedded.GroupID = groupID;
View Full Code Here

  /// <returns>An <seealso cref="InventoryItem"/> object on success, or null if no item was found</returns>
  /// <remarks>Items will also be sent to the <seealso cref="InventoryManager.OnItemReceived"/> event</remarks>
  public InventoryItem FetchItem(final UUID itemID, UUID ownerID, int timeoutMS) throws InterruptedException
  {
    final AutoResetEvent fetchEvent = new AutoResetEvent(false);
    InventoryItem fetchedItem = null;

    final InventoryItem[] fetchedItemArray = new InventoryItem[]{null};
    EventObserver<ItemReceivedEventArgs> callback =
        new EventObserver<ItemReceivedEventArgs>()
        {
View Full Code Here

                    InventoryType type = InventoryType.get((byte)descItem.get("inv_type").asInteger());
                    if (type == InventoryType.Texture && (AssetType.get((byte)descItem.get("type").asInteger()) == AssetType.Object))
                    {
                      type = InventoryType.Attachment;
                    }
                    InventoryItem item = CreateInventoryItem(type, descItem.get("item_id").asUUID());

                    item.ParentUUID = descItem.get("parent_id").asUUID();
                    item.Name = descItem.get("name").asString();
                    item.Description = descItem.get("desc").asString();
                    item.OwnerID = descItem.get("agent_id").asUUID();
View Full Code Here

      InventoryFolder folder = (InventoryFolder)bse;
      CreateLink(folderID, folder, callback);
    }
    else if (bse instanceof InventoryItem)
    {
      InventoryItem item = (InventoryItem)bse;
      CreateLink(folderID, item.UUID, item.Name, item.Description, AssetType.Link, item.InventoryType, UUID.Random(), callback);
    }
  }
View Full Code Here

    update.AgentData.TransactionID = transactionID;

    update.InventoryData = new UpdateInventoryItemPacket.InventoryDataBlock[items.size()];
    for (int i = 0; i < items.size(); i++)
    {
      InventoryItem item = items.get(i);

      UpdateInventoryItemPacket.InventoryDataBlock block = new UpdateInventoryItemPacket.InventoryDataBlock();
      block.BaseMask = (long)PermissionMask.getIndex(item.Permissions.BaseMask);
      block.CRC = ItemCRC(item);
      //TODO need to check if the data should be in Integer
View Full Code Here

    Client.network.SendPacket(add, simulator);

    // Remove from store if the item is no copy
    if (_Store.Items.containsKey(item.UUID) && _Store.get(item.UUID) instanceof InventoryItem)
    {
      InventoryItem invItem = (InventoryItem)_Store.get(item.UUID);
      if ((PermissionMask.getIndex(invItem.Permissions.OwnerMask) & PermissionMask.Copy.getIndex()) == PermissionMask.None.getIndex())
      {
        _Store.RemoveNodeFor(invItem);
      }
    }
View Full Code Here

TOP

Related Classes of com.ngt.jopenmetaverse.shared.sim.inventory.InventoryItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.