diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
index e668daebe8..eb071650bc 100644
--- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
+++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs
@@ -46,7 +46,7 @@ namespace OpenSim.Region.Framework.Interfaces
/// Save the attachments that have change on this presence.
///
///
- void SaveChangedAttachments(IScenePresence sp);
+ void SaveChangedAttachments(IScenePresence sp, bool saveAllScripted);
///
/// Delete all the presence's attachments from the scene
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 34d1151dbc..2af4a1c457 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -3105,14 +3105,14 @@ namespace OpenSim.Region.Framework.Scenes
if (AttachmentsModule != null && !avatar.IsChildAgent && avatar.PresenceType != PresenceType.Npc)
{
- IUserManagement uMan = m_aScene.RequestModuleInterface();
+ IUserManagement uMan = RequestModuleInterface();
// Don't save attachments for HG visitors, it
// messes up their inventory. When a HG visitor logs
// out on a foreign grid, their attachments will be
// reloaded in the state they were in when they left
// the home grid. This is best anyway as the visited
// grid may use an incompatible script engine.
- if (uMan == null || uMan.IsLocalGridUser(id))
+ if (uMan == null || uMan.IsLocalGridUser(avatar.UUID))
AttachmentsModule.SaveChangedAttachments(avatar, false);
}