diff options
author | morphw | 2007-05-15 14:43:35 +0000 |
---|---|---|
committer | morphw | 2007-05-15 14:43:35 +0000 |
commit | d326e84d5a2c6b4d5833546fa8ee88c67de48bae (patch) | |
tree | c076b1bdb2db02b4d4e31c860c471a9c2058a2d0 | |
parent | added processing for TeleportLocationRequest and TeleportLandmarkRequest. Lo... (diff) | |
download | opensim-SC_OLD-d326e84d5a2c6b4d5833546fa8ee88c67de48bae.zip opensim-SC_OLD-d326e84d5a2c6b4d5833546fa8ee88c67de48bae.tar.gz opensim-SC_OLD-d326e84d5a2c6b4d5833546fa8ee88c67de48bae.tar.bz2 opensim-SC_OLD-d326e84d5a2c6b4d5833546fa8ee88c67de48bae.tar.xz |
provide ready-to-eat attributes parsed from byte array
-rw-r--r-- | OpenSim.Framework/Types/AssetLandmark.cs | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/OpenSim.Framework/Types/AssetLandmark.cs b/OpenSim.Framework/Types/AssetLandmark.cs new file mode 100644 index 0000000..9d1a326 --- /dev/null +++ b/OpenSim.Framework/Types/AssetLandmark.cs | |||
@@ -0,0 +1,34 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | |||
6 | namespace OpenSim.Framework.Types | ||
7 | { | ||
8 | public class AssetLandmark : AssetBase | ||
9 | { | ||
10 | public int Version; | ||
11 | public LLVector3 Position; | ||
12 | public LLUUID RegionID; | ||
13 | |||
14 | public AssetLandmark(AssetBase a) | ||
15 | { | ||
16 | this.Data = a.Data; | ||
17 | this.FullID = a.FullID; | ||
18 | this.Type = a.Type; | ||
19 | this.InvType = a.InvType; | ||
20 | this.Name = a.Name; | ||
21 | this.Description = a.Description; | ||
22 | InternData(); | ||
23 | } | ||
24 | |||
25 | private void InternData() | ||
26 | { | ||
27 | string temp = System.Text.Encoding.UTF8.GetString(Data).Trim(); | ||
28 | string[] parts = temp.Split('\n'); | ||
29 | int.TryParse(parts[0].Substring(17, 1), out Version); | ||
30 | LLUUID.TryParse(parts[1].Substring(10, 36), out RegionID); | ||
31 | LLVector3.TryParse(parts[2].Substring(11, parts[2].Length - 11), out Position); | ||
32 | } | ||
33 | } | ||
34 | } | ||