aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.Inventory.cs21
1 files changed, 5 insertions, 16 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
index c44c4c7..c2b9e73 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
@@ -2351,12 +2351,6 @@ namespace OpenSim.Region.Framework.Scenes
2351 item = InventoryService.GetItem(item); 2351 item = InventoryService.GetItem(item);
2352 2352
2353 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); 2353 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
2354 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>();
2355 if (ava != null)
2356 {
2357 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2358 }
2359
2360 } 2354 }
2361 return att.UUID; 2355 return att.UUID;
2362 } 2356 }
@@ -2402,12 +2396,6 @@ namespace OpenSim.Region.Framework.Scenes
2402 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId); 2396 InventoryItemBase item = new InventoryItemBase(itemID, remoteClient.AgentId);
2403 item = InventoryService.GetItem(item); 2397 item = InventoryService.GetItem(item);
2404 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/); 2398 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, item.AssetID /*att.UUID*/);
2405
2406 if (m_AvatarFactory != null)
2407 {
2408 m_log.InfoFormat("[SCENE INVENTORY]: Saving avatar attachment. AgentID:{0} ItemID:{1} AttachmentPoint:{2}", remoteClient.AgentId, itemID, AttachmentPt);
2409 m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2410 }
2411 } 2399 }
2412 } 2400 }
2413 2401
@@ -2447,12 +2435,13 @@ namespace OpenSim.Region.Framework.Scenes
2447 if (TryGetAvatar(remoteClient.AgentId, out presence)) 2435 if (TryGetAvatar(remoteClient.AgentId, out presence))
2448 { 2436 {
2449 presence.Appearance.DetachAttachment(itemID); 2437 presence.Appearance.DetachAttachment(itemID);
2450 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>(); 2438
2451 if (ava != null) 2439 // Save avatar attachment information
2440 if (m_AvatarFactory != null)
2452 { 2441 {
2453 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance); 2442 m_log.Info("[SCENE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId + ", ItemID: " + itemID);
2443 m_AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2454 } 2444 }
2455
2456 } 2445 }
2457 2446
2458 m_sceneGraph.DetachSingleAttachmentToInv(itemID, remoteClient); 2447 m_sceneGraph.DetachSingleAttachmentToInv(itemID, remoteClient);