From d10c79d4216436fd2a5056dbf853f317967202af Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 18 Nov 2007 13:50:46 +0000 Subject: first stab at implementation of CopyInventoryItem --- OpenSim/Framework/Communications/Cache/AssetCache.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Framework/Communications/Cache/AssetCache.cs') diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index 0ea33ff..99041c1 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs @@ -239,6 +239,17 @@ namespace OpenSim.Framework.Communications.Cache //Todo should delete it from memory too } + public AssetBase CopyAsset(LLUUID assetID) + { + AssetBase asset = GetAsset(assetID); + if (asset == null) + return null; + + asset.FullID = LLUUID.Random(); // TODO: check for conflicts + AddAsset(asset); + return asset; + } + /// /// /// -- cgit v1.1