diff options
author | Sean Dague | 2008-05-16 16:01:36 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-16 16:01:36 +0000 |
commit | 6a526fcb6fe9ddc651976b3c37422dc96d1e7bd7 (patch) | |
tree | cb5c467ccf8a46b41a3d8305bdb37e538a4ec89d | |
parent | starting to put appearance into grid comms. now I know why (diff) | |
download | opensim-SC-6a526fcb6fe9ddc651976b3c37422dc96d1e7bd7.zip opensim-SC-6a526fcb6fe9ddc651976b3c37422dc96d1e7bd7.tar.gz opensim-SC-6a526fcb6fe9ddc651976b3c37422dc96d1e7bd7.tar.bz2 opensim-SC-6a526fcb6fe9ddc651976b3c37422dc96d1e7bd7.tar.xz |
add to / from hash mapping for grid serialization
-rw-r--r-- | OpenSim/Framework/AvatarAppearance.cs | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/OpenSim/Framework/AvatarAppearance.cs b/OpenSim/Framework/AvatarAppearance.cs index 365df1a..d4bfb2c 100644 --- a/OpenSim/Framework/AvatarAppearance.cs +++ b/OpenSim/Framework/AvatarAppearance.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.Runtime.Serialization; | 31 | using System.Runtime.Serialization; |
31 | using System.Security.Permissions; | 32 | using System.Security.Permissions; |
@@ -325,6 +326,79 @@ namespace OpenSim.Framework | |||
325 | //System.Console.WriteLine("AvatarAppearance Deserialize END"); | 326 | //System.Console.WriteLine("AvatarAppearance Deserialize END"); |
326 | } | 327 | } |
327 | 328 | ||
329 | // this is used for OGS1 | ||
330 | public Hashtable ToHashTable() | ||
331 | { | ||
332 | Hashtable h = new Hashtable(); | ||
333 | h["owner"] = Owner.ToString(); | ||
334 | h["serial"] = Serial.ToString(); | ||
335 | h["visual_params"] = VisualParams; | ||
336 | h["texture"] = Texture.ToBytes(); | ||
337 | h["avatar_height"] = AvatarHeight.ToString(); | ||
338 | h["body_item"] = BodyItem.ToString(); | ||
339 | h["body_asset"] = BodyAsset.ToString(); | ||
340 | h["skin_item"] = SkinItem.ToString(); | ||
341 | h["skin_asset"] = SkinAsset.ToString(); | ||
342 | h["hair_item"] = HairItem.ToString(); | ||
343 | h["hair_asset"] = HairAsset.ToString(); | ||
344 | h["eyes_item"] = EyesItem.ToString(); | ||
345 | h["eyes_asset"] = EyesAsset.ToString(); | ||
346 | h["shirt_item"] = ShirtItem.ToString(); | ||
347 | h["shirt_asset"] = ShirtAsset.ToString(); | ||
348 | h["pants_item"] = PantsItem.ToString(); | ||
349 | h["pants_asset"] = PantsAsset.ToString(); | ||
350 | h["shoes_item"] = ShoesItem.ToString(); | ||
351 | h["shoes_asset"] = ShoesAsset.ToString(); | ||
352 | h["socks_item"] = SocksItem.ToString(); | ||
353 | h["socks_asset"] = SocksAsset.ToString(); | ||
354 | h["jacket_item"] = JacketItem.ToString(); | ||
355 | h["jacket_asset"] = JacketAsset.ToString(); | ||
356 | h["gloves_item"] = GlovesItem.ToString(); | ||
357 | h["gloves_asset"] = GlovesAsset.ToString(); | ||
358 | h["undershirt_item"] = UnderShirtItem.ToString(); | ||
359 | h["undershirt_asset"] = UnderShirtAsset.ToString(); | ||
360 | h["underpants_item"] = UnderPantsItem.ToString(); | ||
361 | h["underpants_asset"] = UnderPantsAsset.ToString(); | ||
362 | h["skirt_item"] = SkirtItem.ToString(); | ||
363 | h["skirt_asset"] = SkirtAsset.ToString(); | ||
364 | return h; | ||
365 | } | ||
366 | |||
367 | public AvatarAppearance(Hashtable h) | ||
368 | { | ||
369 | Owner = new LLUUID((string)h["owner"]); | ||
370 | Serial = Convert.ToInt32((string)h["serial"]); | ||
371 | VisualParams = (byte[])h["visual_params"]; | ||
372 | Texture = new LLObject.TextureEntry((byte[])h["texture"], 0, ((byte[])h["texture"]).Length); | ||
373 | AvatarHeight = (float)Convert.ToDouble((string)h["avatar_height"]); | ||
374 | BodyItem = new LLUUID((string)h["body_item"]); | ||
375 | BodyAsset = new LLUUID((string)h["body_asset"]); | ||
376 | SkinItem = new LLUUID((string)h["skin_item"]); | ||
377 | SkinAsset = new LLUUID((string)h["skin_asset"]); | ||
378 | HairItem = new LLUUID((string)h["hair_item"]); | ||
379 | HairAsset = new LLUUID((string)h["hair_asset"]); | ||
380 | EyesItem = new LLUUID((string)h["eyes_item"]); | ||
381 | EyesAsset = new LLUUID((string)h["eyes_asset"]); | ||
382 | ShirtItem = new LLUUID((string)h["shirt_item"]); | ||
383 | ShirtAsset = new LLUUID((string)h["shirt_asset"]); | ||
384 | PantsItem = new LLUUID((string)h["pants_item"]); | ||
385 | PantsAsset = new LLUUID((string)h["pants_asset"]); | ||
386 | ShoesItem = new LLUUID((string)h["shoes_item"]); | ||
387 | ShoesAsset = new LLUUID((string)h["shoes_asset"]); | ||
388 | SocksItem = new LLUUID((string)h["socks_item"]); | ||
389 | SocksAsset = new LLUUID((string)h["socks_asset"]); | ||
390 | JacketItem = new LLUUID((string)h["jacket_item"]); | ||
391 | JacketAsset = new LLUUID((string)h["jacket_asset"]); | ||
392 | GlovesItem = new LLUUID((string)h["gloves_item"]); | ||
393 | GlovesAsset = new LLUUID((string)h["gloves_asset"]); | ||
394 | UnderShirtItem = new LLUUID((string)h["undershirt_item"]); | ||
395 | UnderShirtAsset = new LLUUID((string)h["undershirt_asset"]); | ||
396 | UnderPantsItem = new LLUUID((string)h["underpants_item"]); | ||
397 | UnderPantsAsset = new LLUUID((string)h["underpants_asset"]); | ||
398 | SkirtItem = new LLUUID((string)h["skirt_item"]); | ||
399 | SkirtAsset = new LLUUID((string)h["skirt_asset"]); | ||
400 | } | ||
401 | |||
328 | [SecurityPermission(SecurityAction.LinkDemand, | 402 | [SecurityPermission(SecurityAction.LinkDemand, |
329 | Flags = SecurityPermissionFlag.SerializationFormatter)] | 403 | Flags = SecurityPermissionFlag.SerializationFormatter)] |
330 | public virtual void GetObjectData( | 404 | public virtual void GetObjectData( |