Files
libremetaverse/libsecondlife/examples/TestClient/Commands/Appearance/WearCommand.cs
Latif Khalifa fb3c459016 * Added Helpers.StateToAttachmentPoint() that converts a prim.Data.State to the AttachmentPoint enum
* Created an Appearance folder for TestClient commands, put the new AttachmentsCommand in it which shows all of the current agent attachments
* Moved the ObjectManager enums out to the libsecondlife namespace
* Change LLObject.ObjectData.State from a uint to a byte (as it should be)

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

43 lines
1.1 KiB
C#

using System;
using libsecondlife;
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] [nobake]";
}
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;
}
}
}