diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/AvatarWearable.cs | 35 |
1 files changed, 33 insertions, 2 deletions
diff --git a/OpenSim/Framework/AvatarWearable.cs b/OpenSim/Framework/AvatarWearable.cs index c7083f3..e7c2338 100644 --- a/OpenSim/Framework/AvatarWearable.cs +++ b/OpenSim/Framework/AvatarWearable.cs | |||
@@ -26,10 +26,14 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using libsecondlife; | 28 | using libsecondlife; |
29 | using System; | ||
30 | using System.Runtime.Serialization; | ||
31 | using System.Security.Permissions; | ||
29 | 32 | ||
30 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
31 | { | 34 | { |
32 | public class AvatarWearable | 35 | [Serializable] |
36 | public class AvatarWearable : ISerializable | ||
33 | { | 37 | { |
34 | public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 38 | public LLUUID AssetID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
35 | public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); | 39 | public LLUUID ItemID = new LLUUID("00000000-0000-0000-0000-000000000000"); |
@@ -67,5 +71,32 @@ namespace OpenSim.Framework | |||
67 | return defaultWearables; | 71 | return defaultWearables; |
68 | } | 72 | } |
69 | } | 73 | } |
74 | protected AvatarWearable(SerializationInfo info, StreamingContext context) | ||
75 | { | ||
76 | //System.Console.WriteLine("AvatarWearable Deserialize BGN"); | ||
77 | if (info == null) | ||
78 | { | ||
79 | throw new System.ArgumentNullException("info"); | ||
80 | } | ||
81 | |||
82 | AssetID = new LLUUID((Guid)info.GetValue("AssetID", typeof(Guid))); | ||
83 | ItemID = new LLUUID((Guid)info.GetValue("ItemID", typeof(Guid))); | ||
84 | |||
85 | //System.Console.WriteLine("AvatarWearable Deserialize END"); | ||
86 | } | ||
87 | |||
88 | [SecurityPermission(SecurityAction.LinkDemand, | ||
89 | Flags = SecurityPermissionFlag.SerializationFormatter)] | ||
90 | public virtual void GetObjectData( | ||
91 | SerializationInfo info, StreamingContext context) | ||
92 | { | ||
93 | if (info == null) | ||
94 | { | ||
95 | throw new System.ArgumentNullException("info"); | ||
96 | } | ||
97 | |||
98 | info.AddValue("AssetID", AssetID.UUID); | ||
99 | info.AddValue("ItemID", ItemID.UUID); | ||
100 | } | ||
70 | } | 101 | } |
71 | } \ No newline at end of file | 102 | } |