diff options
author | Justin Clarke Casey | 2008-02-13 00:30:51 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-02-13 00:30:51 +0000 |
commit | 365cf8e4555e5105d669f3ebf11d3fb5b563f9a8 (patch) | |
tree | 9638bc100d59257eba64735bb6ff08b511040e5d /OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs | |
parent | Refactor: factor a method out of AgentAssetTransactionsManager (diff) | |
download | opensim-SC-365cf8e4555e5105d669f3ebf11d3fb5b563f9a8.zip opensim-SC-365cf8e4555e5105d669f3ebf11d3fb5b563f9a8.tar.gz opensim-SC-365cf8e4555e5105d669f3ebf11d3fb5b563f9a8.tar.bz2 opensim-SC-365cf8e4555e5105d669f3ebf11d3fb5b563f9a8.tar.xz |
* Refactor: Move last commit's refactor back to AgentAssetTransactionsManager
* Push asset update (invoked when clothing is altered) down into AgentAssetTransactions from Scene.Inventory.cs to join others
* I've tested that clothing creation and update still works, but please let me know if it suddently breaks for you.
* Add/correct comments
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs b/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs index e74a06b..92390b5 100644 --- a/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs +++ b/OpenSim/Framework/Communications/Cache/AgentAssetTransactions.cs | |||
@@ -136,6 +136,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
136 | wearableType, nextOwnerMask); | 136 | wearableType, nextOwnerMask); |
137 | } | 137 | } |
138 | } | 138 | } |
139 | |||
140 | public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, | ||
141 | InventoryItemBase item) | ||
142 | { | ||
143 | if (XferUploaders.ContainsKey(transactionID)) | ||
144 | { | ||
145 | XferUploaders[transactionID].RequestUpdateInventoryItem(remoteClient, transactionID, item); | ||
146 | } | ||
147 | } | ||
139 | 148 | ||
140 | /// <summary> | 149 | /// <summary> |
141 | /// Get an uploaded asset. If the data is successfully retrieved, the transaction will be removed. | 150 | /// Get an uploaded asset. If the data is successfully retrieved, the transaction will be removed. |
@@ -351,6 +360,44 @@ namespace OpenSim.Framework.Communications.Cache | |||
351 | } | 360 | } |
352 | } | 361 | } |
353 | } | 362 | } |
363 | |||
364 | public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, | ||
365 | InventoryItemBase item) | ||
366 | { | ||
367 | if (TransactionID == transactionID) | ||
368 | { | ||
369 | CachedUserInfo userInfo = | ||
370 | m_userTransactions.Manager.CommsManager.UserProfileCacheService.GetUserDetails( | ||
371 | remoteClient.AgentId); | ||
372 | |||
373 | if (userInfo != null) | ||
374 | { | ||
375 | LLUUID assetID = LLUUID.Combine(transactionID, remoteClient.SecureSessionId); | ||
376 | |||
377 | AssetBase asset | ||
378 | = m_userTransactions.Manager.CommsManager.AssetCache.GetAsset( | ||
379 | assetID, (item.assetType == (int) AssetType.Texture ? true : false)); | ||
380 | |||
381 | if (asset == null) | ||
382 | { | ||
383 | asset = m_userTransactions.GetTransactionAsset(transactionID); | ||
384 | } | ||
385 | |||
386 | if (asset != null && asset.FullID == assetID) | ||
387 | { | ||
388 | asset.Name = item.inventoryName; | ||
389 | asset.Description = item.inventoryDescription; | ||
390 | asset.InvType = (sbyte) item.invType; | ||
391 | asset.Type = (sbyte) item.assetType; | ||
392 | item.assetID = asset.FullID; | ||
393 | |||
394 | m_userTransactions.Manager.CommsManager.AssetCache.AddAsset(Asset); | ||
395 | } | ||
396 | |||
397 | userInfo.UpdateItem(remoteClient.AgentId, item); | ||
398 | } | ||
399 | } | ||
400 | } | ||
354 | 401 | ||
355 | private void DoCreateItem() | 402 | private void DoCreateItem() |
356 | { | 403 | { |