From 17d023ba5bb54f832adc8c0d4ba79b2a0e67c434 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Apr 2010 22:54:25 +0100 Subject: refactor: crudely move the RezMultipleAttachments() method into the AttachmentsModule --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 10 ---------- OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++---- 2 files changed, 4 insertions(+), 14 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') 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; using OpenMetaverse.Packets; using log4net; using OpenSim.Framework; - using OpenSim.Region.Framework; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes.Serialization; @@ -1875,15 +1874,6 @@ namespace OpenSim.Region.Framework.Scenes EventManager.TriggerOnAttach(localID, itemID, avatarID); } - public void RezMultipleAttachments(IClientAPI remoteClient, RezMultipleAttachmentsFromInvPacket.HeaderDataBlock header, - RezMultipleAttachmentsFromInvPacket.ObjectDataBlock[] objects) - { - foreach (RezMultipleAttachmentsFromInvPacket.ObjectDataBlock obj in objects) - { - AttachmentsModule.RezSingleAttachmentFromInventory(remoteClient, obj.ItemID, obj.AttachmentPt); - } - } - public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) { 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 } public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) - { - client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; + { client.OnObjectDetach += m_sceneGraph.DetachObject; if (AttachmentsModule != null) { client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; + client.OnRezMultipleAttachmentsFromInv += AttachmentsModule.RezMultipleAttachmentsFromInventory; client.OnObjectAttach += AttachmentsModule.AttachObject; client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; } @@ -2926,12 +2926,12 @@ namespace OpenSim.Region.Framework.Scenes public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) { - client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; client.OnObjectDetach -= m_sceneGraph.DetachObject; if (AttachmentsModule != null) { - client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; + client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; + client.OnRezMultipleAttachmentsFromInv -= AttachmentsModule.RezMultipleAttachmentsFromInventory; client.OnObjectAttach -= AttachmentsModule.AttachObject; client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; } -- cgit v1.1 From 45563e20e0167cd0349503919a96658ca119d11e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Apr 2010 22:57:44 +0100 Subject: minor: correctly print out missing item id when it can't be found rather than a NullReferenceException --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 4a286ac..a90c4b3 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -471,7 +471,6 @@ namespace OpenSim.Region.Framework.Scenes return null; } - if (recipientParentFolderId == UUID.Zero) { InventoryFolderBase recipientRootFolder = InventoryService.GetRootFolder(recipientId); -- cgit v1.1 From 57c293d604874c8033a602d1cea6f5250769ff14 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Apr 2010 23:15:13 +0100 Subject: refactor: crudely move DetachSingleAttachmentToGround() over to the AttachmentsModule --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 30 ---------------------- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 4 +-- 2 files changed, 1 insertion(+), 33 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index a90c4b3..e3f1636 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1873,36 +1873,6 @@ namespace OpenSim.Region.Framework.Scenes EventManager.TriggerOnAttach(localID, itemID, avatarID); } - public void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient) - { - SceneObjectPart part = GetSceneObjectPart(itemID); - if (part == null || part.ParentGroup == null) - return; - - UUID inventoryID = part.ParentGroup.GetFromItemID(); - - ScenePresence presence; - if (TryGetScenePresence(remoteClient.AgentId, out presence)) - { - if (!Permissions.CanRezObject(part.ParentGroup.Children.Count, remoteClient.AgentId, presence.AbsolutePosition)) - return; - - presence.Appearance.DetachAttachment(itemID); - IAvatarFactory ava = RequestModuleInterface(); - if (ava != null) - { - ava.UpdateDatabase(remoteClient.AgentId, presence.Appearance); - } - part.ParentGroup.DetachToGround(); - - List uuids = new List(); - uuids.Add(inventoryID); - InventoryService.DeleteItems(remoteClient.AgentId, uuids); - remoteClient.SendRemoveInventoryItem(inventoryID); - } - SendAttachEvent(part.ParentGroup.LocalId, itemID, UUID.Zero); - } - public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) { EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID); diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 23a4ee9..89eb54d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -443,9 +443,7 @@ namespace OpenSim.Region.Framework.Scenes { SceneObjectGroup group = GetGroupByPrim(objectLocalID); if (group != null) - { - m_parentScene.DetachSingleAttachmentToGround(group.UUID, remoteClient); - } + m_parentScene.AttachmentsModule.DetachSingleAttachmentToGround(group.UUID, remoteClient); } protected internal void DetachObject(uint objectLocalID, IClientAPI remoteClient) -- cgit v1.1 From ab3af43d5e363a47d103f75f8ee346f476dbe15d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 16 Apr 2010 23:29:36 +0100 Subject: refactor: remove now unused internal method SendAttachEvent() --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index e3f1636..7661068 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1868,11 +1868,6 @@ namespace OpenSim.Region.Framework.Scenes EventManager.TriggerStopScript(part.LocalId, itemID); } - internal void SendAttachEvent(uint localID, UUID itemID, UUID avatarID) - { - EventManager.TriggerOnAttach(localID, itemID, avatarID); - } - public void GetScriptRunning(IClientAPI controllingClient, UUID objectID, UUID itemID) { EventManager.TriggerGetScriptRunning(controllingClient, objectID, itemID); -- cgit v1.1 From 26e38842372e934937be36a21d8a99742cd485fe Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 17 Apr 2010 00:00:45 +0100 Subject: refactor: move DeatchObject() into the AttachmentsModule --- OpenSim/Region/Framework/Scenes/Scene.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index d4da2cb..a34f57e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -2769,14 +2769,13 @@ namespace OpenSim.Region.Framework.Scenes } public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) - { - client.OnObjectDetach += m_sceneGraph.DetachObject; - + { if (AttachmentsModule != null) { client.OnRezSingleAttachmentFromInv += AttachmentsModule.RezSingleAttachmentFromInventory; client.OnRezMultipleAttachmentsFromInv += AttachmentsModule.RezMultipleAttachmentsFromInventory; client.OnObjectAttach += AttachmentsModule.AttachObject; + client.OnObjectDetach += AttachmentsModule.DetachObject; client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; } } @@ -2925,14 +2924,13 @@ namespace OpenSim.Region.Framework.Scenes } public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) - { - client.OnObjectDetach -= m_sceneGraph.DetachObject; - + { if (AttachmentsModule != null) { client.OnRezSingleAttachmentFromInv -= AttachmentsModule.RezSingleAttachmentFromInventory; client.OnRezMultipleAttachmentsFromInv -= AttachmentsModule.RezMultipleAttachmentsFromInventory; client.OnObjectAttach -= AttachmentsModule.AttachObject; + client.OnObjectDetach -= AttachmentsModule.DetachObject; client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; } } -- cgit v1.1 From 21cad5d3ac68ceb4ac48346835ac087ecb107446 Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 19 Apr 2010 06:29:26 +0100 Subject: All scripts are now created suspended and are only unsuspended when the object is fully rezzed and all scripts in it are instantiated. This ensures that link messages will not be lost on rez/region crossing and makes heavily scripted objects reliable. --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 ++ OpenSim/Region/Framework/Scenes/Scene.cs | 2 +- OpenSim/Region/Framework/Scenes/SceneGraph.cs | 1 + .../Framework/Scenes/SceneObjectGroup.Inventory.cs | 8 +++++++ .../Framework/Scenes/SceneObjectPartInventory.cs | 25 +++++++++++++++++++++- .../Scenes/Serialization/SceneXmlLoader.cs | 1 + 6 files changed, 37 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 7661068..435026c 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -63,6 +63,7 @@ namespace OpenSim.Region.Framework.Scenes if (group is SceneObjectGroup) { ((SceneObjectGroup) group).CreateScriptInstances(0, false, DefaultScriptEngine, 0); + ((SceneObjectGroup) group).ResumeScripts(); } } } @@ -218,6 +219,7 @@ namespace OpenSim.Region.Framework.Scenes { remoteClient.SendAgentAlertMessage("Script saved", false); } + part.ParentGroup.ResumeScripts(); return errors; } diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a34f57e..57587be 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1131,7 +1131,6 @@ namespace OpenSim.Region.Framework.Scenes { if (m_scripts_enabled != !ScriptEngine) { - // Tedd! Here's the method to disable the scripting engine! if (ScriptEngine) { m_log.Info("Stopping all Scripts in Scene"); @@ -1153,6 +1152,7 @@ namespace OpenSim.Region.Framework.Scenes if (ent is SceneObjectGroup) { ((SceneObjectGroup)ent).CreateScriptInstances(0, false, DefaultScriptEngine, 0); + ((SceneObjectGroup)ent).ResumeScripts(); } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 89eb54d..1421d0e 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs @@ -1755,6 +1755,7 @@ namespace OpenSim.Region.Framework.Scenes copy.CreateScriptInstances(0, false, m_parentScene.DefaultScriptEngine, 0); copy.HasGroupChanged = true; copy.ScheduleGroupForFullUpdate(); + copy.ResumeScripts(); // required for physics to update it's position copy.AbsolutePosition = copy.AbsolutePosition; diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs index 4034744..f7e46af 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.Inventory.cs @@ -416,5 +416,13 @@ namespace OpenSim.Region.Framework.Scenes scriptModule.SetXMLState(itemID, n.OuterXml); } } + + public void ResumeScripts() + { + foreach (SceneObjectPart part in m_parts.Values) + { + part.Inventory.ResumeScripts(); + } + } } } diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 2e13f90..2b6be29 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -1042,5 +1042,28 @@ namespace OpenSim.Region.Framework.Scenes return ret; } + + public void ResumeScripts() + { + IScriptModule[] engines = m_part.ParentGroup.Scene.RequestModuleInterfaces(); + if (engines == null) + return; + + + lock (m_items) + { + foreach (TaskInventoryItem item in m_items.Values) + { + if (item.InvType == (int)InventoryType.LSL) + { + foreach (IScriptModule engine in engines) + { + if (engine != null) + engine.ResumeScript(item.ItemID); + } + } + } + } + } } -} \ No newline at end of file +} diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs index cf0f345..b6677f0 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneXmlLoader.cs @@ -182,6 +182,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization foreach (SceneObjectGroup sceneObject in sceneObjects) { sceneObject.CreateScriptInstances(0, true, scene.DefaultScriptEngine, 0); + sceneObject.ResumeScripts(); } } -- cgit v1.1 From b39db7e9e418877e765a3958c9a5b54506ed475d Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 19 Apr 2010 10:43:25 +0100 Subject: Also enable scripts rezzed into prims --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 435026c..97a0544 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1450,6 +1450,8 @@ namespace OpenSim.Region.Framework.Scenes destPart.Inventory.CreateScriptInstance(destTaskItem, start_param, false, DefaultScriptEngine, 0); } + destPart.ParentGroup.ResumeScripts(); + ScenePresence avatar; if (TryGetScenePresence(srcTaskItem.OwnerID, out avatar)) -- cgit v1.1 From 689b6477908ac6dba8e197dbf7d7187f8c1667b6 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Mon, 19 Apr 2010 12:54:33 +0200 Subject: And some more rez modes that weren't covered before --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 97a0544..ac9644e 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -1278,6 +1278,7 @@ namespace OpenSim.Region.Framework.Scenes // "Rezzed script {0} into prim local ID {1} for user {2}", // item.inventoryName, localID, remoteClient.Name); part.GetProperties(remoteClient); + part.ParentGroup.ResumeScripts(); } else { @@ -1347,6 +1348,7 @@ namespace OpenSim.Region.Framework.Scenes part.GetProperties(remoteClient); part.Inventory.CreateScriptInstance(taskItem, 0, false, DefaultScriptEngine, 0); + part.ParentGroup.ResumeScripts(); } } -- cgit v1.1 From 3e63ce6d9d30a15addb7e31aa1c42df47c9dd8fd Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 19 Apr 2010 15:29:35 +0100 Subject: Make script asset fetches synchronous. Script instantiation synchronization will not work if the instance is not created when the method returns. --- .../Framework/Scenes/SceneObjectPartInventory.cs | 52 ++++++++++------------ 1 file changed, 24 insertions(+), 28 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 2b6be29..68f0122 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -282,36 +282,32 @@ namespace OpenSim.Region.Framework.Scenes return; } - m_part.ParentGroup.Scene.AssetService.Get( - item.AssetID.ToString(), this, delegate(string id, object sender, AssetBase asset) - { - if (null == asset) - { - m_log.ErrorFormat( - "[PRIM INVENTORY]: " + - "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", - item.Name, item.ItemID, m_part.AbsolutePosition, - m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); - } - else - { - if (m_part.ParentGroup.m_savedScriptState != null) - RestoreSavedScriptState(item.OldItemID, item.ItemID); + AssetBase asset = m_part.ParentGroup.Scene.AssetService.Get(item.AssetID.ToString()); + if (null == asset) + { + m_log.ErrorFormat( + "[PRIM INVENTORY]: " + + "Couldn't start script {0}, {1} at {2} in {3} since asset ID {4} could not be found", + item.Name, item.ItemID, m_part.AbsolutePosition, + m_part.ParentGroup.Scene.RegionInfo.RegionName, item.AssetID); + } + else + { + if (m_part.ParentGroup.m_savedScriptState != null) + RestoreSavedScriptState(item.OldItemID, item.ItemID); - lock (m_items) - { - m_items[item.ItemID].PermsMask = 0; - m_items[item.ItemID].PermsGranter = UUID.Zero; - } - - string script = Utils.BytesToString(asset.Data); - m_part.ParentGroup.Scene.EventManager.TriggerRezScript( - m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); - m_part.ParentGroup.AddActiveScriptCount(1); - m_part.ScheduleFullUpdate(); - } + lock (m_items) + { + m_items[item.ItemID].PermsMask = 0; + m_items[item.ItemID].PermsGranter = UUID.Zero; } - ); + + string script = Utils.BytesToString(asset.Data); + m_part.ParentGroup.Scene.EventManager.TriggerRezScript( + m_part.LocalId, item.ItemID, script, startParam, postOnRez, engine, stateSource); + m_part.ParentGroup.AddActiveScriptCount(1); + m_part.ScheduleFullUpdate(); + } } } -- cgit v1.1 From 524a2a9e26794e2ed645d51c089be42633a782df Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 19 Apr 2010 21:25:59 +0100 Subject: Make the "notecard saved" text appear in the saver rather than the notecard owner, if the notecard is saved by a permitted group member This means moving the alert up to a place where the IClientAPI is available. One can also argue that such client messages shouldn't be sent directly from the scene data model --- OpenSim/Region/Framework/Scenes/Scene.Inventory.cs | 7 ++++++- OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs | 10 ---------- 2 files changed, 6 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes') diff --git a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs index 7661068..144de43 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.Inventory.cs @@ -201,7 +201,9 @@ namespace OpenSim.Region.Framework.Scenes // Update item with new asset item.AssetID = asset.FullID; - group.UpdateInventoryItem(item); + if (group.UpdateInventoryItem(item)) + remoteClient.SendAgentAlertMessage("Notecard saved", false); + part.GetProperties(remoteClient); // Trigger rerunning of script (use TriggerRezScript event, see RezScript) @@ -1224,7 +1226,10 @@ namespace OpenSim.Region.Framework.Scenes remoteClient, part, transactionID, currentItem); } if (part.Inventory.UpdateInventoryItem(itemInfo)) + { + remoteClient.SendAgentAlertMessage("Notecard saved", false); part.GetProperties(remoteClient); + } } } else diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs index 2e13f90..4b9a2ad 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPartInventory.cs @@ -630,16 +630,6 @@ namespace OpenSim.Region.Framework.Scenes { item.AssetID = m_items[item.ItemID].AssetID; } - else if ((InventoryType)item.Type == InventoryType.Notecard) - { - ScenePresence presence = m_part.ParentGroup.Scene.GetScenePresence(item.OwnerID); - - if (presence != null) - { - presence.ControllingClient.SendAgentAlertMessage( - "Notecard saved", false); - } - } m_items[item.ItemID] = item; m_inventorySerial++; -- cgit v1.1