diff options
Diffstat (limited to '')
-rw-r--r-- | tools/mass test client/Commands/Inventory/WearCommand.cs | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tools/mass test client/Commands/Inventory/WearCommand.cs b/tools/mass test client/Commands/Inventory/WearCommand.cs new file mode 100644 index 0000000..d7c1432 --- /dev/null +++ b/tools/mass test client/Commands/Inventory/WearCommand.cs | |||
@@ -0,0 +1,43 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.IO; | ||
4 | using System.Text; | ||
5 | using System.Threading; | ||
6 | using System.Xml; | ||
7 | using System.Xml.Serialization; | ||
8 | |||
9 | using libsecondlife; | ||
10 | using libsecondlife.Packets; | ||
11 | using libsecondlife.InventorySystem; | ||
12 | |||
13 | namespace libsecondlife.TestClient | ||
14 | { | ||
15 | public class WearCommand : Command | ||
16 | { | ||
17 | public WearCommand(TestClient testClient) | ||
18 | { | ||
19 | Name = "wear"; | ||
20 | Description = "Wear an outfit folder from inventory. Usage: wear [outfit name]"; | ||
21 | } | ||
22 | |||
23 | public override string Execute(string[] args, LLUUID fromAgentID) | ||
24 | { | ||
25 | string target = String.Empty; | ||
26 | |||
27 | for (int ct = 0; ct < args.Length; ct++) | ||
28 | target = target + args[ct] + " "; | ||
29 | |||
30 | target = target.TrimEnd(); | ||
31 | |||
32 | InventoryFolder folder = Client.Inventory.getFolder(target); | ||
33 | |||
34 | if (folder != null) | ||
35 | { | ||
36 | Client.Appearance.WearOutfit(folder); | ||
37 | return "Outfit " + target + " worn."; | ||
38 | } | ||
39 | |||
40 | return "Unable to find: " + target; | ||
41 | } | ||
42 | } | ||
43 | } | ||