diff options
author | Johan Berntsson | 2008-03-04 05:31:54 +0000 |
---|---|---|
committer | Johan Berntsson | 2008-03-04 05:31:54 +0000 |
commit | 279e0061c515ee0a03036bef68eea9738273d785 (patch) | |
tree | 4502228eb7b87a760e0b0e67aded9d1d870d0bed /OpenSim/Framework/AvatarWearable.cs | |
parent | Added copyright heaaders. Minor cleanup. (diff) | |
download | opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.zip opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.tar.gz opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.tar.bz2 opensim-SC_OLD-279e0061c515ee0a03036bef68eea9738273d785.tar.xz |
Merged 3Di code that provides scene and avatar serialization, and plugin support for region move/split/merge. See ThirdParty/3Di/README.txt. Unless the new modules are used there should be no noticeable changes when running OpenSim.
Diffstat (limited to 'OpenSim/Framework/AvatarWearable.cs')
-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 | } |