a few test changes

This commit is contained in:
UbitUmarov
2023-03-09 08:26:12 +00:00
parent eb57c75f00
commit b1f2a5b661
4 changed files with 62 additions and 4 deletions

View File

@@ -332,8 +332,23 @@ namespace OpenSim.Region.Framework.Scenes
return UUID.Zero;
}
UUID mid = data is null ? Util.ComputeSHA1UUID(UUID.ZeroString) : Util.ComputeSHA1UUID(data);
// this may be bad
if (mid.Equals(item.AssetID))
return mid;
AssetBase matasset = new(mid, item.Name, (sbyte)item.Type, avatarId.ToString())
{
Description = item.Description,
Data = data ?? (new byte[1])
};
item.AssetID = matasset.FullID;
AssetService.Store(matasset);
sop.Inventory.UpdateInventoryItem(item);
avatar.ControllingClient.SendAlertMessage("Material updated");
break;
return matasset.FullID;
}
}