Don't try to save a NPCs attachment states on NPC delete

avinationmerge
Melanie 2012-01-07 12:06:21 +01:00
parent 69c0f252a4
commit efe51fd5cb
1 changed files with 8 additions and 0 deletions

View File

@ -468,6 +468,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
/// <param name="grp"></param>
private void UpdateKnownItem(IScenePresence sp, SceneObjectGroup grp)
{
// Saving attachments for NPCs messes them up for the real owner!
INPCModule module = m_scene.RequestModuleInterface<INPCModule>();
if (module != null)
{
if (module.IsNPC(sp.UUID, m_scene))
return;
}
if (grp.HasGroupChanged || grp.ContainsScripts())
{
m_log.DebugFormat(