Files
libremetaverse/libsecondlife/examples/TestClient/Commands/Inventory/WearCommand.cs
jedediah 216441f0be * added support for asset wrappers to the AssetManager API (BREAKING CHANGE)
* added Image class, modified OpenJPEG to use it
* implemented AssetTexture (with Image class)
* reimplemented Wear* commands, refactored appearance code
* added bake flag parameter to appearance commands
* added InventoryItem subclasses for different item types
* added *FindObjectsByPath to InventoryManager
* added single item FetchInventory


git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1373 52acb1d6-8a22-11de-b505-999d5b087335
2007-08-25 09:36:33 +00:00

51 lines
1.2 KiB
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Threading;
using System.Xml;
using System.Xml.Serialization;
using libsecondlife;
using libsecondlife.Packets;
namespace libsecondlife.TestClient
{
public class WearCommand : Command
{
public WearCommand(TestClient testClient)
{
Client = testClient;
Name = "wear";
Description = "Wear an outfit folder from inventory. Usage: wear [outfit name]";
}
public override string Execute(string[] args, LLUUID fromAgentID)
{
string target = String.Empty;
bool bake = true;
for (int ct = 0; ct < args.Length; ct++)
{
if (args[ct].Equals("nobake"))
bake = false;
else
target = target + args[ct] + " ";
}
target = target.TrimEnd();
try
{
Client.Appearance.WearOutfit(target.Split('/'), bake);
}
catch (InvalidOutfitException ex)
{
return "Invalid outfit (" + ex.Message + ")";
}
return String.Empty;
}
}
}