From 6f19e231b69377e312425bfae284cc8de40ce0fb Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 7 Jan 2012 12:06:21 +0100 Subject: Don't try to save a NPCs attachment states on NPC delete --- .../Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 280fdc7..2142d02 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs @@ -462,6 +462,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments /// private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp) { + // Saving attachments for NPCs messes them up for the real owner! + INPCModule module = m_scene.RequestModuleInterface(); + if (module != null) + { + if (module.IsNPC(sp.UUID, m_scene)) + return; + } + if (grp.HasGroupChanged || grp.ContainsScripts()) { m_log.DebugFormat( -- cgit v1.1