* Better error message fetching from failed notecard uploads
* createnotecard command will now add a link to the embedded item at the end of the note (still broken with "Invalid asset type.") git-svn-id: http://libopenmetaverse.googlecode.com/svn/libopenmetaverse/trunk@2966 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -59,13 +59,27 @@ namespace OpenMetaverse.TestClient
|
||||
// Try to fetch the inventory item
|
||||
InventoryItem item = FetchItem(embedItemID);
|
||||
if (item != null)
|
||||
{
|
||||
notecard.EmbeddedItems = new List<InventoryItem> { item };
|
||||
notecard.BodyText += "xxxx";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Failed to fetch inventory item " + embedItemID;
|
||||
}
|
||||
}
|
||||
|
||||
notecard.Encode();
|
||||
|
||||
if (notecard.EmbeddedItems != null && notecard.EmbeddedItems.Count > 0)
|
||||
{
|
||||
// Replace xxxx in the notecard text with a link to the embedded item
|
||||
notecard.AssetData[notecard.AssetData.Length - 7] = 0xF4;
|
||||
notecard.AssetData[notecard.AssetData.Length - 6] = 0x80;
|
||||
notecard.AssetData[notecard.AssetData.Length - 5] = 0x80;
|
||||
notecard.AssetData[notecard.AssetData.Length - 4] = 0x80;
|
||||
}
|
||||
|
||||
Client.Inventory.RequestCreateItem(Client.Inventory.FindFolderForType(AssetType.Notecard),
|
||||
filename, filename + " created by OpenMetaverse TestClient " + DateTime.Now, AssetType.Notecard,
|
||||
UUID.Random(), InventoryType.Notecard, PermissionMask.All,
|
||||
|
||||
Reference in New Issue
Block a user