mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
Merge commit '30320505fa54640baf4ecaff8bb743f62ef01f86' into bigmerge
This commit is contained in:
@@ -56,17 +56,17 @@ namespace OpenSim.Tests.Common
|
||||
return CreateAsset(id, AssetType.Notecard, "hello", UUID.Random());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create and store a notecard asset with a random uuid and dummy text.
|
||||
/// </summary>
|
||||
/// <param name="creatorId">/param>
|
||||
/// <returns></returns>
|
||||
public static AssetBase CreateNotecardAsset(Scene scene, UUID creatorId)
|
||||
{
|
||||
AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId);
|
||||
scene.AssetService.Store(asset);
|
||||
return asset;
|
||||
}
|
||||
// /// <summary>
|
||||
// /// Create and store a notecard asset with a random uuid and dummy text.
|
||||
// /// </summary>
|
||||
// /// <param name="creatorId">/param>
|
||||
// /// <returns></returns>
|
||||
// public static AssetBase CreateNotecardAsset(Scene scene, UUID creatorId)
|
||||
// {
|
||||
// AssetBase asset = CreateAsset(UUID.Random(), AssetType.Notecard, "hello", creatorId);
|
||||
// scene.AssetService.Store(asset);
|
||||
// return asset;
|
||||
// }
|
||||
|
||||
/// <summary>
|
||||
/// Create an asset from the given object.
|
||||
|
||||
@@ -86,11 +86,18 @@ namespace OpenSim.Tests.Common
|
||||
AssetBase asset = null;
|
||||
|
||||
if (type == InventoryType.Notecard)
|
||||
asset = AssetHelpers.CreateNotecardAsset(scene, userId);
|
||||
{
|
||||
asset = AssetHelpers.CreateNotecardAsset();
|
||||
asset.CreatorID = userId.ToString();
|
||||
}
|
||||
else if (type == InventoryType.Object)
|
||||
{
|
||||
asset = AssetHelpers.CreateAsset(assetId, SceneHelpers.CreateSceneObject(1, userId));
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(string.Format("Inventory type {0} not supported", type));
|
||||
}
|
||||
|
||||
scene.AssetService.Store(asset);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user