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

iar_mods
Melanie 2012-01-07 12:06:21 +01:00
parent 58cb7cd084
commit 6f19e231b6
1 changed files with 8 additions and 0 deletions

View File

@ -462,6 +462,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(