a few changes to deattach object update

0.9.1.0-post-fixes
UbitUmarov 2018-11-12 23:21:08 +00:00
parent d31854ee3c
commit 191b0888a2
2 changed files with 10 additions and 9 deletions

View File

@ -997,18 +997,24 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
(uint)PermissionMask.Export |
(uint)PermissionMask.FoldedMask); // Preserve folded permissions ??
string name = grp.RootPart.Name;
string desc = grp.RootPart.Description;
AssetBase asset = m_scene.CreateAsset(
grp.GetPartName(grp.LocalId),
grp.GetPartDescription(grp.LocalId),
name, desc,
(sbyte)AssetType.Object,
Utils.StringToBytes(sceneObjectXml),
sp.UUID);
item.Name = name;
item.Description = desc;
item.AssetID = asset.FullID;
item.AssetType = (int)AssetType.Object;
item.InvType = (int)InventoryType.Object;
if (m_invAccessModule != null)
m_invAccessModule.UpdateInventoryItemAsset(sp.UUID, item, asset);
// If the name of the object has been changed whilst attached then we want to update the inventory
// item in the viewer.
if (sp.ControllingClient != null)
sp.ControllingClient.SendInventoryItemCreateUpdate(item, 0);
}

View File

@ -333,11 +333,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
// "[INVENTORY ACCESS MODULE]: Updating item {0} {1} with new asset {2}",
// item.Name, item.ID, asset.ID);
item.AssetID = asset.FullID;
item.Description = asset.Description;
item.Name = asset.Name;
item.AssetType = asset.Type;
item.InvType = (int)InventoryType.Object;
m_Scene.AssetService.Store(asset);
m_Scene.InventoryService.UpdateItem(item);