diff options
author | Melanie | 2010-10-30 19:06:47 +0100 |
---|---|---|
committer | Melanie | 2010-10-30 19:06:47 +0100 |
commit | e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d (patch) | |
tree | dcacdefcbe357eadad64d81c48b3bcf3f5efca5e /OpenSim/Framework/AvatarWearable.cs | |
parent | * AbsolutePosition.Get{} returns incorrect result for child prim so switch to... (diff) | |
download | opensim-SC-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.zip opensim-SC-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.tar.gz opensim-SC-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.tar.bz2 opensim-SC-e98d8d500f5c0dda6e9ef8b9a0e1bddec8510d1d.tar.xz |
Fix logins and avatar appearance. Contains a Migration. May contain nuts.
This will cause visual params to be persisted along with worn items. With
this, alpha and tattoo laters will be saved. Multiple layers MAY work, but
not tested because I don't use Viewer 2.
Diffstat (limited to 'OpenSim/Framework/AvatarWearable.cs')
-rw-r--r-- | OpenSim/Framework/AvatarWearable.cs | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 0a02dcf..efec50b 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs | |||
@@ -82,12 +82,13 @@ namespace OpenSim.Framework | |||
82 | public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111"); | 82 | public static readonly UUID DEFAULT_PANTS_ITEM = new UUID("77c41e39-38f9-f75a-0000-5859892f1111"); |
83 | public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120"); | 83 | public static readonly UUID DEFAULT_PANTS_ASSET = new UUID("00000000-38f9-1111-024e-222222111120"); |
84 | 84 | ||
85 | public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8"); | 85 | // public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8"); |
86 | public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594"); | 86 | // public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594"); |
87 | 87 | ||
88 | public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1"); | 88 | // public static readonly UUID DEFAULT_TATTOO_ITEM = new UUID("c47e22bd-3021-4ba4-82aa-2b5cb34d35e1"); |
89 | public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007"); | 89 | // public static readonly UUID DEFAULT_TATTOO_ASSET = new UUID("00000000-0000-2222-3333-100000001007"); |
90 | 90 | ||
91 | private static AvatarWearable[] defaultWearables = null; | ||
91 | 92 | ||
92 | protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>(); | 93 | protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>(); |
93 | protected List<UUID> m_ids = new List<UUID>(); | 94 | protected List<UUID> m_ids = new List<UUID>(); |
@@ -152,6 +153,11 @@ namespace OpenSim.Framework | |||
152 | m_items[itemID] = assetID; | 153 | m_items[itemID] = assetID; |
153 | } | 154 | } |
154 | 155 | ||
156 | public void Wear(WearableItem item) | ||
157 | { | ||
158 | Wear(item.ItemID, item.AssetID); | ||
159 | } | ||
160 | |||
155 | public void Wear(UUID itemID, UUID assetID) | 161 | public void Wear(UUID itemID, UUID assetID) |
156 | { | 162 | { |
157 | Clear(); | 163 | Clear(); |
@@ -204,11 +210,21 @@ namespace OpenSim.Framework | |||
204 | } | 210 | } |
205 | } | 211 | } |
206 | 212 | ||
213 | public UUID GetAsset(UUID itemID) | ||
214 | { | ||
215 | if (!m_items.ContainsKey(itemID)) | ||
216 | return UUID.Zero; | ||
217 | return m_items[itemID]; | ||
218 | } | ||
219 | |||
207 | public static AvatarWearable[] DefaultWearables | 220 | public static AvatarWearable[] DefaultWearables |
208 | { | 221 | { |
209 | get | 222 | get |
210 | { | 223 | { |
211 | AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these | 224 | if (defaultWearables != null) |
225 | return defaultWearables; | ||
226 | |||
227 | defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these | ||
212 | for (int i = 0; i < MAX_WEARABLES; i++) | 228 | for (int i = 0; i < MAX_WEARABLES; i++) |
213 | { | 229 | { |
214 | defaultWearables[i] = new AvatarWearable(); | 230 | defaultWearables[i] = new AvatarWearable(); |
@@ -229,11 +245,11 @@ namespace OpenSim.Framework | |||
229 | // Pants | 245 | // Pants |
230 | defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET); | 246 | defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET); |
231 | 247 | ||
232 | // Alpha | 248 | // // Alpha |
233 | defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); | 249 | // defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); |
234 | 250 | ||
235 | // Tattoo | 251 | // // Tattoo |
236 | defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET); | 252 | // defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET); |
237 | 253 | ||
238 | return defaultWearables; | 254 | return defaultWearables; |
239 | } | 255 | } |