示例#1
0
        private void persistObject(SceneObjectPart sop)
        {
            if (persistedObjects.Contains(sop.UUID))
            {
                return;
            }

            OpenSim.Framework.InventoryItemBase item = new InventoryItemBase();
            item.AssetID   = sop.UUID;
            item.AssetType = (int)AssetType.Object;
            item.Name      = sop.UUID.ToString();
            item.Owner     = sop.OwnerID;
            //item.ID =
            item.InvType = (int)sop.GetPrimType();
            item.Folder  = aarBox.RootPart.FolderID;
            item.CreatorIdentification = sop.CreatorIdentification;
            item.Description           = sop.Description;
            item.GroupID             = sop.GroupID;
            item.BasePermissions     = 0x7FFFFFFF;
            item.CurrentPermissions  = 0x7FFFFFFF;
            item.EveryOnePermissions = 0x7FFFFFFF;
            item.GroupPermissions    = 0x7FFFFFFF;
            item.NextPermissions     = 0x7FFFFFFF;
            aarBox.AddInventoryItem(UUID.Zero, aarBox.RootPart.LocalId, item, sop.UUID);
            persistedObjects.Add(sop.UUID);

            /*
             *
             * if (item.groupOwned == 0)
             * newItem.GroupOwned = false;
             * else
             * newItem.GroupOwned = true;
             * newItem.SalePrice = item.salePrice;
             * newItem.SaleType = (byte)item.saleType;
             * newItem.Flags = (uint)item.flags;
             * newItem.CreationDate = item.creationDate;
             */
        }