protected void SaveInvItem(InventoryItemBase inventoryItem, string path) { string filename = path + CreateArchiveItemName(inventoryItem); InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone(); string serialization = UserInventoryItemSerializer.Serialize(saveItem); m_archiveWriter.WriteFile(filename, serialization); }
private InventoryItemBase CopyFrom(InventoryItemBase from, UUID newUserID, UUID defaultFolderID) { InventoryItemBase to = (InventoryItemBase)from.Clone(); to.Owner = newUserID; to.Folder = defaultFolderID; to.ID = UUID.Random(); return(to); }
protected void SaveInvItem(InventoryItemBase inventoryItem, string path) { string filename = path + CreateArchiveItemName(inventoryItem); // Record the creator of this item for user record purposes (which might go away soon) m_userUuids[inventoryItem.CreatorIdAsUuid] = 1; InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone(); saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_scene.UserAccountService); string serialization = UserInventoryItemSerializer.Serialize(saveItem); m_archiveWriter.WriteFile(filename, serialization); m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType)saveItem.AssetType, m_assetUuids); }
protected void SaveInvItem(InventoryItemBase inventoryItem, string path) { string filename = string.Format("{0}{1}_{2}.xml", path, inventoryItem.Name, inventoryItem.ID); // Record the creator of this item for user record purposes (which might go away soon) m_userUuids[inventoryItem.CreatorIdAsUuid] = 1; InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone(); saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_module.CommsManager); string serialization = UserInventoryItemSerializer.Serialize(saveItem); m_archiveWriter.WriteFile(filename, serialization); m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType)saveItem.AssetType, m_assetUuids); }
protected void SaveInvItem(InventoryItemBase inventoryItem, string path) { // Check For Permissions Filter Flags if (!CanUserArchiveObject(m_userInfo.PrincipalID, inventoryItem)) { MainConsole.Instance.InfoFormat( "[Inventory Archiver]: Insufficient permissions, skipping inventory item {0} {1} at {2}", inventoryItem.Name, inventoryItem.ID, path); // Count Items Excluded CountFiltered++; return; } string filename = path + CreateArchiveItemName(inventoryItem); // Record the creator of this item for user record purposes (which might go away soon) m_userUuids[inventoryItem.CreatorIdAsUuid] = 1; InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone(); saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_accountService); string serialization = UserInventoryItemSerializer.Serialize(saveItem); m_archiveWriter.WriteFile(filename, serialization); // m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType) saveItem.AssetType, m_assetUuids); AssetType itemAssetType = (AssetType)inventoryItem.AssetType; // Don't chase down link asset items as they actually point to their target item IDs rather than an asset if (m_saveAssets && itemAssetType != AssetType.Link && itemAssetType != AssetType.LinkFolder) { m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType)inventoryItem.AssetType, m_assetUuids); } }
protected void SaveInvItem(InventoryItemBase inventoryItem, string path) { string filename = path + CreateArchiveItemName(inventoryItem); // Record the creator of this item for user record purposes (which might go away soon) m_userUuids[inventoryItem.CreatorIdAsUuid] = 1; InventoryItemBase saveItem = (InventoryItemBase) inventoryItem.Clone(); saveItem.CreatorId = OspResolver.MakeOspa(saveItem.CreatorIdAsUuid, m_registry.RequestModuleInterface<IUserAccountService>()); string serialization = UserInventoryItemSerializer.Serialize(saveItem); m_archiveWriter.WriteFile(filename, serialization); m_assetGatherer.GatherAssetUuids(saveItem.AssetID, (AssetType) saveItem.AssetType, m_assetUuids, m_registry); }
protected void SaveInvItem(InventoryItemBase inventoryItem, string path) { string filename = path + CreateArchiveItemName (inventoryItem); InventoryItemBase saveItem = (InventoryItemBase)inventoryItem.Clone (); string serialization = UserInventoryItemSerializer.Serialize (saveItem); m_archiveWriter.WriteFile (filename, serialization); }