From b2021cf83a532cf61d2f42ad5448d03307876072 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 28 Aug 2016 11:28:49 +0100 Subject: mantis: 8006 remove duplication of attach script events. This is a temporary fix because TriggerOnAttach will not be trigger on attachment from inventory, (for now only Xengine connects to it on core). --- .../Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 8f03a0a..fe341c2 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -595,7 +595,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments } // Do this last so that event listeners have access to all the effects of the attachment - m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); + // this can't be done + // scripts do internal enqueue of attach even + // and not all scripts are loaded at this point +// m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); } return true; @@ -1318,7 +1321,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments AttachmentPt &= 0x7f; // Calls attach with a Zero position - if (AttachObject(sp, part.ParentGroup, AttachmentPt, false, true, append)) + SceneObjectGroup group = part.ParentGroup; + if (AttachObject(sp, group , AttachmentPt, false, true, append)) { if (DebugLevel > 0) m_log.Debug( @@ -1327,6 +1331,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments // Save avatar attachment information m_scene.AvatarFactory.QueueAppearanceSave(sp.UUID); + m_scene.EventManager.TriggerOnAttach(group.LocalId, group.FromItemID, sp.UUID); } } catch (Exception e) -- cgit v1.1