aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/UserAppearance.cs
diff options
context:
space:
mode:
authorSean Dague2008-04-30 18:20:28 +0000
committerSean Dague2008-04-30 18:20:28 +0000
commitb2077b81eb00cb27573a7694519d5cc5f879cd02 (patch)
treeed632dc9f96ccae75c5511f9d5281938bacdc63a /OpenSim/Framework/UserAppearance.cs
parent* Actually enable the inventory upgrade sql if appropriate (diff)
downloadopensim-SC_OLD-b2077b81eb00cb27573a7694519d5cc5f879cd02.zip
opensim-SC_OLD-b2077b81eb00cb27573a7694519d5cc5f879cd02.tar.gz
opensim-SC_OLD-b2077b81eb00cb27573a7694519d5cc5f879cd02.tar.bz2
opensim-SC_OLD-b2077b81eb00cb27573a7694519d5cc5f879cd02.tar.xz
The beginnings of a UserAppearance container
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/UserAppearance.cs92
1 files changed, 92 insertions, 0 deletions
diff --git a/OpenSim/Framework/UserAppearance.cs b/OpenSim/Framework/UserAppearance.cs
new file mode 100644
index 0000000..53807e6
--- /dev/null
+++ b/OpenSim/Framework/UserAppearance.cs
@@ -0,0 +1,92 @@
1/*
2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 * * Neither the name of the OpenSim Project nor the
13 * names of its contributors may be used to endorse or promote products
14 * derived from this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19 * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
20 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28using System;
29using libsecondlife;
30
31namespace OpenSim.Framework
32{
33 /// <summary>
34 /// Information about a particular user known to the userserver
35 /// </summary>
36
37 public class UserAppearance
38 {
39 // these are guessed at by the list here -
40 // http://wiki.secondlife.com/wiki/Avatar_Appearance. We'll
41 // correct them over time for when were are wrong.
42 public const int BODY = 0;
43 public const int SKIN = 1;
44 public const int HAIR = 2;
45 public const int EYES = 3;
46 public const int SHIRT = 4;
47 public const int PANTS = 5;
48 public const int SHOES = 6;
49 public const int SOCKS = 7;
50 public const int JACKET = 8;
51 public const int GLOVES = 9;
52 public const int UNDERSHIRT = 10;
53 public const int UNDERPANTS = 11;
54 public const int SKIRT = 12;
55
56 private const int MAX_WEARABLES = 13;
57
58 private static LLUUID BODY_ASSET = new LLUUID("66c41e39-38f9-f75a-024e-585989bfab73");
59 private static LLUUID BODY_ITEM = new LLUUID("66c41e39-38f9-f75a-024e-585989bfaba9");
60 private static LLUUID SKIN_ASSET = new LLUUID("77c41e39-38f9-f75a-024e-585989bbabbb");
61 private static LLUUID SKIN_ITEM = new LLUUID("77c41e39-38f9-f75a-024e-585989bfabc9");
62 private static LLUUID SHIRT_ASSET = new LLUUID("00000000-38f9-1111-024e-222222111110");
63 private static LLUUID SHIRT_ITEM = new LLUUID("77c41e39-38f9-f75a-0000-585989bf0000");
64 private static LLUUID PANTS_ASSET = new LLUUID("00000000-38f9-1111-024e-222222111120");
65 private static LLUUID PANTS_ITEM = new LLUUID("77c41e39-38f9-f75a-0000-5859892f1111");
66
67 private AvatarWearable[] wearables;
68
69 public UserAppearance()
70 {
71 wearables = new AvatarWearable[MAX_WEARABLES];
72 for (int i = 0; i < MAX_WEARABLES; i++)
73 {
74 // this makes them all null
75 wearables[i] = new AvatarWearable();
76 }
77 }
78
79
80 public void SetDefaultWearables()
81 {
82 wearables[BODY].AssetID = BODY_ASSET;
83 wearables[BODY].ItemID = BODY_ITEM;
84 wearables[SKIN].AssetID = SKIN_ASSET;
85 wearables[SKIN].ItemID = SKIN_ITEM;
86 wearables[SHIRT].AssetID = SHIRT_ASSET;
87 wearables[SHIRT].ItemID = SHIRT_ITEM;
88 wearables[PANTS].AssetID = PANTS_ASSET;
89 wearables[PANTS].ItemID = PANTS_ITEM;
90 }
91 }
92} \ No newline at end of file