aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AvatarWearable.cs
diff options
context:
space:
mode:
authorJohan Berntsson2008-03-04 05:31:54 +0000
committerJohan Berntsson2008-03-04 05:31:54 +0000
commit279e0061c515ee0a03036bef68eea9738273d785 (patch)
tree4502228eb7b87a760e0b0e67aded9d1d870d0bed /OpenSim/Framework/AvatarWearable.cs
parentAdded copyright heaaders. Minor cleanup. (diff)
downloadopensim-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 '')
-rw-r--r--OpenSim/Framework/AvatarWearable.cs35
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*/
28using libsecondlife; 28using libsecondlife;
29using System;
30using System.Runtime.Serialization;
31using System.Security.Permissions;
29 32
30namespace OpenSim.Framework 33namespace 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}