From efe51fd5cba9bf3ed1cd37f71f8af888dbf0a386 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 eca9c3b..83beff4 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -468,6 +468,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