aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
authorMelanie Thielker2008-10-04 01:09:22 +0000
committerMelanie Thielker2008-10-04 01:09:22 +0000
commit74f89fb22da159a940e942192d0cb59163e78987 (patch)
treed7fc5ace338e6e07c6b6785a5fb4ee308a08bcec /OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
parentAdd the missing bits for the new region-search: (diff)
downloadopensim-SC-74f89fb22da159a940e942192d0cb59163e78987.zip
opensim-SC-74f89fb22da159a940e942192d0cb59163e78987.tar.gz
opensim-SC-74f89fb22da159a940e942192d0cb59163e78987.tar.bz2
opensim-SC-74f89fb22da159a940e942192d0cb59163e78987.tar.xz
Add "Drop" functionality to pie menu
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index a7bce49..c139fd9 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -2293,6 +2293,37 @@ namespace OpenSim.Region.Environment.Scenes
2293 m_innerScene.AttachObject(controllingClient, localID, attachPoint, rot, pos); 2293 m_innerScene.AttachObject(controllingClient, localID, attachPoint, rot, pos);
2294 } 2294 }
2295 2295
2296 public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient)
2297 {
2298 SceneObjectPart part = GetSceneObjectPart(itemID);
2299 if(part == null || part.ParentGroup == null)
2300 return;
2301
2302 UUID inventoryID = part.ParentGroup.GetFromAssetID();
2303
2304 ScenePresence presence;
2305 if (TryGetAvatar(remoteClient.AgentId, out presence))
2306 {
2307 if(!ExternalChecks.ExternalChecksCanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition))
2308 return;
2309
2310 presence.Appearance.DetachAttachment(itemID);
2311 IAvatarFactory ava = RequestModuleInterface<IAvatarFactory>();
2312 if (ava != null)
2313 {
2314 ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
2315 }
2316 part.ParentGroup.DetachToGround();
2317 CachedUserInfo userInfo =
2318 CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId);
2319 if (userInfo != null)
2320 {
2321 userInfo.DeleteItem(inventoryID);
2322 remoteClient.SendRemoveInventoryItem(inventoryID);
2323 }
2324 }
2325 }
2326
2296 public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient) 2327 public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient)
2297 { 2328 {
2298 ScenePresence presence; 2329 ScenePresence presence;