OpenSimMirror/tools/mass test client/Commands/Inventory/WearCommand.cs

44 lines
1.1 KiB
C#
Raw Normal View History

2007-06-21 17:08:21 +00:00
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;
using libsecondlife.InventorySystem;
namespace libsecondlife.TestClient
{
public class WearCommand : Command
{
public WearCommand(TestClient 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;
for (int ct = 0; ct < args.Length; ct++)
target = target + args[ct] + " ";
target = target.TrimEnd();
InventoryFolder folder = Client.Inventory.getFolder(target);
if (folder != null)
{
Client.Appearance.WearOutfit(folder);
return "Outfit " + target + " worn.";
}
return "Unable to find: " + target;
}
}
}