diff options
author | Melanie | 2012-04-07 04:52:14 +0100 |
---|---|---|
committer | Melanie | 2012-04-07 04:52:14 +0100 |
commit | b39de2425cac4c2a94a7fdd6c77100ef831d66b4 (patch) | |
tree | 9258928681a82d68b408354e534c32bcf283ad3a /OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |
parent | Merge branch 'ubitwork' (diff) | |
parent | Merge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff) | |
download | opensim-SC-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.zip opensim-SC-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.gz opensim-SC-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.bz2 opensim-SC-b39de2425cac4c2a94a7fdd6c77100ef831d66b4.tar.xz |
Merge branch 'master' into careminster
Conflicts:
OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
OpenSim/Region/CoreModules/World/Land/LandObject.cs
OpenSim/Region/Framework/Scenes/Scene.Inventory.cs
OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index c5cec59..78ae5e9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -285,7 +285,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
285 | // At the moment we can only deal with a single attachment | 285 | // At the moment we can only deal with a single attachment |
286 | if (attachments.Count != 0) | 286 | if (attachments.Count != 0) |
287 | { | 287 | { |
288 | UUID oldAttachmentItemID = attachments[0].GetFromItemID(); | 288 | UUID oldAttachmentItemID = attachments[0].FromItemID; |
289 | 289 | ||
290 | if (oldAttachmentItemID != UUID.Zero) | 290 | if (oldAttachmentItemID != UUID.Zero) |
291 | DetachSingleAttachmentToInvInternal(sp, oldAttachmentItemID); | 291 | DetachSingleAttachmentToInvInternal(sp, oldAttachmentItemID); |
@@ -296,7 +296,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
296 | } | 296 | } |
297 | 297 | ||
298 | // Add the new attachment to inventory if we don't already have it. | 298 | // Add the new attachment to inventory if we don't already have it. |
299 | UUID newAttachmentItemID = group.GetFromItemID(); | 299 | UUID newAttachmentItemID = group.FromItemID; |
300 | if (newAttachmentItemID == UUID.Zero) | 300 | if (newAttachmentItemID == UUID.Zero) |
301 | newAttachmentItemID = AddSceneObjectAsNewAttachmentInInv(sp, group).ID; | 301 | newAttachmentItemID = AddSceneObjectAsNewAttachmentInInv(sp, group).ID; |
302 | 302 | ||
@@ -336,7 +336,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
336 | List<SceneObjectGroup> existingAttachments = sp.GetAttachments(); | 336 | List<SceneObjectGroup> existingAttachments = sp.GetAttachments(); |
337 | foreach (SceneObjectGroup so in existingAttachments) | 337 | foreach (SceneObjectGroup so in existingAttachments) |
338 | { | 338 | { |
339 | if (so.GetFromItemID() == itemID) | 339 | if (so.FromItemID == itemID) |
340 | { | 340 | { |
341 | alreadyOn = true; | 341 | alreadyOn = true; |
342 | break; | 342 | break; |
@@ -393,7 +393,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
393 | if (so.AttachedAvatar != sp.UUID) | 393 | if (so.AttachedAvatar != sp.UUID) |
394 | return; | 394 | return; |
395 | 395 | ||
396 | UUID inventoryID = so.GetFromItemID(); | 396 | UUID inventoryID = so.FromItemID; |
397 | 397 | ||
398 | // m_log.DebugFormat( | 398 | // m_log.DebugFormat( |
399 | // "[ATTACHMENTS MODULE]: In DetachSingleAttachmentToGround(), object is {0} {1}, associated item is {2}", | 399 | // "[ATTACHMENTS MODULE]: In DetachSingleAttachmentToGround(), object is {0} {1}, associated item is {2}", |
@@ -410,9 +410,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
410 | m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); | 410 | m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); |
411 | 411 | ||
412 | sp.RemoveAttachment(so); | 412 | sp.RemoveAttachment(so); |
413 | so.FromItemID = UUID.Zero; | ||
413 | 414 | ||
414 | SceneObjectPart rootPart = so.RootPart; | 415 | SceneObjectPart rootPart = so.RootPart; |
415 | rootPart.FromItemID = UUID.Zero; | ||
416 | so.AbsolutePosition = sp.AbsolutePosition; | 416 | so.AbsolutePosition = sp.AbsolutePosition; |
417 | so.AttachedAvatar = UUID.Zero; | 417 | so.AttachedAvatar = UUID.Zero; |
418 | rootPart.SetParentLocalId(0); | 418 | rootPart.SetParentLocalId(0); |
@@ -526,7 +526,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
526 | 526 | ||
527 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp); | 527 | string sceneObjectXml = SceneObjectSerializer.ToOriginalXmlFormat(grp); |
528 | 528 | ||
529 | InventoryItemBase item = new InventoryItemBase(grp.GetFromItemID(), sp.UUID); | 529 | InventoryItemBase item = new InventoryItemBase(grp.FromItemID, sp.UUID); |
530 | item = m_scene.InventoryService.GetItem(item); | 530 | item = m_scene.InventoryService.GetItem(item); |
531 | 531 | ||
532 | if (item != null) | 532 | if (item != null) |
@@ -698,7 +698,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
698 | item.CreationDate = Util.UnixTimeSinceEpoch(); | 698 | item.CreationDate = Util.UnixTimeSinceEpoch(); |
699 | 699 | ||
700 | // sets itemID so client can show item as 'attached' in inventory | 700 | // sets itemID so client can show item as 'attached' in inventory |
701 | grp.SetFromItemID(item.ID); | 701 | grp.FromItemID = item.ID; |
702 | 702 | ||
703 | if (m_scene.AddInventoryItem(item)) | 703 | if (m_scene.AddInventoryItem(item)) |
704 | { | 704 | { |
@@ -734,7 +734,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
734 | if (entity is SceneObjectGroup) | 734 | if (entity is SceneObjectGroup) |
735 | { | 735 | { |
736 | group = (SceneObjectGroup)entity; | 736 | group = (SceneObjectGroup)entity; |
737 | if (group.GetFromItemID() == itemID) | 737 | if (group.FromItemID == itemID) |
738 | { | 738 | { |
739 | m_scene.EventManager.TriggerOnAttach(group.LocalId, itemID, UUID.Zero); | 739 | m_scene.EventManager.TriggerOnAttach(group.LocalId, itemID, UUID.Zero); |
740 | sp.RemoveAttachment(group); | 740 | sp.RemoveAttachment(group); |
@@ -946,7 +946,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
946 | // Calls attach with a Zero position | 946 | // Calls attach with a Zero position |
947 | if (AttachObject(sp, part.ParentGroup, AttachmentPt, false)) | 947 | if (AttachObject(sp, part.ParentGroup, AttachmentPt, false)) |
948 | { | 948 | { |
949 | m_scene.EventManager.TriggerOnAttach(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId); | 949 | m_scene.EventManager.TriggerOnAttach(objectLocalID, part.ParentGroup.FromItemID, remoteClient.AgentId); |
950 | 950 | ||
951 | // Save avatar attachment information | 951 | // Save avatar attachment information |
952 | m_log.Debug( | 952 | m_log.Debug( |
@@ -969,7 +969,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
969 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); | 969 | ScenePresence sp = m_scene.GetScenePresence(remoteClient.AgentId); |
970 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); | 970 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); |
971 | if (sp != null && group != null) | 971 | if (sp != null && group != null) |
972 | DetachSingleAttachmentToInv(sp, group.GetFromItemID()); | 972 | DetachSingleAttachmentToInv(sp, group.FromItemID); |
973 | } | 973 | } |
974 | 974 | ||
975 | private void Client_OnDetachAttachmentIntoInv(UUID itemID, IClientAPI remoteClient) | 975 | private void Client_OnDetachAttachmentIntoInv(UUID itemID, IClientAPI remoteClient) |