add to inventory

master
Christopher 2020-07-10 20:47:09 +02:00
parent 9f0d7c3623
commit c413e4f6ff
1 changed files with 3 additions and 2 deletions

View File

@ -127,7 +127,7 @@ namespace OpenSim.Modules.Appearance2Avatar
//Add Attachments
m_scene.AvatarFactory.SetAppearance(sp, _appearance, WearableCacheItem.FromOSD(appearanceOsd, m_assetCache));
m_scene.AvatarService.SetAppearance(sp.UUID, _appearance);
//Add items to current outfit inventory
if (_outfitFolder != null)
{
@ -137,7 +137,7 @@ namespace OpenSim.Modules.Appearance2Avatar
{
InventoryItemBase _item = new InventoryItemBase();
_item.AssetID = attachment.AssetID;
_item.AssetType = (int)AssetType.Object;
_item.AssetType = (int)AssetType.Link;
_item.Name = "Unknown Attachment";
_item.Owner = sp.UUID;
_item.Folder = _outfitFolder.ID;
@ -150,6 +150,7 @@ namespace OpenSim.Modules.Appearance2Avatar
//Send Update
m_log.Info("[" + Name + "] Info: Send update to all clients");
m_scene.AttachmentsModule.RezAttachments(sp);
foreach (ScenePresence presens in m_scene.GetScenePresences())
m_scene.AvatarFactory.SendAppearance(presens.UUID);
}