aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-02-13 00:30:51 +0000
committerJustin Clarke Casey2008-02-13 00:30:51 +0000
commit365cf8e4555e5105d669f3ebf11d3fb5b563f9a8 (patch)
tree9638bc100d59257eba64735bb6ff08b511040e5d /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentRefactor: factor a method out of AgentAssetTransactionsManager (diff)
downloadopensim-SC_OLD-365cf8e4555e5105d669f3ebf11d3fb5b563f9a8.zip
opensim-SC_OLD-365cf8e4555e5105d669f3ebf11d3fb5b563f9a8.tar.gz
opensim-SC_OLD-365cf8e4555e5105d669f3ebf11d3fb5b563f9a8.tar.bz2
opensim-SC_OLD-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/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs49
1 files changed, 6 insertions, 43 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 0dc3139..6800d5f 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -253,6 +253,7 @@ namespace OpenSim.Region.Environment.Scenes
253 if (userInfo != null && userInfo.RootFolder != null) 253 if (userInfo != null && userInfo.RootFolder != null)
254 { 254 {
255 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); 255 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
256
256 if (item != null) 257 if (item != null)
257 { 258 {
258 if (LLUUID.Zero == transactionID) 259 if (LLUUID.Zero == transactionID)
@@ -265,34 +266,8 @@ namespace OpenSim.Region.Environment.Scenes
265 } 266 }
266 else 267 else
267 { 268 {
268 AgentAssetTransactions transactions 269 CommsManager.TransactionsManager.HandleItemUpdateFromTransaction(
269 = CommsManager.TransactionsManager.GetUserTransactions(remoteClient.AgentId); 270 remoteClient, transactionID, item);
270
271 if (transactions != null)
272 {
273 LLUUID assetID = LLUUID.Combine(transactionID, remoteClient.SecureSessionId);
274 AssetBase asset
275 = AssetCache.GetAsset(
276 assetID, (item.assetType == (int) AssetType.Texture ? true : false));
277
278 if (asset == null)
279 {
280 asset = transactions.GetTransactionAsset(transactionID);
281 }
282
283 if (asset != null && asset.FullID == assetID)
284 {
285 asset.Name = item.inventoryName;
286 asset.Description = item.inventoryDescription;
287 asset.InvType = (sbyte) item.invType;
288 asset.Type = (sbyte) item.assetType;
289 item.assetID = asset.FullID;
290
291 AssetCache.AddAsset(asset);
292 }
293
294 userInfo.UpdateItem(remoteClient.AgentId, item);
295 }
296 } 271 }
297 } 272 }
298 else 273 else
@@ -484,21 +459,9 @@ namespace OpenSim.Region.Environment.Scenes
484 } 459 }
485 else 460 else
486 { 461 {
487 AgentAssetTransactions transactions 462 CommsManager.TransactionsManager.HandleItemCreationFromTransaction(
488 = CommsManager.TransactionsManager.GetUserTransactions(remoteClient.AgentId); 463 remoteClient, transactionID, folderID, callbackID, description,
489 464 name, invType, assetType, wearableType, nextOwnerMask);
490 if (transactions != null)
491 {
492 transactions.RequestCreateInventoryItem(
493 remoteClient, transactionID, folderID, callbackID, description,
494 name, invType, assetType, wearableType, nextOwnerMask);
495 }
496 else
497 {
498 m_log.ErrorFormat(
499 "Agent asset transactions for agent {0} uuid {1} in transaction uuid {2} unexpectedly null!",
500 remoteClient.Name, remoteClient.AgentId, transactionID);
501 }
502 } 465 }
503 } 466 }
504 467