aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-08-19 02:12:40 +0000
committerMelanie Thielker2008-08-19 02:12:40 +0000
commit6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611 (patch)
tree349f4db157d3776b5f8491ba230f5400b27551a4 /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parent* If two regions have configuration information that conflicts (save xy locat... (diff)
downloadopensim-SC-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.zip
opensim-SC-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.tar.gz
opensim-SC-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.tar.bz2
opensim-SC-6d2e1ad6ba73fb0eba51b3885ff0a4d7d1b5d611.tar.xz
Attachment persistence!!! Patch #9169 (Mantis #1171)
Attachments now save to MySQL. No reattach on login yet.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index 0148d76..784d04c 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -2316,5 +2316,48 @@ namespace OpenSim.Region.Environment.Scenes
2316// 2316//
2317// imod.TestFunction(); 2317// imod.TestFunction();
2318// } 2318// }
2319
2320 public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID,
2321 uint AttachmentPt, uint ItemFlags, uint NextOwnerMask)
2322 {
2323 SceneObjectGroup att = m_innerScene.RezSingleAttachment(remoteClient, itemID, AttachmentPt, ItemFlags, NextOwnerMask);
2324
2325 if (att == null)
2326 {
2327 DetachSingleAttachmentToInv(itemID, remoteClient);
2328 return;
2329 }
2330
2331 if (att.RootPart != null)
2332 AttachmentPt = att.RootPart.AttachmentPoint;
2333
2334 ScenePresence presence;
2335 if(TryGetAvatar(remoteClient.AgentId, out presence))
2336 {
2337 presence.Appearance.SetAttachment((int)AttachmentPt, itemID, att.GetFromAssetID());
2338 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>();
2339 if(ava != null)
2340 {
2341 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2342 }
2343
2344 }
2345 }
2346
2347 public void DetachSingleAttachmentToInv(LLUUID itemID, IClientAPI remoteClient)
2348 {
2349 ScenePresence presence;
2350 if(TryGetAvatar(remoteClient.AgentId, out presence))
2351 {
2352 presence.Appearance.DetachAttachment(itemID);
2353 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>();
2354 if(ava != null)
2355 {
2356 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2357 }
2358
2359 }
2360 m_innerScene.DetachSingleAttachmentToInv(itemID, remoteClient);
2361 }
2319 } 2362 }
2320} 2363}