detach over the attachment module

master
Christopher 2020-07-10 19:22:23 +02:00
parent 84bbccae70
commit a2d3869e0f
1 changed files with 4 additions and 8 deletions

View File

@ -97,7 +97,7 @@ namespace OpenSim.Modules.Appearance2Avatar
//Remove all attachments
List<SceneObjectGroup> _allAttachments = sp.GetAttachments();
foreach (SceneObjectGroup _attachment in _allAttachments)
sp.RemoveAttachment(_attachment);
m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, _attachment);
//Load Appearance
m_log.Info(noteCardContend);
@ -105,15 +105,11 @@ namespace OpenSim.Modules.Appearance2Avatar
OSDMap appearanceOsd = (OSDMap)OSDParser.DeserializeLLSDXml(noteCardContend);
sp.Appearance.Unpack(appearanceOsd);
//Send Update
m_log.Info("[" + Name + "] Info: Send update to all clients");
List<SceneObjectGroup> _allNewAttachments = sp.GetAttachments();
foreach (SceneObjectGroup _attachment in _allAttachments)
sp.SendAttachmentUpdate(_attachment, PrimUpdateFlags.FullUpdate);
foreach (ScenePresence presens in m_scene.GetScenePresences())
presens.ControllingClient.SendAppearance(presens.UUID, sp.Appearance.VisualParams, sp.Appearance.Texture.GetBakesBytes(), sp.Appearance.AvatarPreferencesHoverZ);
sp.SendInitialAvatarDataToAgent(sp);
sp.SendAvatarDataToAllAgents();
sp.SendAppearanceToAgent(sp);
sp.SendAppearanceToAllOtherAgents();
}
}
else