diff options
author | Justin Clark-Casey (justincc) | 2010-04-16 22:54:25 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2010-04-16 22:54:25 +0100 |
commit | 17d023ba5bb54f832adc8c0d4ba79b2a0e67c434 (patch) | |
tree | 3a5668b3cbd8af6b31405e242db3fcf9ba00e7ab /OpenSim/Region/Framework | |
parent | minor: use the static ascii and utf8 encodings instead of instantiating our own (diff) | |
download | opensim-SC_OLD-17d023ba5bb54f832adc8c0d4ba79b2a0e67c434.zip opensim-SC_OLD-17d023ba5bb54f832adc8c0d4ba79b2a0e67c434.tar.gz opensim-SC_OLD-17d023ba5bb54f832adc8c0d4ba79b2a0e67c434.tar.bz2 opensim-SC_OLD-17d023ba5bb54f832adc8c0d4ba79b2a0e67c434.tar.xz |
refactor: crudely move the RezMultipleAttachments() method into the AttachmentsModule
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 8 |
3 files changed, 16 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index 0222b02..77e9a7e 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using OpenMetaverse; | 29 | using OpenMetaverse; |
30 | using OpenMetaverse.Packets; | ||
30 | using OpenSim.Framework; | 31 | using OpenSim.Framework; |
31 | using OpenSim.Region.Framework.Scenes; | 32 | using OpenSim.Region.Framework.Scenes; |
32 | 33 | ||
@@ -82,6 +83,17 @@ namespace OpenSim.Region.Framework.Interfaces | |||
82 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus); | 83 | IClientAPI remoteClient, UUID itemID, uint AttachmentPt, bool updateInventoryStatus); |
83 | 84 | ||
84 | /// <summary> | 85 | /// <summary> |
86 | /// Rez multiple attachments from a user's inventory | ||
87 | /// </summary> | ||
88 | /// <param name="remoteClient"></param> | ||
89 | /// <param name="header"></param> | ||
90 | /// <param name="objects"></param> | ||
91 | void RezMultipleAttachmentsFromInventory( | ||
92 | IClientAPI remoteClient, | ||
93 | RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, | ||
94 | RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects); | ||
95 | |||
96 | /// <summary> | ||
85 | /// Update the user inventory to the attachment of an item | 97 | /// Update the user inventory to the attachment of an item |
86 | /// </summary> | 98 | /// </summary> |
87 | /// <param name="att"></param> | 99 | /// <param name="att"></param> |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 7c68ef4..4a286ac 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | |||
@@ -35,7 +35,6 @@ using OpenMetaverse; | |||
35 | using OpenMetaverse.Packets; | 35 | using OpenMetaverse.Packets; |
36 | using log4net; | 36 | using log4net; |
37 | using OpenSim.Framework; | 37 | using OpenSim.Framework; |
38 | |||
39 | using OpenSim.Region.Framework; | 38 | using OpenSim.Region.Framework; |
40 | using OpenSim.Region.Framework.Interfaces; | 39 | using OpenSim.Region.Framework.Interfaces; |
41 | using OpenSim.Region.Framework.Scenes.Serialization; | 40 | using OpenSim.Region.Framework.Scenes.Serialization; |
@@ -1875,15 +1874,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1875 | EventManager.TriggerOnAttach(localID, itemID, avatarID); | 1874 | EventManager.TriggerOnAttach(localID, itemID, avatarID); |
1876 | } | 1875 | } |
1877 | 1876 | ||
1878 | public void RezMultipleAttachments(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, | ||
1879 | RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects) | ||
1880 | { | ||
1881 | foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in objects) | ||
1882 | { | ||
1883 | AttachmentsModule.RezSingleAttachmentFromInventory(remoteClient, obj.ItemID, obj.AttachmentPt); | ||
1884 | } | ||
1885 | } | ||
1886 | |||
1887 | public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) | 1877 | public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) |
1888 | { | 1878 | { |
1889 | SceneObjectPart part = GetSceneObjectPart(itemID); | 1879 | SceneObjectPart part = GetSceneObjectPart(itemID); |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 685a678..d4da2cb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2769,13 +2769,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
2769 | } | 2769 | } |
2770 | 2770 | ||
2771 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) | 2771 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) |
2772 | { | 2772 | { |
2773 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; | ||
2774 | client.OnObjectDetach += m_sceneGraph.DetachObject; | 2773 | client.OnObjectDetach += m_sceneGraph.DetachObject; |
2775 | 2774 | ||
2776 | if (AttachmentsModule != null) | 2775 | if (AttachmentsModule != null) |
2777 | { | 2776 | { |
2778 | client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; | 2777 | client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; |
2778 | client.OnRezMultipleAttachmentsFromInv += AttachmentsModule.RezMultipleAttachmentsFromInventory; | ||
2779 | client.OnObjectAttach += AttachmentsModule.AttachObject; | 2779 | client.OnObjectAttach += AttachmentsModule.AttachObject; |
2780 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; | 2780 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; |
2781 | } | 2781 | } |
@@ -2926,12 +2926,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2926 | 2926 | ||
2927 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) | 2927 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) |
2928 | { | 2928 | { |
2929 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; | ||
2930 | client.OnObjectDetach -= m_sceneGraph.DetachObject; | 2929 | client.OnObjectDetach -= m_sceneGraph.DetachObject; |
2931 | 2930 | ||
2932 | if (AttachmentsModule != null) | 2931 | if (AttachmentsModule != null) |
2933 | { | 2932 | { |
2934 | client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; | 2933 | client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; |
2934 | client.OnRezMultipleAttachmentsFromInv -= AttachmentsModule.RezMultipleAttachmentsFromInventory; | ||
2935 | client.OnObjectAttach -= AttachmentsModule.AttachObject; | 2935 | client.OnObjectAttach -= AttachmentsModule.AttachObject; |
2936 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; | 2936 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; |
2937 | } | 2937 | } |