diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 18 | ||||
-rw-r--r-- | OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs | 5 | ||||
-rw-r--r-- | OpenSim/Framework/AgentCircuitData.cs | 51 | ||||
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 241 | ||||
-rw-r--r-- | OpenSim/Framework/AvatarWearable.cs | 157 | ||||
-rw-r--r-- | OpenSim/Framework/ChildAgentDataUpdate.cs | 10 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/VersionInfo.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 21 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 15 | ||||
-rw-r--r-- | OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | 53 | ||||
-rw-r--r-- | OpenSim/Services/Interfaces/IAvatarService.cs | 132 |
11 files changed, 282 insertions, 423 deletions
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 1829c8d..72ac303 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -1510,11 +1510,11 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1510 | 1510 | ||
1511 | for (int i=0; i<wearables.Length; i++) | 1511 | for (int i=0; i<wearables.Length; i++) |
1512 | { | 1512 | { |
1513 | if (inventoryMap.ContainsKey(wearables[i].ItemID)) | 1513 | if (inventoryMap.ContainsKey(wearables[i][0].ItemID)) |
1514 | { | 1514 | { |
1515 | AvatarWearable wearable = new AvatarWearable(); | 1515 | AvatarWearable wearable = new AvatarWearable(); |
1516 | wearable.AssetID = wearables[i].AssetID; | 1516 | wearable.Wear(inventoryMap[wearables[i][0].ItemID], |
1517 | wearable.ItemID = inventoryMap[wearables[i].ItemID]; | 1517 | wearables[i][0].AssetID); |
1518 | avatarAppearance.SetWearable(i, wearable); | 1518 | avatarAppearance.SetWearable(i, wearable); |
1519 | } | 1519 | } |
1520 | } | 1520 | } |
@@ -1568,10 +1568,10 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1568 | for (int i=0; i<wearables.Length; i++) | 1568 | for (int i=0; i<wearables.Length; i++) |
1569 | { | 1569 | { |
1570 | wearable = wearables[i]; | 1570 | wearable = wearables[i]; |
1571 | if (wearable.ItemID != UUID.Zero) | 1571 | if (wearable[0].ItemID != UUID.Zero) |
1572 | { | 1572 | { |
1573 | // Get inventory item and copy it | 1573 | // Get inventory item and copy it |
1574 | InventoryItemBase item = new InventoryItemBase(wearable.ItemID, source); | 1574 | InventoryItemBase item = new InventoryItemBase(wearable[0].ItemID, source); |
1575 | item = inventoryService.GetItem(item); | 1575 | item = inventoryService.GetItem(item); |
1576 | 1576 | ||
1577 | if (item != null) | 1577 | if (item != null) |
@@ -1602,13 +1602,12 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
1602 | 1602 | ||
1603 | // Wear item | 1603 | // Wear item |
1604 | AvatarWearable newWearable = new AvatarWearable(); | 1604 | AvatarWearable newWearable = new AvatarWearable(); |
1605 | newWearable.AssetID = wearable.AssetID; | 1605 | newWearable.Wear(destinationItem.ID, wearable[0].AssetID); |
1606 | newWearable.ItemID = destinationItem.ID; | ||
1607 | avatarAppearance.SetWearable(i, newWearable); | 1606 | avatarAppearance.SetWearable(i, newWearable); |
1608 | } | 1607 | } |
1609 | else | 1608 | else |
1610 | { | 1609 | { |
1611 | m_log.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", wearable.ItemID, destinationFolder.ID); | 1610 | m_log.WarnFormat("[RADMIN]: Error transferring {0} to folder {1}", wearable[0].ItemID, destinationFolder.ID); |
1612 | } | 1611 | } |
1613 | } | 1612 | } |
1614 | } | 1613 | } |
@@ -2057,8 +2056,7 @@ namespace OpenSim.ApplicationPlugins.RemoteController | |||
2057 | { | 2056 | { |
2058 | if (select && (GetStringAttribute(item, "wear", "false") == "true")) | 2057 | if (select && (GetStringAttribute(item, "wear", "false") == "true")) |
2059 | { | 2058 | { |
2060 | avatarAppearance.Wearables[inventoryItem.Flags].ItemID = inventoryItem.ID; | 2059 | avatarAppearance.Wearables[inventoryItem.Flags].Wear(inventoryItem.ID, inventoryItem.AssetID); |
2061 | avatarAppearance.Wearables[inventoryItem.Flags].AssetID = inventoryItem.AssetID; | ||
2062 | } | 2060 | } |
2063 | } | 2061 | } |
2064 | catch (Exception e) | 2062 | catch (Exception e) |
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs index 3f6d4d6..019ca73 100644 --- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs +++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAppearanceServices.cs | |||
@@ -499,6 +499,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
499 | indata = true; | 499 | indata = true; |
500 | } | 500 | } |
501 | break; | 501 | break; |
502 | /* | ||
502 | case "Body" : | 503 | case "Body" : |
503 | if (xml.MoveToAttribute("Item")) | 504 | if (xml.MoveToAttribute("Item")) |
504 | { | 505 | { |
@@ -655,6 +656,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
655 | indata = true; | 656 | indata = true; |
656 | } | 657 | } |
657 | break; | 658 | break; |
659 | */ | ||
658 | case "Attachment" : | 660 | case "Attachment" : |
659 | { | 661 | { |
660 | 662 | ||
@@ -749,6 +751,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
749 | rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString()); | 751 | rdata.writer.WriteAttributeString("Owner", rdata.userAppearance.Owner.ToString()); |
750 | rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString()); | 752 | rdata.writer.WriteAttributeString("Serial", rdata.userAppearance.Serial.ToString()); |
751 | 753 | ||
754 | /* | ||
752 | FormatPart(rdata, "Body", rdata.userAppearance.BodyItem, rdata.userAppearance.BodyAsset); | 755 | FormatPart(rdata, "Body", rdata.userAppearance.BodyItem, rdata.userAppearance.BodyAsset); |
753 | FormatPart(rdata, "Skin", rdata.userAppearance.SkinItem, rdata.userAppearance.SkinAsset); | 756 | FormatPart(rdata, "Skin", rdata.userAppearance.SkinItem, rdata.userAppearance.SkinAsset); |
754 | FormatPart(rdata, "Hair", rdata.userAppearance.HairItem, rdata.userAppearance.HairAsset); | 757 | FormatPart(rdata, "Hair", rdata.userAppearance.HairItem, rdata.userAppearance.HairAsset); |
@@ -765,7 +768,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory | |||
765 | 768 | ||
766 | FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset); | 769 | FormatPart(rdata, "UnderShirt", rdata.userAppearance.UnderShirtItem, rdata.userAppearance.UnderShirtAsset); |
767 | FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset); | 770 | FormatPart(rdata, "UnderPants", rdata.userAppearance.UnderPantsItem, rdata.userAppearance.UnderPantsAsset); |
768 | 771 | */ | |
769 | Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId); | 772 | Rest.Log.DebugFormat("{0} FormatUserAppearance: Formatting attachments", MsgId); |
770 | 773 | ||
771 | rdata.writer.WriteStartElement("Attachments"); | 774 | rdata.writer.WriteStartElement("Attachments"); |
diff --git a/OpenSim/Framework/AgentCircuitData.cs b/OpenSim/Framework/AgentCircuitData.cs index 640a646..cd30c3d 100644 --- a/OpenSim/Framework/AgentCircuitData.cs +++ b/OpenSim/Framework/AgentCircuitData.cs | |||
@@ -218,35 +218,6 @@ namespace OpenSim.Framework | |||
218 | { | 218 | { |
219 | args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); | 219 | args["appearance_serial"] = OSD.FromInteger(Appearance.Serial); |
220 | 220 | ||
221 | //System.Console.WriteLine("XXX Before packing Wearables"); | ||
222 | if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) | ||
223 | { | ||
224 | OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2); | ||
225 | foreach (AvatarWearable awear in Appearance.Wearables) | ||
226 | { | ||
227 | wears.Add(OSD.FromUUID(awear.ItemID)); | ||
228 | wears.Add(OSD.FromUUID(awear.AssetID)); | ||
229 | //System.Console.WriteLine("XXX ItemID=" + awear.ItemID + " assetID=" + awear.AssetID); | ||
230 | } | ||
231 | args["wearables"] = wears; | ||
232 | } | ||
233 | |||
234 | //System.Console.WriteLine("XXX Before packing Attachments"); | ||
235 | List<AvatarAttachment> attachments = Appearance.GetAttachments(); | ||
236 | if ((attachments != null) && (attachments.Count > 0)) | ||
237 | { | ||
238 | OSDArray attachs = new OSDArray(attachments.Count); | ||
239 | foreach (AvatarAttachment attach in attachments) | ||
240 | { | ||
241 | attachs.Add(attach.Pack()); | ||
242 | //System.Console.WriteLine("XXX att.pt=" + kvp.Key + "; itemID=" + kvp.Value[0] + "; assetID=" + kvp.Value[1]); | ||
243 | } | ||
244 | args["attachments"] = attachs; | ||
245 | } | ||
246 | } | ||
247 | |||
248 | if (Appearance != null) | ||
249 | { | ||
250 | OSDMap appmap = Appearance.Pack(); | 221 | OSDMap appmap = Appearance.Pack(); |
251 | args["packed_appearance"] = appmap; | 222 | args["packed_appearance"] = appmap; |
252 | } | 223 | } |
@@ -346,28 +317,6 @@ namespace OpenSim.Framework | |||
346 | if (args["appearance_serial"] != null) | 317 | if (args["appearance_serial"] != null) |
347 | Appearance.Serial = args["appearance_serial"].AsInteger(); | 318 | Appearance.Serial = args["appearance_serial"].AsInteger(); |
348 | 319 | ||
349 | if ((args["wearables"] != null) && (args["wearables"]).Type == OSDType.Array) | ||
350 | { | ||
351 | OSDArray wears = (OSDArray)(args["wearables"]); | ||
352 | for (int i = 0; i < wears.Count / 2; i++) | ||
353 | { | ||
354 | AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID()); | ||
355 | Appearance.SetWearable(i,awear); | ||
356 | } | ||
357 | } | ||
358 | |||
359 | if ((args["attachments"] != null) && (args["attachments"]).Type == OSDType.Array) | ||
360 | { | ||
361 | OSDArray attachs = (OSDArray)(args["attachments"]); | ||
362 | foreach (OSD o in attachs) | ||
363 | { | ||
364 | if (o.Type == OSDType.Map) | ||
365 | { | ||
366 | Appearance.AppendAttachment(new AvatarAttachment((OSDMap)o)); | ||
367 | } | ||
368 | } | ||
369 | } | ||
370 | |||
371 | if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map)) | 320 | if (args.ContainsKey("packed_appearance") && (args["packed_appearance"].Type == OSDType.Map)) |
372 | { | 321 | { |
373 | Appearance.Unpack((OSDMap)args["packed_appearance"]); | 322 | Appearance.Unpack((OSDMap)args["packed_appearance"]); |
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index a4bb765..f378e96 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -35,104 +35,6 @@ using log4net; | |||
35 | 35 | ||
36 | namespace OpenSim.Framework | 36 | namespace OpenSim.Framework |
37 | { | 37 | { |
38 | // A special dictionary for avatar appearance | ||
39 | public struct LayerItem | ||
40 | { | ||
41 | public UUID ItemID; | ||
42 | public UUID AssetID; | ||
43 | |||
44 | public LayerItem(UUID itemID, UUID assetID) | ||
45 | { | ||
46 | ItemID = itemID; | ||
47 | AssetID = assetID; | ||
48 | } | ||
49 | } | ||
50 | |||
51 | public class Layer | ||
52 | { | ||
53 | protected int m_layerType; | ||
54 | protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>(); | ||
55 | protected List<UUID> m_ids = new List<UUID>(); | ||
56 | |||
57 | public Layer(int type) | ||
58 | { | ||
59 | m_layerType = type; | ||
60 | } | ||
61 | |||
62 | public int LayerType | ||
63 | { | ||
64 | get { return m_layerType; } | ||
65 | } | ||
66 | |||
67 | public int Count | ||
68 | { | ||
69 | get { return m_ids.Count; } | ||
70 | } | ||
71 | |||
72 | public void Add(UUID itemID, UUID assetID) | ||
73 | { | ||
74 | if (m_items.ContainsKey(itemID)) | ||
75 | return; | ||
76 | if (m_ids.Count >= 5) | ||
77 | return; | ||
78 | |||
79 | m_ids.Add(itemID); | ||
80 | m_items[itemID] = assetID; | ||
81 | } | ||
82 | |||
83 | public void Wear(UUID itemID, UUID assetID) | ||
84 | { | ||
85 | Clear(); | ||
86 | Add(itemID, assetID); | ||
87 | } | ||
88 | |||
89 | public void Clear() | ||
90 | { | ||
91 | m_ids.Clear(); | ||
92 | m_items.Clear(); | ||
93 | } | ||
94 | |||
95 | public void RemoveItem(UUID itemID) | ||
96 | { | ||
97 | if (m_items.ContainsKey(itemID)) | ||
98 | { | ||
99 | m_ids.Remove(itemID); | ||
100 | m_items.Remove(itemID); | ||
101 | } | ||
102 | } | ||
103 | |||
104 | public void RemoveAsset(UUID assetID) | ||
105 | { | ||
106 | UUID itemID = UUID.Zero; | ||
107 | |||
108 | foreach (KeyValuePair<UUID, UUID> kvp in m_items) | ||
109 | { | ||
110 | if (kvp.Value == assetID) | ||
111 | { | ||
112 | itemID = kvp.Key; | ||
113 | break; | ||
114 | } | ||
115 | } | ||
116 | |||
117 | if (itemID != UUID.Zero) | ||
118 | { | ||
119 | m_ids.Remove(itemID); | ||
120 | m_items.Remove(itemID); | ||
121 | } | ||
122 | } | ||
123 | |||
124 | public LayerItem this [int idx] | ||
125 | { | ||
126 | get | ||
127 | { | ||
128 | if (idx >= m_ids.Count || idx < 0) | ||
129 | return new LayerItem(UUID.Zero, UUID.Zero); | ||
130 | |||
131 | return new LayerItem(m_ids[idx], m_items[m_ids[idx]]); | ||
132 | } | ||
133 | } | ||
134 | } | ||
135 | |||
136 | /// <summary> | 38 | /// <summary> |
137 | /// Contains the Avatar's Appearance and methods to manipulate the appearance. | 39 | /// Contains the Avatar's Appearance and methods to manipulate the appearance. |
138 | /// </summary> | 40 | /// </summary> |
@@ -184,136 +86,6 @@ namespace OpenSim.Framework | |||
184 | set { m_wearables = value; } | 86 | set { m_wearables = value; } |
185 | } | 87 | } |
186 | 88 | ||
187 | public virtual UUID BodyItem { | ||
188 | get { return m_wearables[AvatarWearable.BODY].ItemID; } | ||
189 | set { m_wearables[AvatarWearable.BODY].ItemID = value; } | ||
190 | } | ||
191 | |||
192 | public virtual UUID BodyAsset { | ||
193 | get { return m_wearables[AvatarWearable.BODY].AssetID; } | ||
194 | set { m_wearables[AvatarWearable.BODY].AssetID = value; } | ||
195 | } | ||
196 | |||
197 | public virtual UUID SkinItem { | ||
198 | get { return m_wearables[AvatarWearable.SKIN].ItemID; } | ||
199 | set { m_wearables[AvatarWearable.SKIN].ItemID = value; } | ||
200 | } | ||
201 | |||
202 | public virtual UUID SkinAsset { | ||
203 | get { return m_wearables[AvatarWearable.SKIN].AssetID; } | ||
204 | set { m_wearables[AvatarWearable.SKIN].AssetID = value; } | ||
205 | } | ||
206 | |||
207 | public virtual UUID HairItem { | ||
208 | get { return m_wearables[AvatarWearable.HAIR].ItemID; } | ||
209 | set { m_wearables[AvatarWearable.HAIR].ItemID = value; } | ||
210 | } | ||
211 | |||
212 | public virtual UUID HairAsset { | ||
213 | get { return m_wearables[AvatarWearable.HAIR].AssetID; } | ||
214 | set { m_wearables[AvatarWearable.HAIR].AssetID = value; } | ||
215 | } | ||
216 | |||
217 | public virtual UUID EyesItem { | ||
218 | get { return m_wearables[AvatarWearable.EYES].ItemID; } | ||
219 | set { m_wearables[AvatarWearable.EYES].ItemID = value; } | ||
220 | } | ||
221 | |||
222 | public virtual UUID EyesAsset { | ||
223 | get { return m_wearables[AvatarWearable.EYES].AssetID; } | ||
224 | set { m_wearables[AvatarWearable.EYES].AssetID = value; } | ||
225 | } | ||
226 | |||
227 | public virtual UUID ShirtItem { | ||
228 | get { return m_wearables[AvatarWearable.SHIRT].ItemID; } | ||
229 | set { m_wearables[AvatarWearable.SHIRT].ItemID = value; } | ||
230 | } | ||
231 | |||
232 | public virtual UUID ShirtAsset { | ||
233 | get { return m_wearables[AvatarWearable.SHIRT].AssetID; } | ||
234 | set { m_wearables[AvatarWearable.SHIRT].AssetID = value; } | ||
235 | } | ||
236 | |||
237 | public virtual UUID PantsItem { | ||
238 | get { return m_wearables[AvatarWearable.PANTS].ItemID; } | ||
239 | set { m_wearables[AvatarWearable.PANTS].ItemID = value; } | ||
240 | } | ||
241 | |||
242 | public virtual UUID PantsAsset { | ||
243 | get { return m_wearables[AvatarWearable.PANTS].AssetID; } | ||
244 | set { m_wearables[AvatarWearable.PANTS].AssetID = value; } | ||
245 | } | ||
246 | |||
247 | public virtual UUID ShoesItem { | ||
248 | get { return m_wearables[AvatarWearable.SHOES].ItemID; } | ||
249 | set { m_wearables[AvatarWearable.SHOES].ItemID = value; } | ||
250 | } | ||
251 | |||
252 | public virtual UUID ShoesAsset { | ||
253 | get { return m_wearables[AvatarWearable.SHOES].AssetID; } | ||
254 | set { m_wearables[AvatarWearable.SHOES].AssetID = value; } | ||
255 | } | ||
256 | |||
257 | public virtual UUID SocksItem { | ||
258 | get { return m_wearables[AvatarWearable.SOCKS].ItemID; } | ||
259 | set { m_wearables[AvatarWearable.SOCKS].ItemID = value; } | ||
260 | } | ||
261 | |||
262 | public virtual UUID SocksAsset { | ||
263 | get { return m_wearables[AvatarWearable.SOCKS].AssetID; } | ||
264 | set { m_wearables[AvatarWearable.SOCKS].AssetID = value; } | ||
265 | } | ||
266 | |||
267 | public virtual UUID JacketItem { | ||
268 | get { return m_wearables[AvatarWearable.JACKET].ItemID; } | ||
269 | set { m_wearables[AvatarWearable.JACKET].ItemID = value; } | ||
270 | } | ||
271 | |||
272 | public virtual UUID JacketAsset { | ||
273 | get { return m_wearables[AvatarWearable.JACKET].AssetID; } | ||
274 | set { m_wearables[AvatarWearable.JACKET].AssetID = value; } | ||
275 | } | ||
276 | |||
277 | public virtual UUID GlovesItem { | ||
278 | get { return m_wearables[AvatarWearable.GLOVES].ItemID; } | ||
279 | set { m_wearables[AvatarWearable.GLOVES].ItemID = value; } | ||
280 | } | ||
281 | |||
282 | public virtual UUID GlovesAsset { | ||
283 | get { return m_wearables[AvatarWearable.GLOVES].AssetID; } | ||
284 | set { m_wearables[AvatarWearable.GLOVES].AssetID = value; } | ||
285 | } | ||
286 | |||
287 | public virtual UUID UnderShirtItem { | ||
288 | get { return m_wearables[AvatarWearable.UNDERSHIRT].ItemID; } | ||
289 | set { m_wearables[AvatarWearable.UNDERSHIRT].ItemID = value; } | ||
290 | } | ||
291 | |||
292 | public virtual UUID UnderShirtAsset { | ||
293 | get { return m_wearables[AvatarWearable.UNDERSHIRT].AssetID; } | ||
294 | set { m_wearables[AvatarWearable.UNDERSHIRT].AssetID = value; } | ||
295 | } | ||
296 | |||
297 | public virtual UUID UnderPantsItem { | ||
298 | get { return m_wearables[AvatarWearable.UNDERPANTS].ItemID; } | ||
299 | set { m_wearables[AvatarWearable.UNDERPANTS].ItemID = value; } | ||
300 | } | ||
301 | |||
302 | public virtual UUID UnderPantsAsset { | ||
303 | get { return m_wearables[AvatarWearable.UNDERPANTS].AssetID; } | ||
304 | set { m_wearables[AvatarWearable.UNDERPANTS].AssetID = value; } | ||
305 | } | ||
306 | |||
307 | public virtual UUID SkirtItem { | ||
308 | get { return m_wearables[AvatarWearable.SKIRT].ItemID; } | ||
309 | set { m_wearables[AvatarWearable.SKIRT].ItemID = value; } | ||
310 | } | ||
311 | |||
312 | public virtual UUID SkirtAsset { | ||
313 | get { return m_wearables[AvatarWearable.SKIRT].AssetID; } | ||
314 | set { m_wearables[AvatarWearable.SKIRT].AssetID = value; } | ||
315 | } | ||
316 | |||
317 | public virtual float AvatarHeight | 89 | public virtual float AvatarHeight |
318 | { | 90 | { |
319 | get { return m_avatarHeight; } | 91 | get { return m_avatarHeight; } |
@@ -407,7 +179,7 @@ namespace OpenSim.Framework | |||
407 | m_wearables = null; | 179 | m_wearables = null; |
408 | if (appearance.Wearables != null) | 180 | if (appearance.Wearables != null) |
409 | { | 181 | { |
410 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; //should be 13 of these | 182 | m_wearables = new AvatarWearable[AvatarWearable.MAX_WEARABLES]; //should be 15 of these |
411 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 183 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
412 | SetWearable(i,appearance.Wearables[i]); | 184 | SetWearable(i,appearance.Wearables[i]); |
413 | } | 185 | } |
@@ -552,7 +324,9 @@ namespace OpenSim.Framework | |||
552 | // DEBUG ON | 324 | // DEBUG ON |
553 | // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); | 325 | // m_log.WarnFormat("[AVATARAPPEARANCE] set wearable {0} --> {1}:{2}",wearableId,wearable.ItemID,wearable.AssetID); |
554 | // DEBUG OFF | 326 | // DEBUG OFF |
555 | m_wearables[wearableId] = new AvatarWearable(wearable.ItemID,wearable.AssetID); | 327 | m_wearables[wearableId].Clear(); |
328 | for (int i = 0 ; i < wearable.Count ; i++) | ||
329 | m_wearables[wearableId].Add(wearable[i].ItemID, wearable[i].AssetID); | ||
556 | } | 330 | } |
557 | 331 | ||
558 | 332 | ||
@@ -568,7 +342,10 @@ namespace OpenSim.Framework | |||
568 | s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID); | 342 | s += String.Format("Texture: {0} --> {1}\n",i,m_texture.FaceTextures[i].TextureID); |
569 | 343 | ||
570 | foreach (AvatarWearable awear in m_wearables) | 344 | foreach (AvatarWearable awear in m_wearables) |
571 | s += String.Format("Wearable: item={0}, asset={1}\n",awear.ItemID,awear.AssetID); | 345 | { |
346 | for ( int i = 0 ; i < awear.Count ; i++ ) | ||
347 | s += String.Format("Wearable: item={0}, asset={1}\n",awear[i].ItemID,awear[i].AssetID); | ||
348 | } | ||
572 | 349 | ||
573 | s += "Visual Params: "; | 350 | s += "Visual Params: "; |
574 | for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) | 351 | for (uint j = 0; j < AvatarAppearance.VISUALPARAM_COUNT; j++) |
@@ -738,7 +515,7 @@ namespace OpenSim.Framework | |||
738 | { | 515 | { |
739 | OSDArray wears = (OSDArray)(data["wearables"]); | 516 | OSDArray wears = (OSDArray)(data["wearables"]); |
740 | for (int i = 0; i < wears.Count; i++) | 517 | for (int i = 0; i < wears.Count; i++) |
741 | m_wearables[i] = new AvatarWearable((OSDMap)wears[i]); | 518 | m_wearables[i] = new AvatarWearable((OSDArray)wears[i]); |
742 | } | 519 | } |
743 | else | 520 | else |
744 | { | 521 | { |
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index 87098bf..631971f 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs | |||
@@ -26,11 +26,24 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | ||
29 | using OpenMetaverse; | 30 | using OpenMetaverse; |
30 | using OpenMetaverse.StructuredData; | 31 | using OpenMetaverse.StructuredData; |
31 | 32 | ||
32 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
33 | { | 34 | { |
35 | public struct WearableItem | ||
36 | { | ||
37 | public UUID ItemID; | ||
38 | public UUID AssetID; | ||
39 | |||
40 | public WearableItem(UUID itemID, UUID assetID) | ||
41 | { | ||
42 | ItemID = itemID; | ||
43 | AssetID = assetID; | ||
44 | } | ||
45 | } | ||
46 | |||
34 | public class AvatarWearable | 47 | public class AvatarWearable |
35 | { | 48 | { |
36 | // these are guessed at by the list here - | 49 | // these are guessed at by the list here - |
@@ -49,8 +62,10 @@ namespace OpenSim.Framework | |||
49 | public static readonly int UNDERSHIRT = 10; | 62 | public static readonly int UNDERSHIRT = 10; |
50 | public static readonly int UNDERPANTS = 11; | 63 | public static readonly int UNDERPANTS = 11; |
51 | public static readonly int SKIRT = 12; | 64 | public static readonly int SKIRT = 12; |
65 | public static readonly int ALPHA = 13; | ||
66 | public static readonly int TATTOO = 15; | ||
52 | 67 | ||
53 | public static readonly int MAX_WEARABLES = 13; | 68 | public static readonly int MAX_WEARABLES = 15; |
54 | 69 | ||
55 | public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); | 70 | public static readonly UUID DEFAULT_BODY_ITEM = new UUID("66c41e39-38f9-f75a-024e-585989bfaba9"); |
56 | public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); | 71 | public static readonly UUID DEFAULT_BODY_ASSET = new UUID("66c41e39-38f9-f75a-024e-585989bfab73"); |
@@ -67,68 +82,158 @@ namespace OpenSim.Framework | |||
67 | 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"); |
68 | 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"); |
69 | 84 | ||
70 | public UUID AssetID; | 85 | public static readonly UUID DEFAULT_ALPHA_ITEM = new UUID("bfb9923c-4838-4d2d-bf07-608c5b1165c8"); |
71 | public UUID ItemID; | 86 | public static readonly UUID DEFAULT_ALPHA_ASSET = new UUID("1578a2b1-5179-4b53-b618-fe00ca5a5594"); |
87 | |||
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"); | ||
90 | |||
91 | |||
92 | protected Dictionary<UUID, UUID> m_items = new Dictionary<UUID, UUID>(); | ||
93 | protected List<UUID> m_ids = new List<UUID>(); | ||
72 | 94 | ||
73 | public AvatarWearable() | 95 | public AvatarWearable() |
74 | { | 96 | { |
75 | } | 97 | } |
76 | 98 | ||
77 | public AvatarWearable(UUID itemId, UUID assetId) | 99 | public AvatarWearable(UUID itemID, UUID assetID) |
78 | { | 100 | { |
79 | AssetID = assetId; | 101 | Wear(itemID, assetID); |
80 | ItemID = itemId; | ||
81 | } | 102 | } |
82 | 103 | ||
83 | public AvatarWearable(OSDMap args) | 104 | public AvatarWearable(OSDArray args) |
84 | { | 105 | { |
85 | Unpack(args); | 106 | Unpack(args); |
86 | } | 107 | } |
87 | 108 | ||
88 | public OSDMap Pack() | 109 | public OSD Pack() |
110 | { | ||
111 | OSDArray wearlist = new OSDArray(); | ||
112 | |||
113 | foreach (UUID id in m_ids) | ||
114 | { | ||
115 | OSDMap weardata = new OSDMap(); | ||
116 | weardata["item"] = OSD.FromUUID(id); | ||
117 | weardata["asset"] = OSD.FromUUID(m_items[id]); | ||
118 | wearlist.Add(weardata); | ||
119 | } | ||
120 | |||
121 | return wearlist; | ||
122 | } | ||
123 | |||
124 | public void Unpack(OSDArray args) | ||
125 | { | ||
126 | Clear(); | ||
127 | |||
128 | foreach (OSDMap weardata in args) | ||
129 | { | ||
130 | Add(weardata["item"].AsUUID(), weardata["asset"].AsUUID()); | ||
131 | } | ||
132 | } | ||
133 | |||
134 | public int Count | ||
135 | { | ||
136 | get { return m_ids.Count; } | ||
137 | } | ||
138 | |||
139 | public void Add(UUID itemID, UUID assetID) | ||
140 | { | ||
141 | if (itemID == UUID.Zero) | ||
142 | return; | ||
143 | if (m_items.ContainsKey(itemID)) | ||
144 | { | ||
145 | m_items[itemID] = assetID; | ||
146 | return; | ||
147 | } | ||
148 | if (m_ids.Count >= 5) | ||
149 | return; | ||
150 | |||
151 | m_ids.Add(itemID); | ||
152 | m_items[itemID] = assetID; | ||
153 | } | ||
154 | |||
155 | public void Wear(UUID itemID, UUID assetID) | ||
89 | { | 156 | { |
90 | OSDMap weardata = new OSDMap(); | 157 | Clear(); |
91 | weardata["item"] = OSD.FromUUID(ItemID); | 158 | Add(itemID, assetID); |
92 | weardata["asset"] = OSD.FromUUID(AssetID); | 159 | } |
93 | 160 | ||
94 | return weardata; | 161 | public void Clear() |
162 | { | ||
163 | m_ids.Clear(); | ||
164 | m_items.Clear(); | ||
95 | } | 165 | } |
96 | 166 | ||
97 | public void Unpack(OSDMap args) | 167 | public void RemoveItem(UUID itemID) |
98 | { | 168 | { |
99 | ItemID = (args["item"] != null) ? args["item"].AsUUID() : UUID.Zero; | 169 | if (m_items.ContainsKey(itemID)) |
100 | AssetID = (args["asset"] != null) ? args["asset"].AsUUID() : UUID.Zero; | 170 | { |
171 | m_ids.Remove(itemID); | ||
172 | m_items.Remove(itemID); | ||
173 | } | ||
174 | } | ||
175 | |||
176 | public void RemoveAsset(UUID assetID) | ||
177 | { | ||
178 | UUID itemID = UUID.Zero; | ||
179 | |||
180 | foreach (KeyValuePair<UUID, UUID> kvp in m_items) | ||
181 | { | ||
182 | if (kvp.Value == assetID) | ||
183 | { | ||
184 | itemID = kvp.Key; | ||
185 | break; | ||
186 | } | ||
187 | } | ||
188 | |||
189 | if (itemID != UUID.Zero) | ||
190 | { | ||
191 | m_ids.Remove(itemID); | ||
192 | m_items.Remove(itemID); | ||
193 | } | ||
194 | } | ||
195 | |||
196 | public WearableItem this [int idx] | ||
197 | { | ||
198 | get | ||
199 | { | ||
200 | if (idx >= m_ids.Count || idx < 0) | ||
201 | return new WearableItem(UUID.Zero, UUID.Zero); | ||
202 | |||
203 | return new WearableItem(m_ids[idx], m_items[m_ids[idx]]); | ||
204 | } | ||
101 | } | 205 | } |
102 | 206 | ||
103 | public static AvatarWearable[] DefaultWearables | 207 | public static AvatarWearable[] DefaultWearables |
104 | { | 208 | { |
105 | get | 209 | get |
106 | { | 210 | { |
107 | AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 13 of these | 211 | AvatarWearable[] defaultWearables = new AvatarWearable[MAX_WEARABLES]; //should be 15 of these |
108 | for (int i = 0; i < MAX_WEARABLES; i++) | 212 | for (int i = 0; i < MAX_WEARABLES; i++) |
109 | { | 213 | { |
110 | defaultWearables[i] = new AvatarWearable(); | 214 | defaultWearables[i] = new AvatarWearable(); |
111 | } | 215 | } |
112 | 216 | ||
113 | // Body | 217 | // Body |
114 | defaultWearables[0].ItemID = DEFAULT_BODY_ITEM; | 218 | defaultWearables[BODY].Add(DEFAULT_BODY_ITEM, DEFAULT_BODY_ASSET); |
115 | defaultWearables[0].AssetID = DEFAULT_BODY_ASSET; | ||
116 | 219 | ||
117 | // Hair | 220 | // Hair |
118 | defaultWearables[2].ItemID = DEFAULT_HAIR_ITEM; | 221 | defaultWearables[HAIR].Add(DEFAULT_HAIR_ITEM, DEFAULT_HAIR_ASSET); |
119 | defaultWearables[2].AssetID = DEFAULT_HAIR_ASSET; | ||
120 | 222 | ||
121 | // Skin | 223 | // Skin |
122 | defaultWearables[1].ItemID = DEFAULT_SKIN_ITEM; | 224 | defaultWearables[SKIN].Add(DEFAULT_SKIN_ITEM, DEFAULT_SKIN_ASSET); |
123 | defaultWearables[1].AssetID = DEFAULT_SKIN_ASSET; | ||
124 | 225 | ||
125 | // Shirt | 226 | // Shirt |
126 | defaultWearables[4].ItemID = DEFAULT_SHIRT_ITEM; | 227 | defaultWearables[SHIRT].Add(DEFAULT_SHIRT_ITEM, DEFAULT_SHIRT_ASSET); |
127 | defaultWearables[4].AssetID = DEFAULT_SHIRT_ASSET; | ||
128 | 228 | ||
129 | // Pants | 229 | // Pants |
130 | defaultWearables[5].ItemID = DEFAULT_PANTS_ITEM; | 230 | defaultWearables[PANTS].Add(DEFAULT_PANTS_ITEM, DEFAULT_PANTS_ASSET); |
131 | defaultWearables[5].AssetID = DEFAULT_PANTS_ASSET; | 231 | |
232 | // Alpha | ||
233 | defaultWearables[ALPHA].Add(DEFAULT_ALPHA_ITEM, DEFAULT_ALPHA_ASSET); | ||
234 | |||
235 | // Tattoo | ||
236 | defaultWearables[TATTOO].Add(DEFAULT_TATTOO_ITEM, DEFAULT_TATTOO_ASSET); | ||
132 | 237 | ||
133 | return defaultWearables; | 238 | return defaultWearables; |
134 | } | 239 | } |
diff --git a/OpenSim/Framework/ChildAgentDataUpdate.cs b/OpenSim/Framework/ChildAgentDataUpdate.cs index 66487f7..ddfaaed 100644 --- a/OpenSim/Framework/ChildAgentDataUpdate.cs +++ b/OpenSim/Framework/ChildAgentDataUpdate.cs | |||
@@ -414,12 +414,10 @@ namespace OpenSim.Framework | |||
414 | // We might not pass this in all cases... | 414 | // We might not pass this in all cases... |
415 | if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) | 415 | if ((Appearance.Wearables != null) && (Appearance.Wearables.Length > 0)) |
416 | { | 416 | { |
417 | OSDArray wears = new OSDArray(Appearance.Wearables.Length * 2); | 417 | OSDArray wears = new OSDArray(Appearance.Wearables.Length); |
418 | foreach (AvatarWearable awear in Appearance.Wearables) | 418 | foreach (AvatarWearable awear in Appearance.Wearables) |
419 | { | 419 | wears.Add(awear.Pack()); |
420 | wears.Add(OSD.FromUUID(awear.ItemID)); | 420 | |
421 | wears.Add(OSD.FromUUID(awear.AssetID)); | ||
422 | } | ||
423 | args["wearables"] = wears; | 421 | args["wearables"] = wears; |
424 | } | 422 | } |
425 | 423 | ||
@@ -592,7 +590,7 @@ namespace OpenSim.Framework | |||
592 | OSDArray wears = (OSDArray)(args["wearables"]); | 590 | OSDArray wears = (OSDArray)(args["wearables"]); |
593 | for (int i = 0; i < wears.Count / 2; i++) | 591 | for (int i = 0; i < wears.Count / 2; i++) |
594 | { | 592 | { |
595 | AvatarWearable awear = new AvatarWearable(wears[i*2].AsUUID(),wears[(i*2)+1].AsUUID()); | 593 | AvatarWearable awear = new AvatarWearable((OSDArray)wears[i]); |
596 | Appearance.SetWearable(i,awear); | 594 | Appearance.SetWearable(i,awear); |
597 | } | 595 | } |
598 | } | 596 | } |
diff --git a/OpenSim/Framework/Servers/VersionInfo.cs b/OpenSim/Framework/Servers/VersionInfo.cs index c88e0d1..c9d4c93 100644 --- a/OpenSim/Framework/Servers/VersionInfo.cs +++ b/OpenSim/Framework/Servers/VersionInfo.cs | |||
@@ -69,6 +69,6 @@ namespace OpenSim | |||
69 | /// of the code that is too old. | 69 | /// of the code that is too old. |
70 | /// | 70 | /// |
71 | /// </value> | 71 | /// </value> |
72 | public readonly static int MajorInterfaceVersion = 6; | 72 | public readonly static int MajorInterfaceVersion = 7; |
73 | } | 73 | } |
74 | } | 74 | } |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 14f923d..d7458b7 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -3387,20 +3387,29 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3387 | aw.AgentData.SerialNum = (uint)serial; | 3387 | aw.AgentData.SerialNum = (uint)serial; |
3388 | aw.AgentData.SessionID = m_sessionId; | 3388 | aw.AgentData.SessionID = m_sessionId; |
3389 | 3389 | ||
3390 | int count = 0; | ||
3391 | for (int i = 0; i < wearables.Length; i++) | ||
3392 | count += wearables[i].Count; | ||
3393 | |||
3390 | // TODO: don't create new blocks if recycling an old packet | 3394 | // TODO: don't create new blocks if recycling an old packet |
3391 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[13]; | 3395 | aw.WearableData = new AgentWearablesUpdatePacket.WearableDataBlock[count]; |
3392 | AgentWearablesUpdatePacket.WearableDataBlock awb; | 3396 | AgentWearablesUpdatePacket.WearableDataBlock awb; |
3397 | int idx = 0; | ||
3393 | for (int i = 0; i < wearables.Length; i++) | 3398 | for (int i = 0; i < wearables.Length; i++) |
3394 | { | 3399 | { |
3395 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); | 3400 | for (int j = 0; j < wearables[i].Count; j++) |
3396 | awb.WearableType = (byte)i; | 3401 | { |
3397 | awb.AssetID = wearables[i].AssetID; | 3402 | awb = new AgentWearablesUpdatePacket.WearableDataBlock(); |
3398 | awb.ItemID = wearables[i].ItemID; | 3403 | awb.WearableType = (byte)i; |
3399 | aw.WearableData[i] = awb; | 3404 | awb.AssetID = wearables[i][j].AssetID; |
3405 | awb.ItemID = wearables[i][j].ItemID; | ||
3406 | aw.WearableData[idx] = awb; | ||
3407 | idx++; | ||
3400 | 3408 | ||
3401 | // m_log.DebugFormat( | 3409 | // m_log.DebugFormat( |
3402 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", | 3410 | // "[APPEARANCE]: Sending wearable item/asset {0} {1} (index {2}) for {3}", |
3403 | // awb.ItemID, awb.AssetID, i, Name); | 3411 | // awb.ItemID, awb.AssetID, i, Name); |
3412 | } | ||
3404 | } | 3413 | } |
3405 | 3414 | ||
3406 | OutPacket(aw, ThrottleOutPacketType.Task); | 3415 | OutPacket(aw, ThrottleOutPacketType.Task); |
diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index bfbbcf8..4d27ea4 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -393,27 +393,22 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory | |||
393 | { | 393 | { |
394 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) | 394 | for (int i = 0; i < AvatarWearable.MAX_WEARABLES; i++) |
395 | { | 395 | { |
396 | if (appearance.Wearables[i].ItemID == UUID.Zero) | 396 | for (int j = 0 ; j < appearance.Wearables[j].Count ; j ++ ) |
397 | { | 397 | { |
398 | appearance.Wearables[i].AssetID = UUID.Zero; | 398 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i][j].ItemID, userID); |
399 | } | ||
400 | else | ||
401 | { | ||
402 | InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); | ||
403 | baseItem = invService.GetItem(baseItem); | 399 | baseItem = invService.GetItem(baseItem); |
404 | 400 | ||
405 | if (baseItem != null) | 401 | if (baseItem != null) |
406 | { | 402 | { |
407 | appearance.Wearables[i].AssetID = baseItem.AssetID; | 403 | appearance.Wearables[i].Add(appearance.Wearables[i][j].ItemID, baseItem.AssetID); |
408 | } | 404 | } |
409 | else | 405 | else |
410 | { | 406 | { |
411 | m_log.ErrorFormat( | 407 | m_log.ErrorFormat( |
412 | "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", | 408 | "[AVFACTORY]: Can't find inventory item {0} for {1}, setting to default", |
413 | appearance.Wearables[i].ItemID, (WearableType)i); | 409 | appearance.Wearables[i][j].ItemID, (WearableType)i); |
414 | 410 | ||
415 | appearance.Wearables[i].ItemID = UUID.Zero; | 411 | appearance.Wearables[i].RemoveItem(appearance.Wearables[i][j].ItemID); |
416 | appearance.Wearables[i].AssetID = UUID.Zero; | ||
417 | } | 412 | } |
418 | } | 413 | } |
419 | } | 414 | } |
diff --git a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs index ea9b4b4..7a28c2b 100644 --- a/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs +++ b/OpenSim/Services/Connectors/SimianGrid/SimianAvatarServiceConnector.cs | |||
@@ -265,32 +265,33 @@ namespace OpenSim.Services.Connectors.SimianGrid | |||
265 | 265 | ||
266 | map["Height"] = OSD.FromReal(appearance.AvatarHeight); | 266 | map["Height"] = OSD.FromReal(appearance.AvatarHeight); |
267 | 267 | ||
268 | map["ShapeItem"] = OSD.FromUUID(appearance.BodyItem); | 268 | map["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString(); |
269 | map["ShapeAsset"] = OSD.FromUUID(appearance.BodyAsset); | 269 | map["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString(); |
270 | map["SkinItem"] = OSD.FromUUID(appearance.SkinItem); | 270 | map["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString(); |
271 | map["SkinAsset"] = OSD.FromUUID(appearance.SkinAsset); | 271 | map["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString(); |
272 | map["HairItem"] = OSD.FromUUID(appearance.HairItem); | 272 | map["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString(); |
273 | map["HairAsset"] = OSD.FromUUID(appearance.HairAsset); | 273 | map["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString(); |
274 | map["EyesItem"] = OSD.FromUUID(appearance.EyesItem); | 274 | map["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString(); |
275 | map["EyesAsset"] = OSD.FromUUID(appearance.EyesAsset); | 275 | map["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString(); |
276 | map["ShirtItem"] = OSD.FromUUID(appearance.ShirtItem); | 276 | map["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString(); |
277 | map["ShirtAsset"] = OSD.FromUUID(appearance.ShirtAsset); | 277 | map["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString(); |
278 | map["PantsItem"] = OSD.FromUUID(appearance.PantsItem); | 278 | map["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString(); |
279 | map["PantsAsset"] = OSD.FromUUID(appearance.PantsAsset); | 279 | map["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString(); |
280 | map["ShoesItem"] = OSD.FromUUID(appearance.ShoesItem); | 280 | map["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString(); |
281 | map["ShoesAsset"] = OSD.FromUUID(appearance.ShoesAsset); | 281 | map["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString(); |
282 | map["SocksItem"] = OSD.FromUUID(appearance.SocksItem); | 282 | map["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString(); |
283 | map["SocksAsset"] = OSD.FromUUID(appearance.SocksAsset); | 283 | map["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString(); |
284 | map["JacketItem"] = OSD.FromUUID(appearance.JacketItem); | 284 | map["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString(); |
285 | map["JacketAsset"] = OSD.FromUUID(appearance.JacketAsset); | 285 | map["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString(); |
286 | map["GlovesItem"] = OSD.FromUUID(appearance.GlovesItem); | 286 | map["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString(); |
287 | map["GlovesAsset"] = OSD.FromUUID(appearance.GlovesAsset); | 287 | map["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString(); |
288 | map["UndershirtItem"] = OSD.FromUUID(appearance.UnderShirtItem); | 288 | map["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString(); |
289 | map["UndershirtAsset"] = OSD.FromUUID(appearance.UnderShirtAsset); | 289 | map["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString(); |
290 | map["UnderpantsItem"] = OSD.FromUUID(appearance.UnderPantsItem); | 290 | map["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString(); |
291 | map["UnderpantsAsset"] = OSD.FromUUID(appearance.UnderPantsAsset); | 291 | map["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString(); |
292 | map["SkirtItem"] = OSD.FromUUID(appearance.SkirtItem); | 292 | map["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString(); |
293 | map["SkirtAsset"] = OSD.FromUUID(appearance.SkirtAsset); | 293 | map["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString(); |
294 | |||
294 | 295 | ||
295 | OSDMap items = new OSDMap(); | 296 | OSDMap items = new OSDMap(); |
296 | foreach (KeyValuePair<string, string> kvp in avatar.Data) | 297 | foreach (KeyValuePair<string, string> kvp in avatar.Data) |
diff --git a/OpenSim/Services/Interfaces/IAvatarService.cs b/OpenSim/Services/Interfaces/IAvatarService.cs index eaa6534..a029fbc 100644 --- a/OpenSim/Services/Interfaces/IAvatarService.cs +++ b/OpenSim/Services/Interfaces/IAvatarService.cs | |||
@@ -149,33 +149,33 @@ namespace OpenSim.Services.Interfaces | |||
149 | Data["Serial"] = appearance.Serial.ToString(); | 149 | Data["Serial"] = appearance.Serial.ToString(); |
150 | // Wearables | 150 | // Wearables |
151 | Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); | 151 | Data["AvatarHeight"] = appearance.AvatarHeight.ToString(); |
152 | Data["BodyItem"] = appearance.BodyItem.ToString(); | 152 | Data["BodyItem"] = appearance.Wearables[AvatarWearable.BODY][0].ItemID.ToString(); |
153 | Data["EyesItem"] = appearance.EyesItem.ToString(); | 153 | Data["EyesItem"] = appearance.Wearables[AvatarWearable.EYES][0].ItemID.ToString(); |
154 | Data["GlovesItem"] = appearance.GlovesItem.ToString(); | 154 | Data["GlovesItem"] = appearance.Wearables[AvatarWearable.GLOVES][0].ItemID.ToString(); |
155 | Data["HairItem"] = appearance.HairItem.ToString(); | 155 | Data["HairItem"] = appearance.Wearables[AvatarWearable.HAIR][0].ItemID.ToString(); |
156 | Data["JacketItem"] = appearance.JacketItem.ToString(); | 156 | Data["JacketItem"] = appearance.Wearables[AvatarWearable.JACKET][0].ItemID.ToString(); |
157 | Data["PantsItem"] = appearance.PantsItem.ToString(); | 157 | Data["PantsItem"] = appearance.Wearables[AvatarWearable.PANTS][0].ItemID.ToString(); |
158 | Data["ShirtItem"] = appearance.ShirtItem.ToString(); | 158 | Data["ShirtItem"] = appearance.Wearables[AvatarWearable.SHIRT][0].ItemID.ToString(); |
159 | Data["ShoesItem"] = appearance.ShoesItem.ToString(); | 159 | Data["ShoesItem"] = appearance.Wearables[AvatarWearable.SHOES][0].ItemID.ToString(); |
160 | Data["SkinItem"] = appearance.SkinItem.ToString(); | 160 | Data["SkinItem"] = appearance.Wearables[AvatarWearable.SKIN][0].ItemID.ToString(); |
161 | Data["SkirtItem"] = appearance.SkirtItem.ToString(); | 161 | Data["SkirtItem"] = appearance.Wearables[AvatarWearable.SKIRT][0].ItemID.ToString(); |
162 | Data["SocksItem"] = appearance.SocksItem.ToString(); | 162 | Data["SocksItem"] = appearance.Wearables[AvatarWearable.SOCKS][0].ItemID.ToString(); |
163 | Data["UnderPantsItem"] = appearance.UnderPantsItem.ToString(); | 163 | Data["UnderPantsItem"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].ItemID.ToString(); |
164 | Data["UnderShirtItem"] = appearance.UnderShirtItem.ToString(); | 164 | Data["UnderShirtItem"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].ItemID.ToString(); |
165 | 165 | ||
166 | Data["BodyAsset"] = appearance.BodyAsset.ToString(); | 166 | Data["BodyAsset"] = appearance.Wearables[AvatarWearable.BODY][0].AssetID.ToString(); |
167 | Data["EyesAsset"] = appearance.EyesAsset.ToString(); | 167 | Data["EyesAsset"] = appearance.Wearables[AvatarWearable.EYES][0].AssetID.ToString(); |
168 | Data["GlovesAsset"] = appearance.GlovesAsset.ToString(); | 168 | Data["GlovesAsset"] = appearance.Wearables[AvatarWearable.GLOVES][0].AssetID.ToString(); |
169 | Data["HairAsset"] = appearance.HairAsset.ToString(); | 169 | Data["HairAsset"] = appearance.Wearables[AvatarWearable.HAIR][0].AssetID.ToString(); |
170 | Data["JacketAsset"] = appearance.JacketAsset.ToString(); | 170 | Data["JacketAsset"] = appearance.Wearables[AvatarWearable.JACKET][0].AssetID.ToString(); |
171 | Data["PantsAsset"] = appearance.PantsAsset.ToString(); | 171 | Data["PantsAsset"] = appearance.Wearables[AvatarWearable.PANTS][0].AssetID.ToString(); |
172 | Data["ShirtAsset"] = appearance.ShirtAsset.ToString(); | 172 | Data["ShirtAsset"] = appearance.Wearables[AvatarWearable.SHIRT][0].AssetID.ToString(); |
173 | Data["ShoesAsset"] = appearance.ShoesAsset.ToString(); | 173 | Data["ShoesAsset"] = appearance.Wearables[AvatarWearable.SHOES][0].AssetID.ToString(); |
174 | Data["SkinAsset"] = appearance.SkinAsset.ToString(); | 174 | Data["SkinAsset"] = appearance.Wearables[AvatarWearable.SKIN][0].AssetID.ToString(); |
175 | Data["SkirtAsset"] = appearance.SkirtAsset.ToString(); | 175 | Data["SkirtAsset"] = appearance.Wearables[AvatarWearable.SKIRT][0].AssetID.ToString(); |
176 | Data["SocksAsset"] = appearance.SocksAsset.ToString(); | 176 | Data["SocksAsset"] = appearance.Wearables[AvatarWearable.SOCKS][0].AssetID.ToString(); |
177 | Data["UnderPantsAsset"] = appearance.UnderPantsAsset.ToString(); | 177 | Data["UnderPantsAsset"] = appearance.Wearables[AvatarWearable.UNDERPANTS][0].AssetID.ToString(); |
178 | Data["UnderShirtAsset"] = appearance.UnderShirtAsset.ToString(); | 178 | Data["UnderShirtAsset"] = appearance.Wearables[AvatarWearable.UNDERSHIRT][0].AssetID.ToString(); |
179 | 179 | ||
180 | // Attachments | 180 | // Attachments |
181 | List<AvatarAttachment> attachments = appearance.GetAttachments(); | 181 | List<AvatarAttachment> attachments = appearance.GetAttachments(); |
@@ -193,33 +193,57 @@ namespace OpenSim.Services.Interfaces | |||
193 | appearance.Serial = Int32.Parse(Data["Serial"]); | 193 | appearance.Serial = Int32.Parse(Data["Serial"]); |
194 | 194 | ||
195 | // Wearables | 195 | // Wearables |
196 | appearance.BodyItem = UUID.Parse(Data["BodyItem"]); | 196 | appearance.Wearables[AvatarWearable.BODY].Wear( |
197 | appearance.EyesItem = UUID.Parse(Data["EyesItem"]); | 197 | UUID.Parse(Data["BodyItem"]), |
198 | appearance.GlovesItem = UUID.Parse(Data["GlovesItem"]); | 198 | UUID.Parse(Data["BodyAsset"])); |
199 | appearance.HairItem = UUID.Parse(Data["HairItem"]); | 199 | |
200 | appearance.JacketItem = UUID.Parse(Data["JacketItem"]); | 200 | appearance.Wearables[AvatarWearable.SKIN].Wear( |
201 | appearance.PantsItem = UUID.Parse(Data["PantsItem"]); | 201 | UUID.Parse(Data["SkinItem"]), |
202 | appearance.ShirtItem = UUID.Parse(Data["ShirtItem"]); | 202 | UUID.Parse(Data["SkinAsset"])); |
203 | appearance.ShoesItem = UUID.Parse(Data["ShoesItem"]); | 203 | |
204 | appearance.SkinItem = UUID.Parse(Data["SkinItem"]); | 204 | appearance.Wearables[AvatarWearable.HAIR].Wear( |
205 | appearance.SkirtItem = UUID.Parse(Data["SkirtItem"]); | 205 | UUID.Parse(Data["HairItem"]), |
206 | appearance.SocksItem = UUID.Parse(Data["SocksItem"]); | 206 | UUID.Parse(Data["HairAsset"])); |
207 | appearance.UnderPantsItem = UUID.Parse(Data["UnderPantsItem"]); | 207 | |
208 | appearance.UnderShirtItem = UUID.Parse(Data["UnderShirtItem"]); | 208 | appearance.Wearables[AvatarWearable.EYES].Wear( |
209 | 209 | UUID.Parse(Data["EyesItem"]), | |
210 | appearance.BodyAsset = UUID.Parse(Data["BodyAsset"]); | 210 | UUID.Parse(Data["EyesAsset"])); |
211 | appearance.EyesAsset = UUID.Parse(Data["EyesAsset"]); | 211 | |
212 | appearance.GlovesAsset = UUID.Parse(Data["GlovesAsset"]); | 212 | appearance.Wearables[AvatarWearable.SHIRT].Wear( |
213 | appearance.HairAsset = UUID.Parse(Data["HairAsset"]); | 213 | UUID.Parse(Data["ShirtItem"]), |
214 | appearance.JacketAsset = UUID.Parse(Data["JacketAsset"]); | 214 | UUID.Parse(Data["ShirtAsset"])); |
215 | appearance.PantsAsset = UUID.Parse(Data["PantsAsset"]); | 215 | |
216 | appearance.ShirtAsset = UUID.Parse(Data["ShirtAsset"]); | 216 | appearance.Wearables[AvatarWearable.PANTS].Wear( |
217 | appearance.ShoesAsset = UUID.Parse(Data["ShoesAsset"]); | 217 | UUID.Parse(Data["PantsItem"]), |
218 | appearance.SkinAsset = UUID.Parse(Data["SkinAsset"]); | 218 | UUID.Parse(Data["PantsAsset"])); |
219 | appearance.SkirtAsset = UUID.Parse(Data["SkirtAsset"]); | 219 | |
220 | appearance.SocksAsset = UUID.Parse(Data["SocksAsset"]); | 220 | appearance.Wearables[AvatarWearable.SHOES].Wear( |
221 | appearance.UnderPantsAsset = UUID.Parse(Data["UnderPantsAsset"]); | 221 | UUID.Parse(Data["ShoesItem"]), |
222 | appearance.UnderShirtAsset = UUID.Parse(Data["UnderShirtAsset"]); | 222 | UUID.Parse(Data["ShoesAsset"])); |
223 | |||
224 | appearance.Wearables[AvatarWearable.SOCKS].Wear( | ||
225 | UUID.Parse(Data["SocksItem"]), | ||
226 | UUID.Parse(Data["SocksAsset"])); | ||
227 | |||
228 | appearance.Wearables[AvatarWearable.JACKET].Wear( | ||
229 | UUID.Parse(Data["JacketItem"]), | ||
230 | UUID.Parse(Data["JacketAsset"])); | ||
231 | |||
232 | appearance.Wearables[AvatarWearable.GLOVES].Wear( | ||
233 | UUID.Parse(Data["GlovesItem"]), | ||
234 | UUID.Parse(Data["GlovesAsset"])); | ||
235 | |||
236 | appearance.Wearables[AvatarWearable.UNDERSHIRT].Wear( | ||
237 | UUID.Parse(Data["UnderShirtItem"]), | ||
238 | UUID.Parse(Data["UnderShirtAsset"])); | ||
239 | |||
240 | appearance.Wearables[AvatarWearable.UNDERPANTS].Wear( | ||
241 | UUID.Parse(Data["UnderPantsItem"]), | ||
242 | UUID.Parse(Data["UnderPantsAsset"])); | ||
243 | |||
244 | appearance.Wearables[AvatarWearable.SKIRT].Wear( | ||
245 | UUID.Parse(Data["SkirtItem"]), | ||
246 | UUID.Parse(Data["SkirtAsset"])); | ||
223 | 247 | ||
224 | // Attachments | 248 | // Attachments |
225 | Dictionary<string, string> attchs = new Dictionary<string, string>(); | 249 | Dictionary<string, string> attchs = new Dictionary<string, string>(); |