aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/World
diff options
context:
space:
mode:
authorTeravus Ovares2008-09-06 07:52:41 +0000
committerTeravus Ovares2008-09-06 07:52:41 +0000
commit7d89e122930be39e84a6d174548fa2d12ac0484a (patch)
treee5aa5752f988a9aba2a969f49e5e208985eda80c /OpenSim/Region/Environment/Modules/World
parent* minor: speculatively try a change to bamboo.build to see if this generates ... (diff)
downloadopensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.zip
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.gz
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.bz2
opensim-SC_OLD-7d89e122930be39e84a6d174548fa2d12ac0484a.tar.xz
* This is the fabled LibOMV update with all of the libOMV types from JHurliman
* This is a HUGE OMG update and will definitely have unknown side effects.. so this is really only for the strong hearted at this point. Regular people should let the dust settle. * This has been tested to work with most basic functions. However.. make sure you back up 'everything' before using this. It's that big! * Essentially we're back at square 1 in the testing phase.. so lets identify things that broke.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs16
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs15
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs32
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs2
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs52
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs71
-rw-r--r--OpenSim/Region/Environment/Modules/World/Land/LandObject.cs46
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs204
-rw-r--r--OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs132
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs15
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs23
-rw-r--r--OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs37
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs79
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs5
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs33
-rw-r--r--OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs49
26 files changed, 447 insertions, 458 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
index 012f8d4..8d74160 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveConstants.cs
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30 30
31namespace OpenSim.Region.Environment.Modules.World.Archiver 31namespace OpenSim.Region.Environment.Modules.World.Archiver
32{ 32{
@@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
38 /// <summary> 38 /// <summary>
39 /// The location of the archive control file 39 /// The location of the archive control file
40 /// </summary> 40 /// </summary>
41 public static readonly string CONTROL_FILE_PATH = "archive.xml"; 41 public static readonly string CONTROL_FILE_PATH = "archive.Xml";
42 42
43 /// <summary> 43 /// <summary>
44 /// Path for the assets held in an archive 44 /// Path for the assets held in an archive
@@ -48,7 +48,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
48 /// <summary> 48 /// <summary>
49 /// Path for the assets metadata file 49 /// Path for the assets metadata file
50 /// </summary> 50 /// </summary>
51 //public static readonly string ASSETS_METADATA_PATH = "assets.xml"; 51 //public static readonly string ASSETS_METADATA_PATH = "assets.Xml";
52 52
53 /// <summary> 53 /// <summary>
54 /// Path for the prims file 54 /// Path for the prims file
@@ -88,11 +88,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
88 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt"; 88 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Notecard] = ASSET_EXTENSION_SEPARATOR + "notecard.txt";
89 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml"; 89 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Object] = ASSET_EXTENSION_SEPARATOR + "object.xml";
90 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this 90 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.RootFolder] = ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"; // Not sure if we'll ever see this
91// disable warning: we know Script is obsolete, but need to support it
92// anyhow
93#pragma warning disable 0612
94 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Script] = ASSET_EXTENSION_SEPARATOR + "script.txt"; // Not sure if we'll ever see this
95#pragma warning restore 0612
96 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this 91 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Simstate] = ASSET_EXTENSION_SEPARATOR + "simstate.bin"; // Not sure if we'll ever see this
97 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"; // Not sure if we'll ever see this 92 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.SnapshotFolder] = ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"; // Not sure if we'll ever see this
98 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg"; 93 ASSET_TYPE_TO_EXTENSION[(sbyte)AssetType.Sound] = ASSET_EXTENSION_SEPARATOR + "sound.ogg";
@@ -116,11 +111,6 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
116 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard; 111 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "notecard.txt"] = (sbyte)AssetType.Notecard;
117 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object; 112 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "object.xml"] = (sbyte)AssetType.Object;
118 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder; 113 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "rootfolder.txt"] = (sbyte)AssetType.RootFolder;
119// disable warning: we know Script is obsolete, but need to support it
120// anyhow
121#pragma warning disable 0612
122 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "script.txt"] = (sbyte)AssetType.Script;
123#pragma warning restore 0612
124 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate; 114 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "simstate.bin"] = (sbyte)AssetType.Simstate;
125 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"] = (sbyte)AssetType.SnapshotFolder; 115 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "snapshotfolder.txt"] = (sbyte)AssetType.SnapshotFolder;
126 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.ogg"] = (sbyte)AssetType.Sound; 116 EXTENSION_TO_ASSET_TYPE[ASSET_EXTENSION_SEPARATOR + "sound.ogg"] = (sbyte)AssetType.Sound;
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
index 89f5fd7..776ea78 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveReadRequest.cs
@@ -31,13 +31,12 @@ using OpenSim.Region.Environment.Modules.World.Serialiser;
31using OpenSim.Region.Environment.Modules.World.Terrain; 31using OpenSim.Region.Environment.Modules.World.Terrain;
32using OpenSim.Framework.Communications.Cache; 32using OpenSim.Framework.Communications.Cache;
33using System; 33using System;
34using Axiom.Math;
35using System.Collections.Generic; 34using System.Collections.Generic;
36using System.IO; 35using System.IO;
37using System.IO.Compression; 36using System.IO.Compression;
38using System.Reflection; 37using System.Reflection;
39using System.Xml; 38using System.Xml;
40using libsecondlife; 39using OpenMetaverse;
41using log4net; 40using log4net;
42 41
43namespace OpenSim.Region.Environment.Modules.World.Archiver 42namespace OpenSim.Region.Environment.Modules.World.Archiver
@@ -57,7 +56,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
57 /// <summary> 56 /// <summary>
58 /// Used to cache lookups for valid uuids. 57 /// Used to cache lookups for valid uuids.
59 /// </summary> 58 /// </summary>
60 private IDictionary<LLUUID, bool> m_validUserUuids = new Dictionary<LLUUID, bool>(); 59 private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>();
61 60
62 public ArchiveReadRequest(Scene scene, string loadPath) 61 public ArchiveReadRequest(Scene scene, string loadPath)
63 { 62 {
@@ -137,8 +136,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
137 136
138 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid 137 // Try to retain the original creator/owner/lastowner if their uuid is present on this grid
139 // otherwise, use the master avatar uuid instead 138 // otherwise, use the master avatar uuid instead
140 LLUUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID; 139 UUID masterAvatarId = m_scene.RegionInfo.MasterAvatarAssignedUUID;
141 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 140 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
142 masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner; 141 masterAvatarId = m_scene.RegionInfo.EstateSettings.EstateOwner;
143 foreach (SceneObjectPart part in sceneObject.Children.Values) 142 foreach (SceneObjectPart part in sceneObject.Children.Values)
144 { 143 {
@@ -184,7 +183,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
184 /// </summary> 183 /// </summary>
185 /// <param name="uuid"></param> 184 /// <param name="uuid"></param>
186 /// <returns></returns> 185 /// <returns></returns>
187 private bool resolveUserUuid(LLUUID uuid) 186 private bool resolveUserUuid(UUID uuid)
188 { 187 {
189 if (!m_validUserUuids.ContainsKey(uuid)) 188 if (!m_validUserUuids.ContainsKey(uuid))
190 { 189 {
@@ -209,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
209 /// <returns>true if asset was successfully loaded, false otherwise</returns> 208 /// <returns>true if asset was successfully loaded, false otherwise</returns>
210 private bool LoadAsset(string assetPath, byte[] data) 209 private bool LoadAsset(string assetPath, byte[] data)
211 { 210 {
212 // Right now we're nastily obtaining the lluuid from the filename 211 // Right now we're nastily obtaining the UUID from the filename
213 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); 212 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
214 int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR); 213 int i = filename.LastIndexOf(ArchiveConstants.ASSET_EXTENSION_SEPARATOR);
215 214
@@ -231,7 +230,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
231 230
232 //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType); 231 //m_log.DebugFormat("[ARCHIVER]: Importing asset {0}, type {1}", uuid, assetType);
233 232
234 AssetBase asset = new AssetBase(new LLUUID(uuid), String.Empty); 233 AssetBase asset = new AssetBase(new UUID(uuid), String.Empty);
235 asset.Type = assetType; 234 asset.Type = assetType;
236 asset.Data = data; 235 asset.Data = data;
237 236
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
index 26d4797..6276d34 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.IO.Compression; 31using System.IO.Compression;
32using System.Reflection; 32using System.Reflection;
33using System.Xml; 33using System.Xml;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
@@ -44,7 +44,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
44 /// <summary> 44 /// <summary>
45 /// Method called when all the necessary assets for an archive request have been received. 45 /// Method called when all the necessary assets for an archive request have been received.
46 /// </summary> 46 /// </summary>
47 public delegate void AssetsRequestCallback(IDictionary<LLUUID, AssetBase> assetsFound, ICollection<LLUUID> assetsNotFoundUuids); 47 public delegate void AssetsRequestCallback(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids);
48 48
49 /// <summary> 49 /// <summary>
50 /// Execute the write of an archive once we have received all the necessary data 50 /// Execute the write of an archive once we have received all the necessary data
@@ -73,9 +73,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
73 m_savePath = savePath; 73 m_savePath = savePath;
74 } 74 }
75 75
76 protected internal void ReceivedAllAssets(IDictionary<LLUUID, AssetBase> assetsFound, ICollection<LLUUID> assetsNotFoundUuids) 76 protected internal void ReceivedAllAssets(IDictionary<UUID, AssetBase> assetsFound, ICollection<UUID> assetsNotFoundUuids)
77 { 77 {
78 foreach (LLUUID uuid in assetsNotFoundUuids) 78 foreach (UUID uuid in assetsNotFoundUuids)
79 { 79 {
80 m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid); 80 m_log.DebugFormat("[ARCHIVER]: Could not find asset {0}", uuid);
81 } 81 }
@@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
100 { 100 {
101 //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType()); 101 //m_log.DebugFormat("[ARCHIVER]: Saving {0} {1}, {2}", entity.Name, entity.UUID, entity.GetType());
102 102
103 LLVector3 position = sceneObject.AbsolutePosition; 103 Vector3 position = sceneObject.AbsolutePosition;
104 104
105 string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject); 105 string serializedObject = m_serialiser.SaveGroupToXml2(sceneObject);
106 string filename 106 string filename
107 = string.Format( 107 = string.Format(
108 "{0}{1}_{2:000}-{3:000}-{4:000}__{5}.xml", 108 "{0}{1}_{2:000}-{3:000}-{4:000}__{5}.Xml",
109 ArchiveConstants.OBJECTS_PATH, sceneObject.Name, 109 ArchiveConstants.OBJECTS_PATH, sceneObject.Name,
110 Math.Round(position.X), Math.Round(position.Y), Math.Round(position.Z), 110 Math.Round(position.X), Math.Round(position.Y), Math.Round(position.Z),
111 sceneObject.UUID); 111 sceneObject.UUID);
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
index 20e15ab..a59148b 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestPreparation.cs
@@ -37,7 +37,7 @@ using System.Reflection;
37//using System.Text; 37//using System.Text;
38using System.Text.RegularExpressions; 38using System.Text.RegularExpressions;
39using System.Threading; 39using System.Threading;
40using libsecondlife; 40using OpenMetaverse;
41using log4net; 41using log4net;
42using Nini.Config; 42using Nini.Config;
43 43
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
84 /// <summary> 84 /// <summary>
85 /// The callback made when we request the asset for an object from the asset service. 85 /// The callback made when we request the asset for an object from the asset service.
86 /// </summary> 86 /// </summary>
87 public void AssetRequestCallback(LLUUID assetID, AssetBase asset) 87 public void AssetRequestCallback(UUID assetID, AssetBase asset)
88 { 88 {
89 lock (this) 89 lock (this)
90 { 90 {
@@ -100,7 +100,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
100 /// </summary> 100 /// </summary>
101 /// <param name="uuid"></param> 101 /// <param name="uuid"></param>
102 /// <returns></returns> 102 /// <returns></returns>
103 protected AssetBase GetAsset(LLUUID uuid) 103 protected AssetBase GetAsset(UUID uuid)
104 { 104 {
105 m_waitingForObjectAsset = true; 105 m_waitingForObjectAsset = true;
106 m_scene.AssetCache.GetAsset(uuid, AssetRequestCallback, true); 106 m_scene.AssetCache.GetAsset(uuid, AssetRequestCallback, true);
@@ -128,20 +128,20 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
128 /// </summary> 128 /// </summary>
129 /// <param name="scriptUuid"></param> 129 /// <param name="scriptUuid"></param>
130 /// <param name="assetUuids">Dictionary in which to record the references</param> 130 /// <param name="assetUuids">Dictionary in which to record the references</param>
131 protected void GetScriptAssetUuids(LLUUID scriptUuid, IDictionary<LLUUID, int> assetUuids) 131 protected void GetScriptAssetUuids(UUID scriptUuid, IDictionary<UUID, int> assetUuids)
132 { 132 {
133 AssetBase scriptAsset = GetAsset(scriptUuid); 133 AssetBase scriptAsset = GetAsset(scriptUuid);
134 134
135 if (null != scriptAsset) 135 if (null != scriptAsset)
136 { 136 {
137 string script = Helpers.FieldToUTF8String(scriptAsset.Data); 137 string script = Utils.BytesToString(scriptAsset.Data);
138 //m_log.DebugFormat("[ARCHIVER]: Script {0}", script); 138 //m_log.DebugFormat("[ARCHIVER]: Script {0}", script);
139 MatchCollection uuidMatches = m_uuidRegex.Matches(script); 139 MatchCollection uuidMatches = m_uuidRegex.Matches(script);
140 //m_log.DebugFormat("[ARCHIVER]: Found {0} matches in script", uuidMatches.Count); 140 //m_log.DebugFormat("[ARCHIVER]: Found {0} matches in script", uuidMatches.Count);
141 141
142 foreach (Match uuidMatch in uuidMatches) 142 foreach (Match uuidMatch in uuidMatches)
143 { 143 {
144 LLUUID uuid = new LLUUID(uuidMatch.Value); 144 UUID uuid = new UUID(uuidMatch.Value);
145 //m_log.DebugFormat("[ARCHIVER]: Recording {0} in script", uuid); 145 //m_log.DebugFormat("[ARCHIVER]: Recording {0} in script", uuid);
146 assetUuids[uuid] = 1; 146 assetUuids[uuid] = 1;
147 } 147 }
@@ -153,17 +153,17 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
153 /// </summary> 153 /// </summary>
154 /// <param name="wearableAssetUuid"></param> 154 /// <param name="wearableAssetUuid"></param>
155 /// <param name="assetUuids">Dictionary in which to record the references</param> 155 /// <param name="assetUuids">Dictionary in which to record the references</param>
156 protected void GetWearableAssetUuids(LLUUID wearableAssetUuid, IDictionary<LLUUID, int> assetUuids) 156 protected void GetWearableAssetUuids(UUID wearableAssetUuid, IDictionary<UUID, int> assetUuids)
157 { 157 {
158 AssetBase assetBase = GetAsset(wearableAssetUuid); 158 AssetBase assetBase = GetAsset(wearableAssetUuid);
159 //m_log.Debug(new System.Text.ASCIIEncoding().GetString(bodypartAsset.Data)); 159 //m_log.Debug(new System.Text.ASCIIEncoding().GetString(bodypartAsset.Data));
160 AssetWearable wearableAsset = new AssetBodypart(assetBase.Data); 160 AssetWearable wearableAsset = new AssetBodypart(wearableAssetUuid, assetBase.Data);
161 wearableAsset.Decode(); 161 wearableAsset.Decode();
162 162
163 //m_log.DebugFormat( 163 //m_log.DebugFormat(
164 // "[ARCHIVER]: Wearable asset {0} references {1} assets", wearableAssetUuid, wearableAsset.Textures.Count); 164 // "[ARCHIVER]: Wearable asset {0} references {1} assets", wearableAssetUuid, wearableAsset.Textures.Count);
165 165
166 foreach (LLUUID uuid in wearableAsset.Textures.Values) 166 foreach (UUID uuid in wearableAsset.Textures.Values)
167 { 167 {
168 //m_log.DebugFormat("[ARCHIVER]: Got bodypart uuid {0}", uuid); 168 //m_log.DebugFormat("[ARCHIVER]: Got bodypart uuid {0}", uuid);
169 assetUuids[uuid] = 1; 169 assetUuids[uuid] = 1;
@@ -176,14 +176,14 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
176 /// within this object). 176 /// within this object).
177 /// </summary> 177 /// </summary>
178 /// <param name="sceneObject"></param> 178 /// <param name="sceneObject"></param>
179 /// <param name="assetUuids"></param> 179 /// <param name="assetUuids"></param>
180 protected void GetSceneObjectAssetUuids(LLUUID sceneObjectUuid, IDictionary<LLUUID, int> assetUuids) 180 protected void GetSceneObjectAssetUuids(UUID sceneObjectUuid, IDictionary<UUID, int> assetUuids)
181 { 181 {
182 AssetBase objectAsset = GetAsset(sceneObjectUuid); 182 AssetBase objectAsset = GetAsset(sceneObjectUuid);
183 183
184 if (null != objectAsset) 184 if (null != objectAsset)
185 { 185 {
186 string xml = Helpers.FieldToUTF8String(objectAsset.Data); 186 string xml = Utils.BytesToString(objectAsset.Data);
187 SceneObjectGroup sog = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, xml); 187 SceneObjectGroup sog = new SceneObjectGroup(m_scene, m_scene.RegionInfo.RegionHandle, xml);
188 GetSceneObjectAssetUuids(sog, assetUuids); 188 GetSceneObjectAssetUuids(sog, assetUuids);
189 } 189 }
@@ -196,7 +196,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
196 /// </summary> 196 /// </summary>
197 /// <param name="sceneObject"></param> 197 /// <param name="sceneObject"></param>
198 /// <param name="assetUuids"></param> 198 /// <param name="assetUuids"></param>
199 protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary<LLUUID, int> assetUuids) 199 protected void GetSceneObjectAssetUuids(SceneObjectGroup sceneObject, IDictionary<UUID, int> assetUuids)
200 { 200 {
201 m_log.DebugFormat( 201 m_log.DebugFormat(
202 "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID); 202 "[ARCHIVER]: Getting assets for object {0}, {1}", sceneObject.Name, sceneObject.UUID);
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
208 208
209 try 209 try
210 { 210 {
211 LLObject.TextureEntry textureEntry = part.Shape.Textures; 211 Primitive.TextureEntry textureEntry = part.Shape.Textures;
212 212
213 // Get the prim's default texture. This will be used for faces which don't have their own texture 213 // Get the prim's default texture. This will be used for faces which don't have their own texture
214 assetUuids[textureEntry.DefaultTexture.TextureID] = 1; 214 assetUuids[textureEntry.DefaultTexture.TextureID] = 1;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
216 // XXX: Not a great way to iterate through face textures, but there's no 216 // XXX: Not a great way to iterate through face textures, but there's no
217 // other method available to tell how many faces there actually are 217 // other method available to tell how many faces there actually are
218 //int i = 0; 218 //int i = 0;
219 foreach (LLObject.TextureEntryFace texture in textureEntry.FaceTextures) 219 foreach (Primitive.TextureEntryFace texture in textureEntry.FaceTextures)
220 { 220 {
221 if (texture != null) 221 if (texture != null)
222 { 222 {
@@ -262,7 +262,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
262 262
263 public void ArchiveRegion() 263 public void ArchiveRegion()
264 { 264 {
265 Dictionary<LLUUID, int> assetUuids = new Dictionary<LLUUID, int>(); 265 Dictionary<UUID, int> assetUuids = new Dictionary<UUID, int>();
266 266
267 List<EntityBase> entities = m_scene.GetEntities(); 267 List<EntityBase> entities = m_scene.GetEntities();
268 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>(); 268 List<SceneObjectGroup> sceneObjects = new List<SceneObjectGroup>();
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
index 69f712c..df17ad2 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiverModule.cs
@@ -31,7 +31,7 @@ using OpenSim.Region.Environment.Modules.World.Serialiser;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
32using System.Collections.Generic; 32using System.Collections.Generic;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nini.Config; 36using Nini.Config;
37 37
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
index 73212ff..b49b2a4 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsArchiver.cs
@@ -29,7 +29,7 @@ using System.Collections.Generic;
29using System.IO; 29using System.IO;
30using System.Reflection; 30using System.Reflection;
31using System.Xml; 31using System.Xml;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using OpenSim.Framework; 34using OpenSim.Framework;
35 35
@@ -45,9 +45,9 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
45 /// <summary> 45 /// <summary>
46 /// Archive assets 46 /// Archive assets
47 /// </summary> 47 /// </summary>
48 protected IDictionary<LLUUID, AssetBase> m_assets; 48 protected IDictionary<UUID, AssetBase> m_assets;
49 49
50 public AssetsArchiver(IDictionary<LLUUID, AssetBase> assets) 50 public AssetsArchiver(IDictionary<UUID, AssetBase> assets)
51 { 51 {
52 m_assets = assets; 52 m_assets = assets;
53 } 53 }
@@ -76,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
76 76
77 xtw.WriteStartElement("assets"); 77 xtw.WriteStartElement("assets");
78 78
79 foreach (LLUUID uuid in m_assets.Keys) 79 foreach (UUID uuid in m_assets.Keys)
80 { 80 {
81 AssetBase asset = m_assets[uuid]; 81 AssetBase asset = m_assets[uuid];
82 82
@@ -105,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
105 105
106 xtw.WriteEndDocument(); 106 xtw.WriteEndDocument();
107 107
108 archive.AddFile("assets.xml", sw.ToString()); 108 archive.AddFile("assets.Xml", sw.ToString());
109 } 109 }
110 110
111 /// <summary> 111 /// <summary>
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
117 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar 117 // It appears that gtar, at least, doesn't need the intermediate directory entries in the tar
118 //archive.AddDir("assets"); 118 //archive.AddDir("assets");
119 119
120 foreach (LLUUID uuid in m_assets.Keys) 120 foreach (UUID uuid in m_assets.Keys)
121 { 121 {
122 AssetBase asset = m_assets[uuid]; 122 AssetBase asset = m_assets[uuid];
123 123
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
index 17abb24..b26fe4c 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsDearchiver.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using System.Xml; 32using System.Xml;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Framework.Communications.Cache; 36using OpenSim.Framework.Communications.Cache;
@@ -141,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
141 /// <param name="data"></param> 141 /// <param name="data"></param>
142 protected void ResolveAssetData(string assetPath, byte[] data) 142 protected void ResolveAssetData(string assetPath, byte[] data)
143 { 143 {
144 // Right now we're nastily obtaining the lluuid from the filename 144 // Right now we're nastily obtaining the UUID from the filename
145 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length); 145 string filename = assetPath.Remove(0, ArchiveConstants.ASSETS_PATH.Length);
146 146
147 if (m_metadata.ContainsKey(filename)) 147 if (m_metadata.ContainsKey(filename))
@@ -156,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
156 156
157 m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename); 157 m_log.DebugFormat("[ARCHIVER]: Importing asset {0}", filename);
158 158
159 AssetBase asset = new AssetBase(new LLUUID(filename), metadata.Name); 159 AssetBase asset = new AssetBase(new UUID(filename), metadata.Name);
160 asset.Description = metadata.Description; 160 asset.Description = metadata.Description;
161 asset.Type = metadata.AssetType; 161 asset.Type = metadata.AssetType;
162 asset.Data = data; 162 asset.Data = data;
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
index 2164f7e..41fbc16 100644
--- a/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
+++ b/OpenSim/Region/Environment/Modules/World/Archiver/AssetsRequest.cs
@@ -32,7 +32,7 @@ using OpenSim.Region.Environment.Scenes;
32using System.Collections.Generic; 32using System.Collections.Generic;
33//using System.Reflection; 33//using System.Reflection;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36//using log4net; 36//using log4net;
37 37
38namespace OpenSim.Region.Environment.Modules.World.Archiver 38namespace OpenSim.Region.Environment.Modules.World.Archiver
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
47 /// <summary> 47 /// <summary>
48 /// uuids to request 48 /// uuids to request
49 /// </summary> 49 /// </summary>
50 protected ICollection<LLUUID> m_uuids; 50 protected ICollection<UUID> m_uuids;
51 51
52 /// <summary> 52 /// <summary>
53 /// Callback used when all the assets requested have been received. 53 /// Callback used when all the assets requested have been received.
@@ -57,12 +57,12 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
57 /// <summary> 57 /// <summary>
58 /// Assets retrieved in this request 58 /// Assets retrieved in this request
59 /// </summary> 59 /// </summary>
60 protected Dictionary<LLUUID, AssetBase> m_assets = new Dictionary<LLUUID, AssetBase>(); 60 protected Dictionary<UUID, AssetBase> m_assets = new Dictionary<UUID, AssetBase>();
61 61
62 /// <summary> 62 /// <summary>
63 /// Maintain a list of assets that could not be found. This will be passed back to the requester. 63 /// Maintain a list of assets that could not be found. This will be passed back to the requester.
64 /// </summary> 64 /// </summary>
65 protected List<LLUUID> m_notFoundAssetUuids = new List<LLUUID>(); 65 protected List<UUID> m_notFoundAssetUuids = new List<UUID>();
66 66
67 /// <summary> 67 /// <summary>
68 /// Record the number of asset replies required so we know when we've finished 68 /// Record the number of asset replies required so we know when we've finished
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
74 /// </summary> 74 /// </summary>
75 protected AssetCache m_assetCache; 75 protected AssetCache m_assetCache;
76 76
77 protected internal AssetsRequest(ICollection<LLUUID> uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback) 77 protected internal AssetsRequest(ICollection<UUID> uuids, AssetCache assetCache, AssetsRequestCallback assetsRequestCallback)
78 { 78 {
79 m_uuids = uuids; 79 m_uuids = uuids;
80 m_assetsRequestCallback = assetsRequestCallback; 80 m_assetsRequestCallback = assetsRequestCallback;
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
88 if (m_repliesRequired == 0) 88 if (m_repliesRequired == 0)
89 m_assetsRequestCallback(m_assets, m_notFoundAssetUuids); 89 m_assetsRequestCallback(m_assets, m_notFoundAssetUuids);
90 90
91 foreach (LLUUID uuid in m_uuids) 91 foreach (UUID uuid in m_uuids)
92 { 92 {
93 m_assetCache.GetAsset(uuid, AssetRequestCallback, true); 93 m_assetCache.GetAsset(uuid, AssetRequestCallback, true);
94 } 94 }
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
99 /// </summary> 99 /// </summary>
100 /// <param name="assetID"></param> 100 /// <param name="assetID"></param>
101 /// <param name="asset"></param> 101 /// <param name="asset"></param>
102 public void AssetRequestCallback(LLUUID assetID, AssetBase asset) 102 public void AssetRequestCallback(UUID assetID, AssetBase asset)
103 { 103 {
104 if (asset != null) 104 if (asset != null)
105 m_assets[assetID] = asset; 105 m_assets[assetID] = asset;
diff --git a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
index 28347d0..976a634 100644
--- a/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Estate/EstateManagementModule.cs
@@ -28,7 +28,7 @@ using System;
28using System.Threading; 28using System.Threading;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -41,15 +41,15 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
41 { 41 {
42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 42 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
43 43
44 private delegate void LookupUUIDS(List<LLUUID> uuidLst); 44 private delegate void LookupUUIDS(List<UUID> uuidLst);
45 45
46 private Scene m_scene; 46 private Scene m_scene;
47 47
48 #region Packet Data Responders 48 #region Packet Data Responders
49 49
50 private void sendDetailedEstateData(IClientAPI remote_client, LLUUID invoice) 50 private void sendDetailedEstateData(IClientAPI remote_client, UUID invoice)
51 { 51 {
52 //SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant) 52 //SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant)
53 53
54 uint sun = 0; 54 uint sun = 0;
55 if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime) 55 if (!m_scene.RegionInfo.EstateSettings.UseGlobalTime)
@@ -119,9 +119,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
119 sendRegionInfoPacketToAll(); 119 sendRegionInfoPacketToAll();
120 } 120 }
121 121
122 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, LLUUID texture) 122 public void setEstateTerrainBaseTexture(IClientAPI remoteClient, int corner, UUID texture)
123 { 123 {
124 if (texture == LLUUID.Zero) 124 if(texture == UUID.Zero)
125 return; 125 return;
126 126
127 switch (corner) 127 switch (corner)
@@ -202,13 +202,13 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
202 m_scene.Restart(timeInSeconds); 202 m_scene.Restart(timeInSeconds);
203 } 203 }
204 204
205 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, LLUUID estateCovenantID) 205 private void handleChangeEstateCovenantRequest(IClientAPI remoteClient, UUID estateCovenantID)
206 { 206 {
207 m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID; 207 m_scene.RegionInfo.RegionSettings.Covenant = estateCovenantID;
208 m_scene.RegionInfo.RegionSettings.Save(); 208 m_scene.RegionInfo.RegionSettings.Save();
209 } 209 }
210 210
211 private void handleEstateAccessDeltaRequest(IClientAPI remote_client, LLUUID invoice, int estateAccessType, LLUUID user) 211 private void handleEstateAccessDeltaRequest(IClientAPI remote_client, UUID invoice, int estateAccessType, UUID user)
212 { 212 {
213 // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc. 213 // EstateAccessDelta handles Estate Managers, Sim Access, Sim Banlist, allowed Groups.. etc.
214 214
@@ -338,17 +338,17 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
338 } 338 }
339 } 339 }
340 340
341 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message) 341 private void SendSimulatorBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
342 { 342 {
343 m_scene.SendRegionMessageFromEstateTools(senderID, sessionID, senderName, message); 343 m_scene.SendRegionMessageFromEstateTools(senderID, sessionID, senderName, message);
344 } 344 }
345 345
346 private void SendEstateBlueBoxMessage(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, LLUUID sessionID, string senderName, string message) 346 private void SendEstateBlueBoxMessage(IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message)
347 { 347 {
348 m_scene.SendEstateMessageFromEstateTools(senderID, sessionID, senderName, message); 348 m_scene.SendEstateMessageFromEstateTools(senderID, sessionID, senderName, message);
349 } 349 }
350 350
351 private void handleEstateDebugRegionRequest(IClientAPI remote_client, LLUUID invoice, LLUUID senderID, bool scripted, bool collisionEvents, bool physics) 351 private void handleEstateDebugRegionRequest(IClientAPI remote_client, UUID invoice, UUID senderID, bool scripted, bool collisionEvents, bool physics)
352 { 352 {
353 if (physics) 353 if (physics)
354 m_scene.RegionInfo.RegionSettings.DisablePhysics = true; 354 m_scene.RegionInfo.RegionSettings.DisablePhysics = true;
@@ -371,9 +371,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
371 m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics); 371 m_scene.SetSceneCoreDebug(scripted, collisionEvents, physics);
372 } 372 }
373 373
374 private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, LLUUID invoice, LLUUID senderID, LLUUID prey) 374 private void handleEstateTeleportOneUserHomeRequest(IClientAPI remover_client, UUID invoice, UUID senderID, UUID prey)
375 { 375 {
376 if (prey != LLUUID.Zero) 376 if (prey != UUID.Zero)
377 { 377 {
378 ScenePresence s = m_scene.GetScenePresence(prey); 378 ScenePresence s = m_scene.GetScenePresence(prey);
379 if (s != null) 379 if (s != null)
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
419 private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient) 419 private void HandleLandStatRequest(int parcelID, uint reportType, uint requestFlags, string filter, IClientAPI remoteClient)
420 { 420 {
421 Dictionary<uint, float> SceneData = new Dictionary<uint,float>(); 421 Dictionary<uint, float> SceneData = new Dictionary<uint,float>();
422 List<LLUUID> uuidNameLookupList = new List<LLUUID>(); 422 List<UUID> uuidNameLookupList = new List<UUID>();
423 423
424 if (reportType == 1) 424 if (reportType == 1)
425 { 425 {
@@ -491,7 +491,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
491 LookupUUIDS icon = (LookupUUIDS)iar.AsyncState; 491 LookupUUIDS icon = (LookupUUIDS)iar.AsyncState;
492 icon.EndInvoke(iar); 492 icon.EndInvoke(iar);
493 } 493 }
494 private void LookupUUID(List<LLUUID> uuidLst) 494 private void LookupUUID(List<UUID> uuidLst)
495 { 495 {
496 LookupUUIDS d = LookupUUIDsAsync; 496 LookupUUIDS d = LookupUUIDsAsync;
497 497
@@ -499,9 +499,9 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
499 LookupUUIDSCompleted, 499 LookupUUIDSCompleted,
500 d); 500 d);
501 } 501 }
502 private void LookupUUIDsAsync(List<LLUUID> uuidLst) 502 private void LookupUUIDsAsync(List<UUID> uuidLst)
503 { 503 {
504 LLUUID[] uuidarr = new LLUUID[0]; 504 UUID[] uuidarr = new UUID[0];
505 505
506 lock (uuidLst) 506 lock (uuidLst)
507 { 507 {
@@ -533,7 +533,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
533 { 533 {
534 RegionHandshakeArgs args = new RegionHandshakeArgs(); 534 RegionHandshakeArgs args = new RegionHandshakeArgs();
535 bool estatemanager = false; 535 bool estatemanager = false;
536 LLUUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.EstateManagers; 536 UUID[] EstateManagers = m_scene.RegionInfo.EstateSettings.EstateManagers;
537 for (int i = 0; i < EstateManagers.Length; i++) 537 for (int i = 0; i < EstateManagers.Length; i++)
538 { 538 {
539 if (EstateManagers[i] == remoteClient.AgentId) 539 if (EstateManagers[i] == remoteClient.AgentId)
@@ -559,14 +559,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
559 559
560 args.regionFlags = GetRegionFlags(); 560 args.regionFlags = GetRegionFlags();
561 args.regionName = m_scene.RegionInfo.RegionName; 561 args.regionName = m_scene.RegionInfo.RegionName;
562 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 562 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
563 args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner; 563 args.SimOwner = m_scene.RegionInfo.EstateSettings.EstateOwner;
564 else 564 else
565 args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID; 565 args.SimOwner = m_scene.RegionInfo.MasterAvatarAssignedUUID;
566 args.terrainBase0 = LLUUID.Zero; 566 args.terrainBase0 = UUID.Zero;
567 args.terrainBase1 = LLUUID.Zero; 567 args.terrainBase1 = UUID.Zero;
568 args.terrainBase2 = LLUUID.Zero; 568 args.terrainBase2 = UUID.Zero;
569 args.terrainBase3 = LLUUID.Zero; 569 args.terrainBase3 = UUID.Zero;
570 args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1; 570 args.terrainDetail0 = m_scene.RegionInfo.RegionSettings.TerrainTexture1;
571 args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2; 571 args.terrainDetail1 = m_scene.RegionInfo.RegionSettings.TerrainTexture2;
572 args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3; 572 args.terrainDetail2 = m_scene.RegionInfo.RegionSettings.TerrainTexture3;
@@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
582 ); 582 );
583 } 583 }
584 584
585 public void handleEstateChangeInfo(IClientAPI remoteClient, LLUUID invoice, LLUUID senderID, UInt32 parms1, UInt32 parms2) 585 public void handleEstateChangeInfo(IClientAPI remoteClient, UUID invoice, UUID senderID, UInt32 parms1, UInt32 parms2)
586 { 586 {
587 if (parms2 == 0) 587 if (parms2 == 0)
588 { 588 {
@@ -812,14 +812,14 @@ namespace OpenSim.Region.Environment.Modules.World.Estate
812 return (uint)flags; 812 return (uint)flags;
813 } 813 }
814 814
815 public bool IsManager(LLUUID avatarID) 815 public bool IsManager(UUID avatarID)
816 { 816 {
817 if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID) 817 if (avatarID == m_scene.RegionInfo.MasterAvatarAssignedUUID)
818 return true; 818 return true;
819 if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner) 819 if (avatarID == m_scene.RegionInfo.EstateSettings.EstateOwner)
820 return true; 820 return true;
821 821
822 List<LLUUID> ems = new List<LLUUID>(m_scene.RegionInfo.EstateSettings.EstateManagers); 822 List<UUID> ems = new List<UUID>(m_scene.RegionInfo.EstateSettings.EstateManagers);
823 if (ems.Contains(avatarID)) 823 if (ems.Contains(avatarID))
824 return true; 824 return true;
825 825
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
index d519d4d..1e1291a 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandChannel.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using OpenSim.Framework; 31using OpenSim.Framework;
32using OpenSim.Region.Environment.Interfaces; 32using OpenSim.Region.Environment.Interfaces;
33using OpenSim.Region.Environment.Scenes; 33using OpenSim.Region.Environment.Scenes;
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
88 { 88 {
89 return m_landManagementModule.GetLandObject(x_float, y_float); 89 return m_landManagementModule.GetLandObject(x_float, y_float);
90 } 90 }
91 ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); 91 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
92 obj.landData.Name = "NO LAND"; 92 obj.landData.Name = "NO LAND";
93 return obj; 93 return obj;
94 } 94 }
@@ -100,12 +100,12 @@ namespace OpenSim.Region.Environment.Modules.World.Land
100 { 100 {
101 return m_landManagementModule.GetLandObject(x, y); 101 return m_landManagementModule.GetLandObject(x, y);
102 } 102 }
103 ILandObject obj = new LandObject(LLUUID.Zero, false, m_scene); 103 ILandObject obj = new LandObject(UUID.Zero, false, m_scene);
104 obj.landData.Name = "NO LAND"; 104 obj.landData.Name = "NO LAND";
105 return obj; 105 return obj;
106 } 106 }
107 107
108 public List<ILandObject> ParcelsNearPoint(LLVector3 position) 108 public List<ILandObject> ParcelsNearPoint(Vector3 position)
109 { 109 {
110 if (m_landManagementModule != null) 110 if (m_landManagementModule != null)
111 { 111 {
@@ -142,7 +142,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
142 m_landManagementModule.UpdateLandObject(localID, data); 142 m_landManagementModule.UpdateLandObject(localID, data);
143 } 143 }
144 } 144 }
145 public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) 145 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
146 { 146 {
147 if (m_landManagementModule != null) 147 if (m_landManagementModule != null)
148 { 148 {
@@ -168,4 +168,4 @@ namespace OpenSim.Region.Environment.Modules.World.Land
168 #endregion 168 #endregion
169 169
170 } 170 }
171} \ No newline at end of file 171}
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
index 00994fb..e5bdafc 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandManagementModule.cs
@@ -1,4 +1,4 @@
1/* 1/*
2 * Copyright (c) Contributors, http://opensimulator.org/ 2 * Copyright (c) Contributors, http://opensimulator.org/
3 * See CONTRIBUTORS.TXT for a full list of copyright holders. 3 * See CONTRIBUTORS.TXT for a full list of copyright holders.
4 * 4 *
@@ -29,7 +29,7 @@ using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Region.Environment.Interfaces; 35using OpenSim.Region.Environment.Interfaces;
@@ -38,7 +38,6 @@ using OpenSim.Framework;
38using OpenSim.Framework.Servers; 38using OpenSim.Framework.Servers;
39using OpenSim.Framework.Communications.Capabilities; 39using OpenSim.Framework.Communications.Capabilities;
40using OpenSim.Region.Physics.Manager; 40using OpenSim.Region.Physics.Manager;
41using Axiom.Math;
42using Caps = OpenSim.Framework.Communications.Capabilities.Caps; 41using Caps = OpenSim.Framework.Communications.Capabilities.Caps;
43 42
44namespace OpenSim.Region.Environment.Modules.World.Land 43namespace OpenSim.Region.Environment.Modules.World.Land
@@ -165,10 +164,10 @@ namespace OpenSim.Region.Environment.Modules.World.Land
165 lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1; 164 lastLandLocalID = LandChannel.START_LAND_LOCAL_ID - 1;
166 landIDList.Initialize(); 165 landIDList.Initialize();
167 166
168 ILandObject fullSimParcel = new LandObject(LLUUID.Zero, false, m_scene); 167 ILandObject fullSimParcel = new LandObject(UUID.Zero, false, m_scene);
169 168
170 fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize)); 169 fullSimParcel.setLandBitmap(fullSimParcel.getSquareLandBitmap(0, 0, (int)Constants.RegionSize, (int)Constants.RegionSize));
171 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 170 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
172 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 171 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
173 else 172 else
174 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 173 fullSimParcel.landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -176,7 +175,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
176 AddLandObject(fullSimParcel); 175 AddLandObject(fullSimParcel);
177 } 176 }
178 177
179 public List<ILandObject> ParcelsNearPoint(LLVector3 position) 178 public List<ILandObject> ParcelsNearPoint(Vector3 position)
180 { 179 {
181 List<ILandObject> parcelsNear = new List<ILandObject>(); 180 List<ILandObject> parcelsNear = new List<ILandObject>();
182 for (int x = -4; x <= 4; x += 4) 181 for (int x = -4; x <= 4; x += 4)
@@ -205,8 +204,8 @@ namespace OpenSim.Region.Environment.Modules.World.Land
205 "You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers"); 204 "You are not allowed on this parcel because you are banned. Please go away. <3 OpenSim Developers");
206 205
207 avatar.PhysicsActor.Position = 206 avatar.PhysicsActor.Position =
208 new PhysicsVector(avatar.lastKnownAllowedPosition.x, avatar.lastKnownAllowedPosition.y, 207 new PhysicsVector(avatar.lastKnownAllowedPosition.X, avatar.lastKnownAllowedPosition.Y,
209 avatar.lastKnownAllowedPosition.z); 208 avatar.lastKnownAllowedPosition.Z);
210 avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0); 209 avatar.PhysicsActor.Velocity = new PhysicsVector(0, 0, 0);
211 } 210 }
212 else 211 else
@@ -216,7 +215,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
216 } 215 }
217 } 216 }
218 217
219 public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 218 public void handleAvatarChangingParcel(ScenePresence avatar, int localLandID, UUID regionID)
220 { 219 {
221 if (m_scene.RegionInfo.RegionID == regionID) 220 if (m_scene.RegionInfo.RegionID == regionID)
222 { 221 {
@@ -353,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
353 } 352 }
354 353
355 354
356 public void handleParcelAccessRequest(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, 355 public void handleParcelAccessRequest(UUID agentID, UUID sessionID, uint flags, int sequenceID,
357 int landLocalID, IClientAPI remote_client) 356 int landLocalID, IClientAPI remote_client)
358 { 357 {
359 if (landList.ContainsKey(landLocalID)) 358 if (landList.ContainsKey(landLocalID))
@@ -362,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
362 } 361 }
363 } 362 }
364 363
365 public void handleParcelAccessUpdateRequest(LLUUID agentID, LLUUID sessionID, uint flags, int landLocalID, 364 public void handleParcelAccessUpdateRequest(UUID agentID, UUID sessionID, uint flags, int landLocalID,
366 List<ParcelManager.ParcelAccessEntry> entries, 365 List<ParcelManager.ParcelAccessEntry> entries,
367 IClientAPI remote_client) 366 IClientAPI remote_client)
368 { 367 {
@@ -385,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
385 /// <returns></returns> 384 /// <returns></returns>
386 public ILandObject CreateBaseLand() 385 public ILandObject CreateBaseLand()
387 { 386 {
388 return new LandObject(LLUUID.Zero, false, m_scene); 387 return new LandObject(UUID.Zero, false, m_scene);
389 } 388 }
390 389
391 /// <summary> 390 /// <summary>
@@ -529,7 +528,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
529 528
530 public void AddPrimToLandPrimCounts(SceneObjectGroup obj) 529 public void AddPrimToLandPrimCounts(SceneObjectGroup obj)
531 { 530 {
532 LLVector3 position = obj.AbsolutePosition; 531 Vector3 position = obj.AbsolutePosition;
533 ILandObject landUnderPrim = GetLandObject(position.X, position.Y); 532 ILandObject landUnderPrim = GetLandObject(position.X, position.Y);
534 if (landUnderPrim != null) 533 if (landUnderPrim != null)
535 { 534 {
@@ -548,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
548 public void FinalizeLandPrimCountUpdate() 547 public void FinalizeLandPrimCountUpdate()
549 { 548 {
550 //Get Simwide prim count for owner 549 //Get Simwide prim count for owner
551 Dictionary<LLUUID, List<LandObject>> landOwnersAndParcels = new Dictionary<LLUUID, List<LandObject>>(); 550 Dictionary<UUID, List<LandObject>> landOwnersAndParcels = new Dictionary<UUID, List<LandObject>>();
552 foreach (LandObject p in landList.Values) 551 foreach (LandObject p in landList.Values)
553 { 552 {
554 if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID)) 553 if (!landOwnersAndParcels.ContainsKey(p.landData.OwnerID))
@@ -563,7 +562,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
563 } 562 }
564 } 563 }
565 564
566 foreach (LLUUID owner in landOwnersAndParcels.Keys) 565 foreach (UUID owner in landOwnersAndParcels.Keys)
567 { 566 {
568 int simArea = 0; 567 int simArea = 0;
569 int simPrims = 0; 568 int simPrims = 0;
@@ -617,9 +616,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
617 /// <param name="start_y">South Point</param> 616 /// <param name="start_y">South Point</param>
618 /// <param name="end_x">East Point</param> 617 /// <param name="end_x">East Point</param>
619 /// <param name="end_y">North Point</param> 618 /// <param name="end_y">North Point</param>
620 /// <param name="attempting_user_id">LLUUID of user who is trying to subdivide</param> 619 /// <param name="attempting_user_id">UUID of user who is trying to subdivide</param>
621 /// <returns>Returns true if successful</returns> 620 /// <returns>Returns true if successful</returns>
622 private void subdivide(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 621 private void subdivide(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
623 { 622 {
624 //First, lets loop through the points and make sure they are all in the same peice of land 623 //First, lets loop through the points and make sure they are all in the same peice of land
625 //Get the land object at start 624 //Get the land object at start
@@ -658,7 +657,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
658 //Lets create a new land object with bitmap activated at that point (keeping the old land objects info) 657 //Lets create a new land object with bitmap activated at that point (keeping the old land objects info)
659 ILandObject newLand = startLandObject.Copy(); 658 ILandObject newLand = startLandObject.Copy();
660 newLand.landData.Name = "Subdivision of " + newLand.landData.Name; 659 newLand.landData.Name = "Subdivision of " + newLand.landData.Name;
661 newLand.landData.GlobalID = LLUUID.Random(); 660 newLand.landData.GlobalID = UUID.Random();
662 661
663 newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y)); 662 newLand.setLandBitmap(newLand.getSquareLandBitmap(start_x, start_y, end_x, end_y));
664 663
@@ -683,9 +682,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
683 /// <param name="start_y">y value in first piece of land</param> 682 /// <param name="start_y">y value in first piece of land</param>
684 /// <param name="end_x">x value in second peice of land</param> 683 /// <param name="end_x">x value in second peice of land</param>
685 /// <param name="end_y">y value in second peice of land</param> 684 /// <param name="end_y">y value in second peice of land</param>
686 /// <param name="attempting_user_id">LLUUID of the avatar trying to join the land objects</param> 685 /// <param name="attempting_user_id">UUID of the avatar trying to join the land objects</param>
687 /// <returns>Returns true if successful</returns> 686 /// <returns>Returns true if successful</returns>
688 private void join(int start_x, int start_y, int end_x, int end_y, LLUUID attempting_user_id) 687 private void join(int start_x, int start_y, int end_x, int end_y, UUID attempting_user_id)
689 { 688 {
690 end_x -= 4; 689 end_x -= 4;
691 end_y -= 4; 690 end_y -= 4;
@@ -770,13 +769,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
770 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER); 769 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_OWNED_BY_REQUESTER);
771 } 770 }
772 else if (currentParcelBlock.landData.SalePrice > 0 && 771 else if (currentParcelBlock.landData.SalePrice > 0 &&
773 (currentParcelBlock.landData.AuthBuyerID == LLUUID.Zero || 772 (currentParcelBlock.landData.AuthBuyerID == UUID.Zero ||
774 currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId)) 773 currentParcelBlock.landData.AuthBuyerID == remote_client.AgentId))
775 { 774 {
776 //Sale Flag 775 //Sale Flag
777 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE); 776 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_IS_FOR_SALE);
778 } 777 }
779 else if (currentParcelBlock.landData.OwnerID == LLUUID.Zero) 778 else if (currentParcelBlock.landData.OwnerID == UUID.Zero)
780 { 779 {
781 //Public Flag 780 //Public Flag
782 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC); 781 tempByte = Convert.ToByte(tempByte | LandChannel.LAND_TYPE_PUBLIC);
@@ -914,7 +913,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
914 { 913 {
915 if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id])) 914 if (m_scene.ExternalChecks.ExternalChecksCanAbandonParcel(remote_client.AgentId, landList[local_id]))
916 { 915 {
917 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 916 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
918 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 917 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
919 else 918 else
920 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 919 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -930,7 +929,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
930 { 929 {
931 if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id])) 930 if (m_scene.ExternalChecks.ExternalChecksCanReclaimParcel(remote_client.AgentId, landList[local_id]))
932 { 931 {
933 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 932 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
934 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; 933 landList[local_id].landData.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;
935 else 934 else
936 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID; 935 landList[local_id].landData.OwnerID = m_scene.RegionInfo.MasterAvatarAssignedUUID;
@@ -979,13 +978,13 @@ namespace OpenSim.Region.Environment.Modules.World.Land
979 } 978 }
980 if (lob != null) 979 if (lob != null)
981 { 980 {
982 LLUUID AuthorizedID = lob.landData.AuthBuyerID; 981 UUID AuthorizedID = lob.landData.AuthBuyerID;
983 int saleprice = lob.landData.SalePrice; 982 int saleprice = lob.landData.SalePrice;
984 LLUUID pOwnerID = lob.landData.OwnerID; 983 UUID pOwnerID = lob.landData.OwnerID;
985 984
986 bool landforsale = ((lob.landData.Flags & 985 bool landforsale = ((lob.landData.Flags &
987 (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0); 986 (uint)(Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects)) != 0);
988 if ((AuthorizedID == LLUUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale) 987 if ((AuthorizedID == UUID.Zero || AuthorizedID == e.agentId) && e.parcelPrice >= saleprice && landforsale)
989 { 988 {
990 lock (e) 989 lock (e)
991 { 990 {
@@ -1027,7 +1026,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1027 AddLandObject(new_land); 1026 AddLandObject(new_land);
1028 } 1027 }
1029 1028
1030 public void ReturnObjectsInParcel(int localID, uint returnType, LLUUID[] agentIDs, LLUUID[] taskIDs, IClientAPI remoteClient) 1029 public void ReturnObjectsInParcel(int localID, uint returnType, UUID[] agentIDs, UUID[] taskIDs, IClientAPI remoteClient)
1031 { 1030 {
1032 ILandObject selectedParcel = null; 1031 ILandObject selectedParcel = null;
1033 lock (landList) 1032 lock (landList)
@@ -1065,7 +1064,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1065 1064
1066 #region CAPS handler 1065 #region CAPS handler
1067 1066
1068 private void OnRegisterCaps(LLUUID agentID, Caps caps) 1067 private void OnRegisterCaps(UUID agentID, Caps caps)
1069 { 1068 {
1070 string capsBase = "/CAPS/" + caps.CapsObjectPath; 1069 string capsBase = "/CAPS/" + caps.CapsObjectPath;
1071 caps.RegisterHandler("RemoteParcelRequest", 1070 caps.RegisterHandler("RemoteParcelRequest",
@@ -1080,7 +1079,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1080 // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the 1079 // we cheat here: As we don't have (and want) a grid-global parcel-store, we can't return the
1081 // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to. 1080 // "real" parcelID, because we wouldn't be able to map that to the region the parcel belongs to.
1082 // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x 1081 // So, we create a "fake" parcelID by using the regionHandle (64 bit), and the local (integer) x
1083 // and y coordinate (each 8 bit), encoded in a LLUUID (128 bit). 1082 // and y coordinate (each 8 bit), encoded in a UUID (128 bit).
1084 // 1083 //
1085 // Request format: 1084 // Request format:
1086 // <llsd> 1085 // <llsd>
@@ -1095,16 +1094,16 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1095 // <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid> 1094 // <uuid>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</uuid>
1096 // </map> 1095 // </map>
1097 // </llsd> 1096 // </llsd>
1098 private string RemoteParcelRequest(string request, string path, string param, LLUUID agentID, Caps caps) 1097 private string RemoteParcelRequest(string request, string path, string param, UUID agentID, Caps caps)
1099 { 1098 {
1100 LLUUID parcelID = LLUUID.Zero; 1099 UUID parcelID = UUID.Zero;
1101 try 1100 try
1102 { 1101 {
1103 Hashtable hash = new Hashtable(); 1102 Hashtable hash = new Hashtable();
1104 hash = (Hashtable)LLSD.LLSDDeserialize(Helpers.StringToField(request)); 1103 hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
1105 if (hash.ContainsKey("region_id") && hash.ContainsKey("location")) 1104 if (hash.ContainsKey("region_id") && hash.ContainsKey("location"))
1106 { 1105 {
1107 LLUUID regionID = (LLUUID)hash["region_id"]; 1106 UUID regionID = (UUID)hash["region_id"];
1108 ArrayList list = (ArrayList)hash["location"]; 1107 ArrayList list = (ArrayList)hash["location"];
1109 uint x = (uint)(double)list[0]; 1108 uint x = (uint)(double)list[0];
1110 uint y = (uint)(double)list[1]; 1109 uint y = (uint)(double)list[1];
@@ -1148,9 +1147,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
1148 1147
1149 #endregion 1148 #endregion
1150 1149
1151 private void handleParcelInfo(IClientAPI remoteClient, LLUUID parcelID) 1150 private void handleParcelInfo(IClientAPI remoteClient, UUID parcelID)
1152 { 1151 {
1153 if (parcelID == LLUUID.Zero) 1152 if (parcelID == UUID.Zero)
1154 return; 1153 return;
1155 1154
1156 // assume we've got the parcelID we just computed in RemoteParcelRequest 1155 // assume we've got the parcelID we just computed in RemoteParcelRequest
diff --git a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
index 6388a1c..640b665 100644
--- a/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
+++ b/OpenSim/Region/Environment/Modules/World/Land/LandObject.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
@@ -67,14 +67,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
67 set { m_landData = value; } 67 set { m_landData = value; }
68 } 68 }
69 69
70 public LLUUID regionUUID 70 public UUID regionUUID
71 { 71 {
72 get { return m_scene.RegionInfo.RegionID; } 72 get { return m_scene.RegionInfo.RegionID; }
73 } 73 }
74 74
75 #region Constructors 75 #region Constructors
76 76
77 public LandObject(LLUUID owner_id, bool is_group_owned, Scene scene) 77 public LandObject(UUID owner_id, bool is_group_owned, Scene scene)
78 { 78 {
79 m_scene = scene; 79 m_scene = scene;
80 landData.OwnerID = owner_id; 80 landData.OwnerID = owner_id;
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
216 } 216 }
217 } 217 }
218 218
219 public void updateLandSold(LLUUID avatarID, LLUUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area) 219 public void updateLandSold(UUID avatarID, UUID groupID, bool groupOwned, uint AuctionID, int claimprice, int area)
220 { 220 {
221 LandData newData = landData.Copy(); 221 LandData newData = landData.Copy();
222 newData.OwnerID = avatarID; 222 newData.OwnerID = avatarID;
@@ -226,14 +226,14 @@ namespace OpenSim.Region.Environment.Modules.World.Land
226 newData.ClaimDate = Util.UnixTimeSinceEpoch(); 226 newData.ClaimDate = Util.UnixTimeSinceEpoch();
227 newData.ClaimPrice = claimprice; 227 newData.ClaimPrice = claimprice;
228 newData.SalePrice = 0; 228 newData.SalePrice = 0;
229 newData.AuthBuyerID = LLUUID.Zero; 229 newData.AuthBuyerID = UUID.Zero;
230 newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects); 230 newData.Flags &= ~(uint) (Parcel.ParcelFlags.ForSale | Parcel.ParcelFlags.ForSaleObjects | Parcel.ParcelFlags.SellParcelObjects);
231 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData); 231 m_scene.LandChannel.UpdateLandObject(landData.LocalID, newData);
232 232
233 sendLandUpdateToAvatarsOverMe(); 233 sendLandUpdateToAvatarsOverMe();
234 } 234 }
235 235
236 public bool isEitherBannedOrRestricted(LLUUID avatar) 236 public bool isEitherBannedOrRestricted(UUID avatar)
237 { 237 {
238 if (isBannedFromLand(avatar)) 238 if (isBannedFromLand(avatar))
239 { 239 {
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
246 return false; 246 return false;
247 } 247 }
248 248
249 public bool isBannedFromLand(LLUUID avatar) 249 public bool isBannedFromLand(UUID avatar)
250 { 250 {
251 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0) 251 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseBanList) > 0)
252 { 252 {
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
263 return false; 263 return false;
264 } 264 }
265 265
266 public bool isRestrictedFromLand(LLUUID avatar) 266 public bool isRestrictedFromLand(UUID avatar)
267 { 267 {
268 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0) 268 if ((landData.Flags & (uint) Parcel.ParcelFlags.UseAccessList) > 0)
269 { 269 {
@@ -322,9 +322,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
322 322
323 #region AccessList Functions 323 #region AccessList Functions
324 324
325 public List<LLUUID> createAccessListArrayByFlag(ParcelManager.AccessList flag) 325 public List<UUID> createAccessListArrayByFlag(ParcelManager.AccessList flag)
326 { 326 {
327 List<LLUUID> list = new List<LLUUID>(); 327 List<UUID> list = new List<UUID>();
328 foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList) 328 foreach (ParcelManager.ParcelAccessEntry entry in landData.ParcelAccessList)
329 { 329 {
330 if (entry.Flags == flag) 330 if (entry.Flags == flag)
@@ -334,25 +334,25 @@ namespace OpenSim.Region.Environment.Modules.World.Land
334 } 334 }
335 if (list.Count == 0) 335 if (list.Count == 0)
336 { 336 {
337 list.Add(LLUUID.Zero); 337 list.Add(UUID.Zero);
338 } 338 }
339 339
340 return list; 340 return list;
341 } 341 }
342 342
343 public void sendAccessList(LLUUID agentID, LLUUID sessionID, uint flags, int sequenceID, 343 public void sendAccessList(UUID agentID, UUID sessionID, uint flags, int sequenceID,
344 IClientAPI remote_client) 344 IClientAPI remote_client)
345 { 345 {
346 346
347 if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both) 347 if (flags == (uint) ParcelManager.AccessList.Access || flags == (uint) ParcelManager.AccessList.Both)
348 { 348 {
349 List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access); 349 List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Access);
350 remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID); 350 remote_client.SendLandAccessListData(avatars,(uint) ParcelManager.AccessList.Access,landData.LocalID);
351 } 351 }
352 352
353 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both) 353 if (flags == (uint) ParcelManager.AccessList.Ban || flags == (uint) ParcelManager.AccessList.Both)
354 { 354 {
355 List<LLUUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban); 355 List<UUID> avatars = createAccessListArrayByFlag(ParcelManager.AccessList.Ban);
356 remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID); 356 remote_client.SendLandAccessListData(avatars, (uint)ParcelManager.AccessList.Ban, landData.LocalID);
357 } 357 }
358 } 358 }
@@ -361,7 +361,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
361 { 361 {
362 LandData newData = landData.Copy(); 362 LandData newData = landData.Copy();
363 363
364 if (entries.Count == 1 && entries[0].AgentID == LLUUID.Zero) 364 if (entries.Count == 1 && entries[0].AgentID == UUID.Zero)
365 { 365 {
366 entries.Clear(); 366 entries.Clear();
367 } 367 }
@@ -450,7 +450,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
450 if (ty > 255) 450 if (ty > 255)
451 ty = 255; 451 ty = 255;
452 landData.AABBMin = 452 landData.AABBMin =
453 new LLVector3((float) (min_x * 4), (float) (min_y * 4), 453 new Vector3((float) (min_x * 4), (float) (min_y * 4),
454 (float) m_scene.Heightmap[tx, ty]); 454 (float) m_scene.Heightmap[tx, ty]);
455 455
456 tx = max_x * 4; 456 tx = max_x * 4;
@@ -460,7 +460,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
460 if (ty > 255) 460 if (ty > 255)
461 ty = 255; 461 ty = 255;
462 landData.AABBMax = 462 landData.AABBMax =
463 new LLVector3((float) (max_x * 4), (float) (max_y * 4), 463 new Vector3((float) (max_x * 4), (float) (max_y * 4),
464 (float) m_scene.Heightmap[tx, ty]); 464 (float) m_scene.Heightmap[tx, ty]);
465 landData.Area = tempArea; 465 landData.Area = tempArea;
466 } 466 }
@@ -694,7 +694,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
694 { 694 {
695 if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this)) 695 if (m_scene.ExternalChecks.ExternalChecksCanEditParcel(remote_client.AgentId, this))
696 { 696 {
697 Dictionary<LLUUID, int> primCount = new Dictionary<LLUUID, int>(); 697 Dictionary<UUID, int> primCount = new Dictionary<UUID, int>();
698 698
699 lock (primsOverMe) 699 lock (primsOverMe)
700 { 700 {
@@ -734,9 +734,9 @@ namespace OpenSim.Region.Environment.Modules.World.Land
734 } 734 }
735 } 735 }
736 736
737 public Dictionary<LLUUID, int> getLandObjectOwners() 737 public Dictionary<UUID, int> getLandObjectOwners()
738 { 738 {
739 Dictionary<LLUUID, int> ownersAndCount = new Dictionary<LLUUID, int>(); 739 Dictionary<UUID, int> ownersAndCount = new Dictionary<UUID, int>();
740 lock (primsOverMe) 740 lock (primsOverMe)
741 { 741 {
742 try 742 try
@@ -771,7 +771,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
771 m_scene.returnObjects(objs, obj.OwnerID); 771 m_scene.returnObjects(objs, obj.OwnerID);
772 } 772 }
773 773
774 public void returnLandObjects(uint type, LLUUID[] owners, IClientAPI remote_client) 774 public void returnLandObjects(uint type, UUID[] owners, IClientAPI remote_client)
775 { 775 {
776 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>(); 776 List<SceneObjectGroup> objlist = new List<SceneObjectGroup>();
777 for (int i = 0; i < owners.Length; i++) 777 for (int i = 0; i < owners.Length; i++)
@@ -814,7 +814,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
814 public void addPrimToCount(SceneObjectGroup obj) 814 public void addPrimToCount(SceneObjectGroup obj)
815 { 815 {
816 816
817 LLUUID prim_owner = obj.OwnerID; 817 UUID prim_owner = obj.OwnerID;
818 int prim_count = obj.PrimCount; 818 int prim_count = obj.PrimCount;
819 819
820 if (obj.IsSelected) 820 if (obj.IsSelected)
@@ -843,7 +843,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
843 { 843 {
844 if (primsOverMe.Contains(obj)) 844 if (primsOverMe.Contains(obj))
845 { 845 {
846 LLUUID prim_owner = obj.OwnerID; 846 UUID prim_owner = obj.OwnerID;
847 int prim_count = obj.PrimCount; 847 int prim_count = obj.PrimCount;
848 848
849 if (prim_owner == landData.OwnerID) 849 if (prim_owner == landData.OwnerID)
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
index c1f5566..541ca18 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Net; 30using System.Net;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Scenes; 34using OpenSim.Region.Environment.Scenes;
35 35
@@ -39,12 +39,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
39 { 39 {
40 private readonly string m_firstname; 40 private readonly string m_firstname;
41 private readonly string m_lastname; 41 private readonly string m_lastname;
42 private readonly LLVector3 m_startPos; 42 private readonly Vector3 m_startPos;
43 private readonly LLUUID m_uuid = LLUUID.Random(); 43 private readonly UUID m_uuid = UUID.Random();
44 private readonly Scene m_scene; 44 private readonly Scene m_scene;
45 45
46 46
47 public NPCAvatar(string firstname, string lastname, LLVector3 position, Scene scene) 47 public NPCAvatar(string firstname, string lastname, Vector3 position, Scene scene)
48 { 48 {
49 m_firstname = firstname; 49 m_firstname = firstname;
50 m_lastname = lastname; 50 m_lastname = lastname;
@@ -77,34 +77,34 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
77 SendOnChatFromViewer(message, ChatTypeEnum.Broadcast); 77 SendOnChatFromViewer(message, ChatTypeEnum.Broadcast);
78 } 78 }
79 79
80 public void GiveMoney(LLUUID target, int amount) 80 public void GiveMoney(UUID target, int amount)
81 { 81 {
82 OnMoneyTransferRequest(m_uuid, target, amount, 1, "Payment"); 82 OnMoneyTransferRequest(m_uuid, target, amount, 1, "Payment");
83 } 83 }
84 84
85 public void InstantMessage(LLUUID target, string message) 85 public void InstantMessage(UUID target, string message)
86 { 86 {
87 OnInstantMessage(this, m_uuid, SessionId, target, LLUUID.Combine(m_uuid, target), 87 OnInstantMessage(this, m_uuid, SessionId, target, UUID.Combine(m_uuid, target),
88 (uint) Util.UnixTimeSinceEpoch(), Name, message, 0, false, 0, 0, 88 (uint) Util.UnixTimeSinceEpoch(), Name, message, 0, false, 0, 0,
89 Position, m_scene.RegionInfo.RegionID, new byte[0]); 89 Position, m_scene.RegionInfo.RegionID, new byte[0]);
90 } 90 }
91 91
92 public void SendAgentOffline(LLUUID[] agentIDs) 92 public void SendAgentOffline(UUID[] agentIDs)
93 { 93 {
94 94
95 } 95 }
96 96
97 public void SendAgentOnline(LLUUID[] agentIDs) 97 public void SendAgentOnline(UUID[] agentIDs)
98 { 98 {
99 99
100 } 100 }
101 public void SendSitResponse(LLUUID TargetID, LLVector3 OffsetPos, LLQuaternion SitOrientation, bool autopilot, 101 public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot,
102 LLVector3 CameraAtOffset, LLVector3 CameraEyeOffset, bool ForceMouseLook) 102 Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
103 { 103 {
104 104
105 } 105 }
106 106
107 public void SendAdminResponse(LLUUID Token, uint AdminLevel) 107 public void SendAdminResponse(UUID Token, uint AdminLevel)
108 { 108 {
109 109
110 } 110 }
@@ -114,12 +114,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
114 114
115 } 115 }
116 116
117 public LLUUID GetDefaultAnimation(string name) 117 public UUID GetDefaultAnimation(string name)
118 { 118 {
119 return LLUUID.Zero; 119 return UUID.Zero;
120 } 120 }
121 121
122 public LLVector3 Position 122 public Vector3 Position
123 { 123 {
124 get { return m_scene.Entities[m_uuid].AbsolutePosition; } 124 get { return m_scene.Entities[m_uuid].AbsolutePosition; }
125 set { m_scene.Entities[m_uuid].AbsolutePosition = value; } 125 set { m_scene.Entities[m_uuid].AbsolutePosition = value; }
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
222 public event UpdateVector OnUpdatePrimGroupScale; 222 public event UpdateVector OnUpdatePrimGroupScale;
223 public event StatusChange OnChildAgentStatus; 223 public event StatusChange OnChildAgentStatus;
224 public event GenericCall2 OnStopMovement; 224 public event GenericCall2 OnStopMovement;
225 public event Action<LLUUID> OnRemoveAvatar; 225 public event Action<UUID> OnRemoveAvatar;
226 226
227 public event CreateNewInventoryItem OnCreateNewInventoryItem; 227 public event CreateNewInventoryItem OnCreateNewInventoryItem;
228 public event CreateInventoryFolder OnCreateNewInventoryFolder; 228 public event CreateInventoryFolder OnCreateNewInventoryFolder;
@@ -322,34 +322,34 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
322 322
323 #endregion 323 #endregion
324 324
325 public void ActivateGesture(LLUUID assetId, LLUUID gestureId) 325 public void ActivateGesture(UUID assetId, UUID gestureId)
326 { 326 {
327 } 327 }
328 public void DeactivateGesture(LLUUID assetId, LLUUID gestureId) 328 public void DeactivateGesture(UUID assetId, UUID gestureId)
329 { 329 {
330 } 330 }
331 331
332 #region Overrriden Methods IGNORE 332 #region Overrriden Methods IGNORE
333 333
334 public virtual LLVector3 StartPos 334 public virtual Vector3 StartPos
335 { 335 {
336 get { return m_startPos; } 336 get { return m_startPos; }
337 set { } 337 set { }
338 } 338 }
339 339
340 public virtual LLUUID AgentId 340 public virtual UUID AgentId
341 { 341 {
342 get { return m_uuid; } 342 get { return m_uuid; }
343 } 343 }
344 344
345 public LLUUID SessionId 345 public UUID SessionId
346 { 346 {
347 get { return LLUUID.Zero; } 347 get { return UUID.Zero; }
348 } 348 }
349 349
350 public LLUUID SecureSessionId 350 public UUID SecureSessionId
351 { 351 {
352 get { return LLUUID.Zero; } 352 get { return UUID.Zero; }
353 } 353 }
354 354
355 public virtual string FirstName 355 public virtual string FirstName
@@ -373,9 +373,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
373 set { } 373 set { }
374 } 374 }
375 375
376 public LLUUID ActiveGroupId 376 public UUID ActiveGroupId
377 { 377 {
378 get { return LLUUID.Zero; } 378 get { return UUID.Zero; }
379 } 379 }
380 380
381 public string ActiveGroupName 381 public string ActiveGroupName
@@ -388,10 +388,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
388 get { return 0; } 388 get { return 0; }
389 } 389 }
390 390
391 public ulong GetGroupPowers(LLUUID groupID) 391 public ulong GetGroupPowers(UUID groupID)
392 { 392 {
393 return 0; 393 return 0;
394 } 394 }
395 395
396 public virtual int NextAnimationSequenceNumber 396 public virtual int NextAnimationSequenceNumber
397 { 397 {
@@ -406,7 +406,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
406 { 406 {
407 } 407 }
408 408
409 public virtual void SendAppearance(LLUUID agentID, byte[] visualParams, byte[] textureEntry) 409 public virtual void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry)
410 { 410 {
411 } 411 }
412 412
@@ -422,12 +422,12 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
422 { 422 {
423 } 423 }
424 424
425 public virtual void SendAgentDataUpdate(LLUUID agentid, LLUUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) 425 public virtual void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle)
426 { 426 {
427 427
428 } 428 }
429 429
430 public virtual void SendKillObject(ulong regionHandle, uint localID) 430 public virtual void SendKiPrimitive(ulong regionHandle, uint localID)
431 { 431 {
432 } 432 }
433 433
@@ -440,27 +440,27 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
440 } 440 }
441 441
442 442
443 public virtual void SendAnimations(LLUUID[] animations, int[] seqs, LLUUID sourceAgentId) 443 public virtual void SendAnimations(UUID[] animations, int[] seqs, UUID sourceAgentId)
444 { 444 {
445 } 445 }
446 446
447 public virtual void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, 447 public virtual void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName,
448 LLUUID fromAgentID, byte source, byte audible) 448 UUID fromAgentID, byte source, byte audible)
449 { 449 {
450 } 450 }
451 451
452 public virtual void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, 452 public virtual void SendChatMessage(byte[] message, byte type, Vector3 fromPos, string fromName,
453 LLUUID fromAgentID, byte source, byte audible) 453 UUID fromAgentID, byte source, byte audible)
454 { 454 {
455 } 455 }
456 456
457 public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 457 public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
458 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp) 458 UUID imSessionID, string fromName, byte dialog, uint timeStamp)
459 { 459 {
460 } 460 }
461 461
462 public virtual void SendInstantMessage(LLUUID fromAgent, LLUUID fromAgentSession, string message, LLUUID toAgent, 462 public virtual void SendInstantMessage(UUID fromAgent, UUID fromAgentSession, string message, UUID toAgent,
463 LLUUID imSessionID, string fromName, byte dialog, uint timeStamp, 463 UUID imSessionID, string fromName, byte dialog, uint timeStamp,
464 byte[] binaryBucket) 464 byte[] binaryBucket)
465 { 465 {
466 } 466 }
@@ -476,7 +476,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
476 { 476 {
477 } 477 }
478 478
479 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look) 479 public virtual void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look)
480 { 480 {
481 } 481 }
482 482
@@ -489,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
489 return new AgentCircuitData(); 489 return new AgentCircuitData();
490 } 490 }
491 491
492 public virtual void CrossRegion(ulong newRegionHandle, LLVector3 pos, LLVector3 lookAt, 492 public virtual void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt,
493 IPEndPoint newRegionExternalEndPoint, string capsURL) 493 IPEndPoint newRegionExternalEndPoint, string capsURL)
494 { 494 {
495 } 495 }
@@ -498,7 +498,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
498 { 498 {
499 } 499 }
500 500
501 public virtual void SendLocalTeleport(LLVector3 position, LLVector3 lookAt, uint flags) 501 public virtual void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags)
502 { 502 {
503 } 503 }
504 504
@@ -515,66 +515,66 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
515 { 515 {
516 } 516 }
517 517
518 public virtual void SendMoneyBalance(LLUUID transaction, bool success, byte[] description, int balance) 518 public virtual void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance)
519 { 519 {
520 } 520 }
521 521
522 public virtual void SendPayPrice(LLUUID objectID, int[] payPrice) 522 public virtual void SendPayPrice(UUID objectID, int[] payPrice)
523 { 523 {
524 } 524 }
525 525
526 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, LLUUID avatarID, 526 public virtual void SendAvatarData(ulong regionHandle, string firstName, string lastName, UUID avatarID,
527 uint avatarLocalID, LLVector3 Pos, byte[] textureEntry, uint parentID, LLQuaternion rotation) 527 uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation)
528 { 528 {
529 } 529 }
530 530
531 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 531 public virtual void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
532 LLVector3 position, LLVector3 velocity, LLQuaternion rotation) 532 Vector3 position, Vector3 velocity, Quaternion rotation)
533 { 533 {
534 } 534 }
535 535
536 public virtual void SendCoarseLocationUpdate(List<LLVector3> CoarseLocations) 536 public virtual void SendCoarseLocationUpdate(List<Vector3> CoarseLocations)
537 { 537 {
538 } 538 }
539 539
540 public virtual void AttachObject(uint localID, LLQuaternion rotation, byte attachPoint) 540 public virtual void AttachObject(uint localID, Quaternion rotation, byte attachPoint)
541 { 541 {
542 } 542 }
543 543
544 public virtual void SendDialog(string objectname, LLUUID objectID, LLUUID ownerID, string msg, LLUUID textureID, int ch, string[] buttonlabels) 544 public virtual void SendDialog(string objectname, UUID objectID, UUID ownerID, string msg, UUID textureID, int ch, string[] buttonlabels)
545 { 545 {
546 } 546 }
547 547
548 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, 548 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
549 PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, 549 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
550 LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, 550 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
551 LLUUID objectID, LLUUID ownerID, string text, byte[] color, 551 UUID objectID, UUID ownerID, string text, byte[] color,
552 uint parentID, 552 uint parentID,
553 byte[] particleSystem, byte clickAction) 553 byte[] particleSystem, byte clickAction)
554 { 554 {
555 } 555 }
556 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, 556 public virtual void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID,
557 PrimitiveBaseShape primShape, LLVector3 pos, LLVector3 vel, 557 PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel,
558 LLVector3 acc, LLQuaternion rotation, LLVector3 rvel, uint flags, 558 Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags,
559 LLUUID objectID, LLUUID ownerID, string text, byte[] color, 559 UUID objectID, UUID ownerID, string text, byte[] color,
560 uint parentID, 560 uint parentID,
561 byte[] particleSystem, byte clickAction, byte[] textureanimation, 561 byte[] particleSystem, byte clickAction, byte[] textureanimation,
562 bool attachment, uint AttachmentPoint, LLUUID AssetId, LLUUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) 562 bool attachment, uint AttachmentPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius)
563 { 563 {
564 } 564 }
565 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 565 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
566 LLVector3 position, LLQuaternion rotation, LLVector3 velocity, 566 Vector3 position, Quaternion rotation, Vector3 velocity,
567 LLVector3 rotationalvelocity, byte state, LLUUID AssetId) 567 Vector3 rotationalvelocity, byte state, UUID AssetId)
568 { 568 {
569 } 569 }
570 570
571 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, 571 public virtual void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID,
572 LLVector3 position, LLQuaternion rotation, LLVector3 velocity, 572 Vector3 position, Quaternion rotation, Vector3 velocity,
573 LLVector3 rotationalvelocity) 573 Vector3 rotationalvelocity)
574 { 574 {
575 } 575 }
576 576
577 public virtual void SendInventoryFolderDetails(LLUUID ownerID, LLUUID folderID, 577 public virtual void SendInventoryFolderDetails(UUID ownerID, UUID folderID,
578 List<InventoryItemBase> items, 578 List<InventoryItemBase> items,
579 List<InventoryFolderBase> folders, 579 List<InventoryFolderBase> folders,
580 bool fetchFolders, 580 bool fetchFolders,
@@ -582,7 +582,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
582 { 582 {
583 } 583 }
584 584
585 public virtual void SendInventoryItemDetails(LLUUID ownerID, InventoryItemBase item) 585 public virtual void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item)
586 { 586 {
587 } 587 }
588 588
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
590 { 590 {
591 } 591 }
592 592
593 public virtual void SendRemoveInventoryItem(LLUUID itemID) 593 public virtual void SendRemoveInventoryItem(UUID itemID)
594 { 594 {
595 } 595 }
596 596
@@ -603,7 +603,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
603 { 603 {
604 } 604 }
605 605
606 public virtual void SendTaskInventory(LLUUID taskID, short serial, byte[] fileName) 606 public virtual void SendTaskInventory(UUID taskID, short serial, byte[] fileName)
607 { 607 {
608 } 608 }
609 609
@@ -618,24 +618,24 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
618 { 618 {
619 619
620 } 620 }
621 public virtual void SendNameReply(LLUUID profileId, string firstname, string lastname) 621 public virtual void SendNameReply(UUID profileId, string firstname, string lastname)
622 { 622 {
623 } 623 }
624 624
625 public virtual void SendPreLoadSound(LLUUID objectID, LLUUID ownerID, LLUUID soundID) 625 public virtual void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID)
626 { 626 {
627 } 627 }
628 628
629 public virtual void SendPlayAttachedSound(LLUUID soundID, LLUUID objectID, LLUUID ownerID, float gain, 629 public virtual void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain,
630 byte flags) 630 byte flags)
631 { 631 {
632 } 632 }
633 633
634 public void SendTriggeredSound(LLUUID soundID, LLUUID ownerID, LLUUID objectID, LLUUID parentID, ulong handle, LLVector3 position, float gain) 634 public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain)
635 { 635 {
636 } 636 }
637 637
638 public void SendAttachedSoundGainChange(LLUUID objectID, float gain) 638 public void SendAttachedSoundGainChange(UUID objectID, float gain)
639 { 639 {
640 640
641 } 641 }
@@ -652,7 +652,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
652 { 652 {
653 } 653 }
654 654
655 public void SendLoadURL(string objectname, LLUUID objectID, LLUUID ownerID, bool groupOwned, string message, 655 public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message,
656 string url) 656 string url)
657 { 657 {
658 } 658 }
@@ -669,7 +669,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
669 OnCompleteMovementToRegion(); 669 OnCompleteMovementToRegion();
670 } 670 }
671 } 671 }
672 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, LLUUID AssetFullID) 672 public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
673 { 673 {
674 } 674 }
675 675
@@ -677,11 +677,11 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
677 { 677 {
678 } 678 }
679 679
680 public void SendXferRequest(ulong XferID, short AssetType, LLUUID vFileID, byte FilePath, byte[] FileName) 680 public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName)
681 { 681 {
682 } 682 }
683 683
684 public void SendImagePart(ushort numParts, LLUUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) 684 public void SendImagePart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
685 { 685 {
686 } 686 }
687 687
@@ -693,16 +693,16 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
693 { 693 {
694 } 694 }
695 695
696 public void SendObjectPropertiesFamilyData(uint RequestFlags, LLUUID ObjectUUID, LLUUID OwnerID, LLUUID GroupID, 696 public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID,
697 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, 697 uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask,
698 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, 698 uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category,
699 LLUUID LastOwnerID, string ObjectName, string Description) 699 UUID LastOwnerID, string ObjectName, string Description)
700 { 700 {
701 } 701 }
702 702
703 public void SendObjectPropertiesReply(LLUUID ItemID, ulong CreationDate, LLUUID CreatorUUID, LLUUID FolderUUID, LLUUID FromTaskUUID, 703 public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID,
704 LLUUID GroupUUID, short InventorySerial, LLUUID LastOwnerUUID, LLUUID ObjectUUID, 704 UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID,
705 LLUUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, 705 UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName,
706 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, 706 string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask,
707 uint BaseMask, byte saleType, int salePrice) 707 uint BaseMask, byte saleType, int salePrice)
708 { 708 {
@@ -713,7 +713,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
713 return false; 713 return false;
714 } 714 }
715 715
716 public void SendSunPos(LLVector3 sunPos, LLVector3 sunVel, ulong time, uint dlen, uint ylen, float phase) 716 public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong time, uint dlen, uint ylen, float phase)
717 { 717 {
718 } 718 }
719 719
@@ -721,9 +721,9 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
721 { 721 {
722 } 722 }
723 723
724 public void SendAvatarProperties(LLUUID avatarID, string aboutText, string bornOn, Byte[] charterMember, 724 public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember,
725 string flAbout, uint flags, LLUUID flImageID, LLUUID imageID, string profileURL, 725 string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL,
726 LLUUID partnerID) 726 UUID partnerID)
727 { 727 {
728 } 728 }
729 729
@@ -762,7 +762,7 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
762 get { return m_circuitCode; } 762 get { return m_circuitCode; }
763 set { m_circuitCode = value; } 763 set { m_circuitCode = value; }
764 } 764 }
765 public void SendBlueBoxMessage(LLUUID FromAvatarID, LLUUID fromSessionID, String FromAvatarName, String Message) 765 public void SendBlueBoxMessage(UUID FromAvatarID, UUID fromSessionID, String FromAvatarName, String Message)
766 { 766 {
767 767
768 } 768 }
@@ -783,52 +783,52 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
783 { 783 {
784 } 784 }
785 785
786 public void SendScriptQuestion(LLUUID objectID, string taskName, string ownerName, LLUUID itemID, int question) 786 public void SendScriptQuestion(UUID objectID, string taskName, string ownerName, UUID itemID, int question)
787 { 787 {
788 } 788 }
789 public void SendHealth(float health) 789 public void SendHealth(float health)
790 { 790 {
791 } 791 }
792 792
793 public void SendEstateManagersList(LLUUID invoice, LLUUID[] EstateManagers, uint estateID) 793 public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID)
794 { 794 {
795 } 795 }
796 796
797 public void SendBannedUserList(LLUUID invoice, EstateBan[] banlist, uint estateID) 797 public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID)
798 { 798 {
799 } 799 }
800 800
801 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) 801 public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args)
802 { 802 {
803 } 803 }
804 public void SendEstateCovenantInformation(LLUUID covenant) 804 public void SendEstateCovenantInformation(UUID covenant)
805 { 805 {
806 } 806 }
807 public void SendDetailedEstateData(LLUUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, LLUUID covenant, string abuseEmail) 807 public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail)
808 { 808 {
809 } 809 }
810 810
811 public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) 811 public void SendLandProperties(IClientAPI remote_client, int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor,int parcelObjectCapacity, int simObjectCapacity, uint regionFlags)
812 { 812 {
813 } 813 }
814 public void SendLandAccessListData(List<LLUUID> avatars, uint accessFlag, int localLandID) 814 public void SendLandAccessListData(List<UUID> avatars, uint accessFlag, int localLandID)
815 { 815 {
816 } 816 }
817 public void SendForceClientSelectObjects(List<uint> objectIDs) 817 public void SendForceClientSelectObjects(List<uint> objectIDs)
818 { 818 {
819 } 819 }
820 public void SendLandObjectOwners(Dictionary<LLUUID, int> ownersAndCount) 820 public void SendLandObjectOwners(Dictionary<UUID, int> ownersAndCount)
821 { 821 {
822 } 822 }
823 public void SendLandParcelOverlay(byte[] data, int sequence_id) 823 public void SendLandParcelOverlay(byte[] data, int sequence_id)
824 { 824 {
825 } 825 }
826 826
827 public void SendGroupNameReply(LLUUID groupLLUID, string GroupName) 827 public void SendGroupNameReply(UUID groupLLUID, string GroupName)
828 { 828 {
829 } 829 }
830 830
831 public void SendScriptRunningReply(LLUUID objectID, LLUUID itemID, bool running) 831 public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running)
832 { 832 {
833 } 833 }
834 834
@@ -842,25 +842,25 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
842 { 842 {
843 } 843 }
844 844
845 public void SendParcelMediaUpdate(string mediaUrl, LLUUID mediaTextureID, 845 public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID,
846 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, 846 byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight,
847 byte mediaLoop) 847 byte mediaLoop)
848 { 848 {
849 } 849 }
850 850
851 public void SendSetFollowCamProperties (LLUUID objectID, SortedDictionary<int, float> parameters) 851 public void SendSetFollowCamProperties (UUID objectID, SortedDictionary<int, float> parameters)
852 { 852 {
853 } 853 }
854 854
855 public void SendClearFollowCamProperties (LLUUID objectID) 855 public void SendClearFollowCamProperties (UUID objectID)
856 { 856 {
857 } 857 }
858 858
859 public void SendRegionHandle (LLUUID regoinID, ulong handle) 859 public void SendRegionHandle (UUID regoinID, ulong handle)
860 { 860 {
861 } 861 }
862 862
863 public void SendParcelInfo (RegionInfo info, LandData land, LLUUID parcelID, uint x, uint y) 863 public void SendParcelInfo (RegionInfo info, LandData land, UUID parcelID, uint x, uint y)
864 { 864 {
865 } 865 }
866 866
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
index 86472f6..7227cf0 100644
--- a/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCModule.cs
@@ -25,7 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using libsecondlife; 28using OpenMetaverse;
29using Nini.Config; 29using Nini.Config;
30using OpenSim.Region.Environment.Interfaces; 30using OpenSim.Region.Environment.Interfaces;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
@@ -40,8 +40,8 @@ namespace OpenSim.Region.Environment.Modules.World.NPC
40 { 40 {
41 // if (m_enabled) 41 // if (m_enabled)
42 // { 42 // {
43 // NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new LLVector3(128, 128, 40), scene); 43 // NPCAvatar testAvatar = new NPCAvatar("Jack", "NPC", new Vector3(128, 128, 40), scene);
44 // NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new LLVector3(136, 128, 40), scene); 44 // NPCAvatar testAvatar2 = new NPCAvatar("Jill", "NPC", new Vector3(136, 128, 40), scene);
45 // scene.AddNewClient(testAvatar, false); 45 // scene.AddNewClient(testAvatar, false);
46 // scene.AddNewClient(testAvatar2, false); 46 // scene.AddNewClient(testAvatar2, false);
47 // } 47 // }
diff --git a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
index b9615ec..d92f33a 100644
--- a/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Permissions/PermissionsModule.cs
@@ -25,7 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using libsecondlife; 28using OpenMetaverse;
29using Nini.Config; 29using Nini.Config;
30using System; 30using System;
31using System.Collections; 31using System.Collections;
@@ -228,7 +228,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
228 #endregion 228 #endregion
229 229
230 #region Helper Functions 230 #region Helper Functions
231 protected void SendPermissionError(LLUUID user, string reason) 231 protected void SendPermissionError(UUID user, string reason)
232 { 232 {
233 m_scene.EventManager.TriggerPermissionError(user, reason); 233 m_scene.EventManager.TriggerPermissionError(user, reason);
234 } 234 }
@@ -238,14 +238,14 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
238 m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName); 238 m_log.Info("[PERMISSIONS]: " + permissionCalled + " was called from " + m_scene.RegionInfo.RegionName);
239 } 239 }
240 240
241 protected bool IsAdministrator(LLUUID user) 241 protected bool IsAdministrator(UUID user)
242 { 242 {
243 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != LLUUID.Zero) 243 if (m_scene.RegionInfo.MasterAvatarAssignedUUID != UUID.Zero)
244 { 244 {
245 if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user)) 245 if (m_RegionOwnerIsGod && (m_scene.RegionInfo.MasterAvatarAssignedUUID == user))
246 return true; 246 return true;
247 } 247 }
248 if (m_scene.RegionInfo.EstateSettings.EstateOwner != LLUUID.Zero) 248 if (m_scene.RegionInfo.EstateSettings.EstateOwner != UUID.Zero)
249 { 249 {
250 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user) 250 if (m_scene.RegionInfo.EstateSettings.EstateOwner == user)
251 return true; 251 return true;
@@ -263,7 +263,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
263 return false; 263 return false;
264 } 264 }
265 265
266 protected bool IsEstateManager(LLUUID user) 266 protected bool IsEstateManager(UUID user)
267 { 267 {
268 return m_scene.RegionInfo.EstateSettings.IsEstateManager(user); 268 return m_scene.RegionInfo.EstateSettings.IsEstateManager(user);
269 } 269 }
@@ -286,7 +286,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
286 286
287 #region Object Permissions 287 #region Object Permissions
288 288
289 public uint GenerateClientFlags(LLUUID user, LLUUID objID) 289 public uint GenerateClientFlags(UUID user, UUID objID)
290 { 290 {
291 // Here's the way this works, 291 // Here's the way this works,
292 // ObjectFlags and Permission flags are two different enumerations 292 // ObjectFlags and Permission flags are two different enumerations
@@ -306,27 +306,27 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
306 return (uint)0; 306 return (uint)0;
307 307
308 uint objflags = task.GetEffectiveObjectFlags(); 308 uint objflags = task.GetEffectiveObjectFlags();
309 LLUUID objectOwner = task.OwnerID; 309 UUID objectOwner = task.OwnerID;
310 310
311 311
312 // Remove any of the objectFlags that are temporary. These will get added back if appropriate 312 // Remove any of the objectFlags that are temporary. These will get added back if appropriate
313 // in the next bit of code 313 // in the next bit of code
314 314
315 objflags &= (uint) 315 objflags &= (uint)
316 ~(LLObject.ObjectFlags.ObjectCopy | // Tells client you can copy the object 316 ~(PrimFlags.ObjectCopy | // Tells client you can copy the object
317 LLObject.ObjectFlags.ObjectModify | // tells client you can modify the object 317 PrimFlags.ObjectModify | // tells client you can modify the object
318 LLObject.ObjectFlags.ObjectMove | // tells client that you can move the object (only, no mod) 318 PrimFlags.ObjectMove | // tells client that you can move the object (only, no mod)
319 LLObject.ObjectFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it 319 PrimFlags.ObjectTransfer | // tells the client that you can /take/ the object if you don't own it
320 LLObject.ObjectFlags.ObjectYouOwner | // Tells client that you're the owner of the object 320 PrimFlags.ObjectYouOwner | // Tells client that you're the owner of the object
321 LLObject.ObjectFlags.ObjectAnyOwner | // Tells client that someone owns the object 321 PrimFlags.ObjectAnyOwner | // Tells client that someone owns the object
322 LLObject.ObjectFlags.ObjectOwnerModify | // Tells client that you're the owner of the object 322 PrimFlags.ObjectOwnerModify | // Tells client that you're the owner of the object
323 LLObject.ObjectFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set 323 PrimFlags.ObjectYouOfficer // Tells client that you've got group object editing permission. Used when ObjectGroupOwned is set
324 ); 324 );
325 325
326 // Creating the three ObjectFlags options for this method to choose from. 326 // Creating the three ObjectFlags options for this method to choose from.
327 // Customize the OwnerMask 327 // Customize the OwnerMask
328 uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags); 328 uint objectOwnerMask = ApplyObjectModifyMasks(task.OwnerMask, objflags);
329 objectOwnerMask |= (uint)LLObject.ObjectFlags.ObjectYouOwner | (uint)LLObject.ObjectFlags.ObjectAnyOwner | (uint)LLObject.ObjectFlags.ObjectOwnerModify; 329 objectOwnerMask |= (uint)PrimFlags.ObjectYouOwner | (uint)PrimFlags.ObjectAnyOwner | (uint)PrimFlags.ObjectOwnerModify;
330 330
331 // Customize the GroupMask 331 // Customize the GroupMask
332 // uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags); 332 // uint objectGroupMask = ApplyObjectModifyMasks(task.GroupMask, objflags);
@@ -336,8 +336,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
336 336
337 337
338 // Hack to allow collaboration until Groups and Group Permissions are implemented 338 // Hack to allow collaboration until Groups and Group Permissions are implemented
339 if ((objectEveryoneMask & (uint)LLObject.ObjectFlags.ObjectMove) != 0) 339 if ((objectEveryoneMask & (uint)PrimFlags.ObjectMove) != 0)
340 objectEveryoneMask |= (uint)LLObject.ObjectFlags.ObjectModify; 340 objectEveryoneMask |= (uint)PrimFlags.ObjectModify;
341 341
342 if (m_bypassPermissions) 342 if (m_bypassPermissions)
343 return objectOwnerMask; 343 return objectOwnerMask;
@@ -378,28 +378,28 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
378 378
379 if ((setPermissionMask & (uint)PermissionMask.Copy) != 0) 379 if ((setPermissionMask & (uint)PermissionMask.Copy) != 0)
380 { 380 {
381 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectCopy; 381 objectFlagsMask |= (uint)PrimFlags.ObjectCopy;
382 } 382 }
383 383
384 if ((setPermissionMask & (uint)PermissionMask.Move) != 0) 384 if ((setPermissionMask & (uint)PermissionMask.Move) != 0)
385 { 385 {
386 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectMove; 386 objectFlagsMask |= (uint)PrimFlags.ObjectMove;
387 } 387 }
388 388
389 if ((setPermissionMask & (uint)PermissionMask.Modify) != 0) 389 if ((setPermissionMask & (uint)PermissionMask.Modify) != 0)
390 { 390 {
391 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectModify; 391 objectFlagsMask |= (uint)PrimFlags.ObjectModify;
392 } 392 }
393 393
394 if ((setPermissionMask & (uint)PermissionMask.Transfer) != 0) 394 if ((setPermissionMask & (uint)PermissionMask.Transfer) != 0)
395 { 395 {
396 objectFlagsMask |= (uint)LLObject.ObjectFlags.ObjectTransfer; 396 objectFlagsMask |= (uint)PrimFlags.ObjectTransfer;
397 } 397 }
398 398
399 return objectFlagsMask; 399 return objectFlagsMask;
400 } 400 }
401 401
402 protected bool GenericObjectPermission(LLUUID currentUser, LLUUID objId, bool denyOnLocked) 402 protected bool GenericObjectPermission(UUID currentUser, UUID objId, bool denyOnLocked)
403 { 403 {
404 // Default: deny 404 // Default: deny
405 bool permission = false; 405 bool permission = false;
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
419 419
420 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId]; 420 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objId];
421 421
422 LLUUID objectOwner = group.OwnerID; 422 UUID objectOwner = group.OwnerID;
423 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); 423 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
424 424
425 // People shouldn't be able to do anything with locked objects, except the Administrator 425 // People shouldn't be able to do anything with locked objects, except the Administrator
@@ -472,7 +472,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
472 #endregion 472 #endregion
473 473
474 #region Generic Permissions 474 #region Generic Permissions
475 protected bool GenericCommunicationPermission(LLUUID user, LLUUID target) 475 protected bool GenericCommunicationPermission(UUID user, UUID target)
476 { 476 {
477 // Setting this to true so that cool stuff can happen until we define what determines Generic Communication Permission 477 // Setting this to true so that cool stuff can happen until we define what determines Generic Communication Permission
478 bool permission = true; 478 bool permission = true;
@@ -491,7 +491,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
491 return permission; 491 return permission;
492 } 492 }
493 493
494 public bool GenericEstatePermission(LLUUID user) 494 public bool GenericEstatePermission(UUID user)
495 { 495 {
496 // Default: deny 496 // Default: deny
497 bool permission = false; 497 bool permission = false;
@@ -507,7 +507,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
507 return permission; 507 return permission;
508 } 508 }
509 509
510 protected bool GenericParcelPermission(LLUUID user, ILandObject parcel) 510 protected bool GenericParcelPermission(UUID user, ILandObject parcel)
511 { 511 {
512 bool permission = false; 512 bool permission = false;
513 513
@@ -534,7 +534,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
534 return permission; 534 return permission;
535 } 535 }
536 536
537 protected bool GenericParcelPermission(LLUUID user, LLVector3 pos) 537 protected bool GenericParcelPermission(UUID user, Vector3 pos)
538 { 538 {
539 ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y); 539 ILandObject parcel = m_scene.LandChannel.GetLandObject(pos.X, pos.Y);
540 if (parcel == null) return false; 540 if (parcel == null) return false;
@@ -543,7 +543,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
543#endregion 543#endregion
544 544
545 #region Permission Checks 545 #region Permission Checks
546 private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene) 546 private bool CanAbandonParcel(UUID user, ILandObject parcel, Scene scene)
547 { 547 {
548 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 548 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
549 if (m_bypassPermissions) return m_bypassPermissionsValue; 549 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
551 return GenericParcelPermission(user, parcel); 551 return GenericParcelPermission(user, parcel);
552 } 552 }
553 553
554 private bool CanReclaimParcel(LLUUID user, ILandObject parcel, Scene scene) 554 private bool CanReclaimParcel(UUID user, ILandObject parcel, Scene scene)
555 { 555 {
556 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 556 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
557 if (m_bypassPermissions) return m_bypassPermissionsValue; 557 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -559,7 +559,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
559 return GenericParcelPermission(user, parcel); 559 return GenericParcelPermission(user, parcel);
560 } 560 }
561 561
562 private bool CanBeGodLike(LLUUID user, Scene scene) 562 private bool CanBeGodLike(UUID user, Scene scene)
563 { 563 {
564 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 564 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
565 if (m_bypassPermissions) return m_bypassPermissionsValue; 565 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -567,7 +567,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
567 return IsAdministrator(user); 567 return IsAdministrator(user);
568 } 568 }
569 569
570 private bool CanDuplicateObject(int objectCount, LLUUID objectID, LLUUID owner, Scene scene, LLVector3 objectPosition) 570 private bool CanDuplicateObject(int objectCount, UUID objectID, UUID owner, Scene scene, Vector3 objectPosition)
571 { 571 {
572 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 572 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
573 if (m_bypassPermissions) return m_bypassPermissionsValue; 573 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -581,7 +581,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
581 return CanRezObject(objectCount, owner, objectPosition, scene); 581 return CanRezObject(objectCount, owner, objectPosition, scene);
582 } 582 }
583 583
584 private bool CanDeleteObject(LLUUID objectID, LLUUID deleter, Scene scene) 584 private bool CanDeleteObject(UUID objectID, UUID deleter, Scene scene)
585 { 585 {
586 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 586 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
587 if (m_bypassPermissions) return m_bypassPermissionsValue; 587 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -589,7 +589,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
589 return GenericObjectPermission(deleter, objectID, false); 589 return GenericObjectPermission(deleter, objectID, false);
590 } 590 }
591 591
592 private bool CanEditObject(LLUUID objectID, LLUUID editorID, Scene scene) 592 private bool CanEditObject(UUID objectID, UUID editorID, Scene scene)
593 { 593 {
594 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 594 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
595 if (m_bypassPermissions) return m_bypassPermissionsValue; 595 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -598,7 +598,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
598 return GenericObjectPermission(editorID, objectID, false); 598 return GenericObjectPermission(editorID, objectID, false);
599 } 599 }
600 600
601 private bool CanEditParcel(LLUUID user, ILandObject parcel, Scene scene) 601 private bool CanEditParcel(UUID user, ILandObject parcel, Scene scene)
602 { 602 {
603 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 603 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
604 if (m_bypassPermissions) return m_bypassPermissionsValue; 604 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -606,7 +606,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
606 return GenericParcelPermission(user, parcel); 606 return GenericParcelPermission(user, parcel);
607 } 607 }
608 608
609 private bool CanEditScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) 609 private bool CanEditScript(UUID script, UUID objectID, UUID user, Scene scene)
610 { 610 {
611 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 611 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
612 if (m_bypassPermissions) return m_bypassPermissionsValue; 612 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -614,7 +614,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
614 return false; 614 return false;
615 } 615 }
616 616
617 private bool CanEditNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) 617 private bool CanEditNotecard(UUID notecard, UUID objectID, UUID user, Scene scene)
618 { 618 {
619 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 619 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
620 if (m_bypassPermissions) return m_bypassPermissionsValue; 620 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
622 return true; 622 return true;
623 } 623 }
624 624
625 private bool CanInstantMessage(LLUUID user, LLUUID target, Scene startScene) 625 private bool CanInstantMessage(UUID user, UUID target, Scene startScene)
626 { 626 {
627 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 627 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
628 if (m_bypassPermissions) return m_bypassPermissionsValue; 628 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -631,7 +631,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
631 return GenericCommunicationPermission(user, target); 631 return GenericCommunicationPermission(user, target);
632 } 632 }
633 633
634 private bool CanInventoryTransfer(LLUUID user, LLUUID target, Scene startScene) 634 private bool CanInventoryTransfer(UUID user, UUID target, Scene startScene)
635 { 635 {
636 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 636 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
637 if (m_bypassPermissions) return m_bypassPermissionsValue; 637 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -639,7 +639,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
639 return GenericCommunicationPermission(user, target); 639 return GenericCommunicationPermission(user, target);
640 } 640 }
641 641
642 private bool CanIssueEstateCommand(LLUUID user, Scene requestFromScene, bool ownerCommand) 642 private bool CanIssueEstateCommand(UUID user, Scene requestFromScene, bool ownerCommand)
643 { 643 {
644 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 644 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
645 if (m_bypassPermissions) return m_bypassPermissionsValue; 645 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -656,7 +656,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
656 return GenericEstatePermission(user); 656 return GenericEstatePermission(user);
657 } 657 }
658 658
659 private bool CanMoveObject(LLUUID objectID, LLUUID moverID, Scene scene) 659 private bool CanMoveObject(UUID objectID, UUID moverID, Scene scene)
660 { 660 {
661 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 661 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
662 if (m_bypassPermissions) 662 if (m_bypassPermissions)
@@ -696,10 +696,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
696 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; 696 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
697 697
698 698
699 // LLUUID taskOwner = null; 699 // UUID taskOwner = null;
700 // Added this because at this point in time it wouldn't be wise for 700 // Added this because at this point in time it wouldn't be wise for
701 // the administrator object permissions to take effect. 701 // the administrator object permissions to take effect.
702 // LLUUID objectOwner = task.OwnerID; 702 // UUID objectOwner = task.OwnerID;
703 703
704 // Anyone can move 704 // Anyone can move
705 if ((task.RootPart.EveryoneMask & PERM_MOVE) != 0) 705 if ((task.RootPart.EveryoneMask & PERM_MOVE) != 0)
@@ -727,7 +727,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
727 727
728 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objectID]; 728 SceneObjectGroup group = (SceneObjectGroup)m_scene.Entities[objectID];
729 729
730 LLUUID objectOwner = group.OwnerID; 730 UUID objectOwner = group.OwnerID;
731 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0); 731 locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
732 732
733 733
@@ -747,7 +747,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
747 return permission; 747 return permission;
748 } 748 }
749 749
750 private bool CanObjectEntry(LLUUID objectID, LLVector3 newPoint, Scene scene) 750 private bool CanObjectEntry(UUID objectID, Vector3 newPoint, Scene scene)
751 { 751 {
752 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 752 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
753 if (m_bypassPermissions) return m_bypassPermissionsValue; 753 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -764,7 +764,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
764 return false; 764 return false;
765 } 765 }
766 766
767 if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAllObjectEntry)) != 0) 767 if ((land.landData.Flags & ((int)Parcel.ParcelFlags.AllowAPrimitiveEntry)) != 0)
768 { 768 {
769 return true; 769 return true;
770 } 770 }
@@ -793,7 +793,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
793 return false; 793 return false;
794 } 794 }
795 795
796 private bool CanReturnObject(LLUUID objectID, LLUUID returnerID, Scene scene) 796 private bool CanReturnObject(UUID objectID, UUID returnerID, Scene scene)
797 { 797 {
798 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 798 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
799 if (m_bypassPermissions) return m_bypassPermissionsValue; 799 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -801,7 +801,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
801 return GenericObjectPermission(returnerID, objectID, false); 801 return GenericObjectPermission(returnerID, objectID, false);
802 } 802 }
803 803
804 private bool CanRezObject(int objectCount, LLUUID owner, LLVector3 objectPosition, Scene scene) 804 private bool CanRezObject(int objectCount, UUID owner, Vector3 objectPosition, Scene scene)
805 { 805 {
806 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 806 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
807 if (m_bypassPermissions) return m_bypassPermissionsValue; 807 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -830,7 +830,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
830 return permission; 830 return permission;
831 } 831 }
832 832
833 private bool CanRunConsoleCommand(LLUUID user, Scene requestFromScene) 833 private bool CanRunConsoleCommand(UUID user, Scene requestFromScene)
834 { 834 {
835 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 835 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
836 if (m_bypassPermissions) return m_bypassPermissionsValue; 836 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -839,7 +839,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
839 return IsAdministrator(user); 839 return IsAdministrator(user);
840 } 840 }
841 841
842 private bool CanRunScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) 842 private bool CanRunScript(UUID script, UUID objectID, UUID user, Scene scene)
843 { 843 {
844 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 844 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
845 if (m_bypassPermissions) return m_bypassPermissionsValue; 845 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -847,7 +847,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
847 return true; 847 return true;
848 } 848 }
849 849
850 private bool CanSellParcel(LLUUID user, ILandObject parcel, Scene scene) 850 private bool CanSellParcel(UUID user, ILandObject parcel, Scene scene)
851 { 851 {
852 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 852 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
853 if (m_bypassPermissions) return m_bypassPermissionsValue; 853 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -855,7 +855,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
855 return GenericParcelPermission(user, parcel); 855 return GenericParcelPermission(user, parcel);
856 } 856 }
857 857
858 private bool CanTakeObject(LLUUID objectID, LLUUID stealer, Scene scene) 858 private bool CanTakeObject(UUID objectID, UUID stealer, Scene scene)
859 { 859 {
860 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 860 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
861 if (m_bypassPermissions) return m_bypassPermissionsValue; 861 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -863,7 +863,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
863 return GenericObjectPermission(stealer,objectID, false); 863 return GenericObjectPermission(stealer,objectID, false);
864 } 864 }
865 865
866 private bool CanTakeCopyObject(LLUUID objectID, LLUUID userID, Scene inScene) 866 private bool CanTakeCopyObject(UUID objectID, UUID userID, Scene inScene)
867 { 867 {
868 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 868 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
869 if (m_bypassPermissions) return m_bypassPermissionsValue; 869 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -883,10 +883,10 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
883 } 883 }
884 884
885 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID]; 885 SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
886 // LLUUID taskOwner = null; 886 // UUID taskOwner = null;
887 // Added this because at this point in time it wouldn't be wise for 887 // Added this because at this point in time it wouldn't be wise for
888 // the administrator object permissions to take effect. 888 // the administrator object permissions to take effect.
889 // LLUUID objectOwner = task.OwnerID; 889 // UUID objectOwner = task.OwnerID;
890 890
891 891
892 if ((task.RootPart.EveryoneMask & PERM_COPY) != 0) 892 if ((task.RootPart.EveryoneMask & PERM_COPY) != 0)
@@ -895,7 +895,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
895 return permission; 895 return permission;
896 } 896 }
897 897
898 private bool CanTerraformLand(LLUUID user, LLVector3 position, Scene requestFromScene) 898 private bool CanTerraformLand(UUID user, Vector3 position, Scene requestFromScene)
899 { 899 {
900 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 900 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
901 if (m_bypassPermissions) return m_bypassPermissionsValue; 901 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -927,7 +927,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
927 return permission; 927 return permission;
928 } 928 }
929 929
930 private bool CanViewScript(LLUUID script, LLUUID objectID, LLUUID user, Scene scene) 930 private bool CanViewScript(UUID script, UUID objectID, UUID user, Scene scene)
931 { 931 {
932 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 932 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
933 if (m_bypassPermissions) return m_bypassPermissionsValue; 933 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -935,7 +935,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
935 return false; 935 return false;
936 } 936 }
937 937
938 private bool CanViewNotecard(LLUUID notecard, LLUUID objectID, LLUUID user, Scene scene) 938 private bool CanViewNotecard(UUID notecard, UUID objectID, UUID user, Scene scene)
939 { 939 {
940 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 940 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
941 if (m_bypassPermissions) return m_bypassPermissionsValue; 941 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -945,7 +945,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
945 945
946 #endregion 946 #endregion
947 947
948 public bool CanLinkObject(LLUUID userID, LLUUID objectID) 948 public bool CanLinkObject(UUID userID, UUID objectID)
949 { 949 {
950 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 950 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
951 if (m_bypassPermissions) return m_bypassPermissionsValue; 951 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -953,7 +953,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
953 return true; 953 return true;
954 } 954 }
955 955
956 public bool CanDelinkObject(LLUUID userID, LLUUID objectID) 956 public bool CanDelinkObject(UUID userID, UUID objectID)
957 { 957 {
958 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 958 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
959 if (m_bypassPermissions) return m_bypassPermissionsValue; 959 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -961,7 +961,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
961 return true; 961 return true;
962 } 962 }
963 963
964 public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene) 964 public bool CanBuyLand(UUID userID, ILandObject parcel, Scene scene)
965 { 965 {
966 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 966 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
967 if (m_bypassPermissions) return m_bypassPermissionsValue; 967 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -969,7 +969,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
969 return true; 969 return true;
970 } 970 }
971 971
972 public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 972 public bool CanCopyInventory(UUID itemID, UUID objectID, UUID userID)
973 { 973 {
974 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 974 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
975 if (m_bypassPermissions) return m_bypassPermissionsValue; 975 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -977,7 +977,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
977 return true; 977 return true;
978 } 978 }
979 979
980 public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID) 980 public bool CanDeleteInventory(UUID itemID, UUID objectID, UUID userID)
981 { 981 {
982 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 982 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
983 if (m_bypassPermissions) return m_bypassPermissionsValue; 983 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -985,7 +985,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
985 return true; 985 return true;
986 } 986 }
987 987
988 public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID) 988 public bool CanCreateInventory(uint invType, UUID objectID, UUID userID)
989 { 989 {
990 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 990 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
991 if (m_bypassPermissions) return m_bypassPermissionsValue; 991 if (m_bypassPermissions) return m_bypassPermissionsValue;
@@ -993,7 +993,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
993 return true; 993 return true;
994 } 994 }
995 995
996 public bool CanTeleport(LLUUID userID) 996 public bool CanTeleport(UUID userID)
997 { 997 {
998 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name); 998 DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
999 if (m_bypassPermissions) return m_bypassPermissionsValue; 999 if (m_bypassPermissions) return m_bypassPermissionsValue;
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
index e76d40d..bbc4acf 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/IRegionSerialiser.cs
@@ -25,7 +25,7 @@
25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28using libsecondlife; 28using OpenMetaverse;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using OpenSim.Region.Environment.Scenes; 31using OpenSim.Region.Environment.Scenes;
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
43 /// <param name="fileName"></param> 43 /// <param name="fileName"></param>
44 /// <param name="newIDS"></param> 44 /// <param name="newIDS"></param>
45 /// <param name="loadOffset"></param> 45 /// <param name="loadOffset"></param>
46 void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset); 46 void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset);
47 47
48 /// <summary> 48 /// <summary>
49 /// Save prims in the xml format 49 /// Save prims in the xml format
@@ -76,14 +76,14 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
76 76
77 /// <summary> 77 /// <summary>
78 /// Save prims in the xml2 format, optionally specifying a bounding box for which 78 /// Save prims in the xml2 format, optionally specifying a bounding box for which
79 /// prims should be saved. If both min and max vectors are LLVector3.Zero, then all prims 79 /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
80 /// are exported. 80 /// are exported.
81 /// </summary> 81 /// </summary>
82 /// <param name="scene"></param> 82 /// <param name="scene"></param>
83 /// <param name="stream"></param> 83 /// <param name="stream"></param>
84 /// <param name="min"></param> 84 /// <param name="min"></param>
85 /// <param name="max"></param> 85 /// <param name="max"></param>
86 void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max); 86 void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max);
87 87
88 /// <summary> 88 /// <summary>
89 /// Save a set of prims in the xml2 format 89 /// Save a set of prims in the xml2 format
@@ -94,14 +94,14 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
94 94
95 /// <summary> 95 /// <summary>
96 /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which 96 /// Save a set of prims in the xml2 format, optionally specifying a bounding box for which
97 /// prims should be saved. If both min and max vectors are LLVector3.Zero, then all prims 97 /// prims should be saved. If both min and max vectors are Vector3.Zero, then all prims
98 /// are exported. 98 /// are exported.
99 /// </summary> 99 /// </summary>
100 /// <param name="entityList"></param> 100 /// <param name="entityList"></param>
101 /// <param name="stream"></param> 101 /// <param name="stream"></param>
102 /// <param name="min"></param> 102 /// <param name="min"></param>
103 /// <param name="max"></param> 103 /// <param name="max"></param>
104 void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, LLVector3 min, LLVector3 max); 104 void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max);
105 105
106 /// <summary> 106 /// <summary>
107 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene. 107 /// Deserializes a scene object from its xml2 representation. This does not load the object into the scene.
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
index 22c9b29..d1cc082 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SceneXmlLoader.cs
@@ -30,8 +30,7 @@ using System.Collections.Generic;
30using System.IO; 30using System.IO;
31//using System.Reflection; 31//using System.Reflection;
32using System.Xml; 32using System.Xml;
33using Axiom.Math; 33using OpenMetaverse;
34using libsecondlife;
35//using log4net; 34//using log4net;
36using OpenSim.Framework; 35using OpenSim.Framework;
37using OpenSim.Region.Physics.Manager; 36using OpenSim.Region.Physics.Manager;
@@ -45,7 +44,7 @@ namespace OpenSim.Region.Environment.Scenes
45 { 44 {
46 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 //private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
47 46
48 public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) 47 public static void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset)
49 { 48 {
50 XmlDocument doc = new XmlDocument(); 49 XmlDocument doc = new XmlDocument();
51 XmlNode rootNode; 50 XmlNode rootNode;
@@ -208,7 +207,7 @@ namespace OpenSim.Region.Environment.Scenes
208 SavePrimListToXml2(EntityList, fileName); 207 SavePrimListToXml2(EntityList, fileName);
209 } 208 }
210 209
211 public static void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max) 210 public static void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max)
212 { 211 {
213 List<EntityBase> EntityList = scene.GetEntities(); 212 List<EntityBase> EntityList = scene.GetEntities();
214 213
@@ -223,7 +222,7 @@ namespace OpenSim.Region.Environment.Scenes
223 StreamWriter stream = new StreamWriter(file); 222 StreamWriter stream = new StreamWriter(file);
224 try 223 try
225 { 224 {
226 SavePrimListToXml2(entityList, stream, LLVector3.Zero, LLVector3.Zero); 225 SavePrimListToXml2(entityList, stream, Vector3.Zero, Vector3.Zero);
227 } 226 }
228 finally 227 finally
229 { 228 {
@@ -236,7 +235,7 @@ namespace OpenSim.Region.Environment.Scenes
236 } 235 }
237 } 236 }
238 237
239 public static void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, LLVector3 min, LLVector3 max) 238 public static void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max)
240 { 239 {
241 int primCount = 0; 240 int primCount = 0;
242 stream.WriteLine("<scene>\n"); 241 stream.WriteLine("<scene>\n");
@@ -246,9 +245,9 @@ namespace OpenSim.Region.Environment.Scenes
246 if (ent is SceneObjectGroup) 245 if (ent is SceneObjectGroup)
247 { 246 {
248 SceneObjectGroup g = (SceneObjectGroup)ent; 247 SceneObjectGroup g = (SceneObjectGroup)ent;
249 if (!min.Equals(LLVector3.Zero) || !max.Equals(LLVector3.Zero)) 248 if (!min.Equals(Vector3.Zero) || !max.Equals(Vector3.Zero))
250 { 249 {
251 LLVector3 pos = g.RootPart.GetWorldPosition(); 250 Vector3 pos = g.RootPart.GetWorldPosition();
252 if (min.X > pos.X || min.Y > pos.Y || min.Z > pos.Z) 251 if (min.X > pos.X || min.Y > pos.Y || min.Z > pos.Z)
253 continue; 252 continue;
254 if (max.X < pos.X || max.Y < pos.Y || max.Z < pos.Z) 253 if (max.X < pos.X || max.Y < pos.Y || max.Z < pos.Z)
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
index 0d69553..ffd90bf 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiseObjects.cs
@@ -40,11 +40,11 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
40 40
41 public string WriteToFile(Scene scene, string dir) 41 public string WriteToFile(Scene scene, string dir)
42 { 42 {
43 string targetFileName = dir + "objects.xml"; 43 string targetFileName = dir + "objects.Xml";
44 44
45 SaveSerialisedToFile(targetFileName, scene); 45 SaveSerialisedToFile(targetFileName, scene);
46 46
47 return "objects.xml"; 47 return "objects.Xml";
48 } 48 }
49 49
50 #endregion 50 #endregion
@@ -122,4 +122,4 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
122 #endregion 122 #endregion
123 } 123 }
124 } 124 }
125} \ No newline at end of file 125}
diff --git a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
index d722d68..e3eb377 100644
--- a/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Serialiser/SerialiserModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using libsecondlife; 31using OpenMetaverse;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
34using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander; 34using OpenSim.Region.Environment.Modules.Framework.InterfaceCommander;
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
87 87
88 #region IRegionSerialiser Members 88 #region IRegionSerialiser Members
89 89
90 public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, LLVector3 loadOffset) 90 public void LoadPrimsFromXml(Scene scene, string fileName, bool newIDS, Vector3 loadOffset)
91 { 91 {
92 SceneXmlLoader.LoadPrimsFromXml(scene, fileName, newIDS, loadOffset); 92 SceneXmlLoader.LoadPrimsFromXml(scene, fileName, newIDS, loadOffset);
93 } 93 }
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
112 SceneXmlLoader.SavePrimsToXml2(scene, fileName); 112 SceneXmlLoader.SavePrimsToXml2(scene, fileName);
113 } 113 }
114 114
115 public void SavePrimsToXml2(Scene scene, TextWriter stream, LLVector3 min, LLVector3 max) 115 public void SavePrimsToXml2(Scene scene, TextWriter stream, Vector3 min, Vector3 max)
116 { 116 {
117 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max); 117 SceneXmlLoader.SavePrimsToXml2(scene, stream, min, max);
118 } 118 }
@@ -132,7 +132,7 @@ namespace OpenSim.Region.Environment.Modules.World.Serialiser
132 SceneXmlLoader.SavePrimListToXml2(entityList, fileName); 132 SceneXmlLoader.SavePrimListToXml2(entityList, fileName);
133 } 133 }
134 134
135 public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, LLVector3 min, LLVector3 max) 135 public void SavePrimListToXml2(List<EntityBase> entityList, TextWriter stream, Vector3 min, Vector3 max)
136 { 136 {
137 SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max); 137 SceneXmlLoader.SavePrimListToXml2(entityList, stream, min, max);
138 } 138 }
diff --git a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
index 9690433..826fe93 100644
--- a/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Sun/SunModule.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using libsecondlife; 30using OpenMetaverse;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -91,14 +91,14 @@ namespace OpenSim.Region.Environment.Modules
91 // private double VWTimeRatio; // VW time as a ratio of real time 91 // private double VWTimeRatio; // VW time as a ratio of real time
92 92
93 // Working values 93 // Working values
94 private LLVector3 Position = new LLVector3(0,0,0); 94 private Vector3 Position = Vector3.Zero;
95 private LLVector3 Velocity = new LLVector3(0,0,0); 95 private Vector3 Velocity = Vector3.Zero;
96 private LLQuaternion Tilt = new LLQuaternion(1,0,0,0); 96 private Quaternion Tilt = Quaternion.Identity;
97 97
98 private long LindenHourOffset = 0; 98 private long LindenHourOffset = 0;
99 private bool sunFixed = false; 99 private bool sunFixed = false;
100 100
101 private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); 101 private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
102 102
103 // Current time in elpased seconds since Jan 1st 1970 103 // Current time in elpased seconds since Jan 1st 1970
104 private ulong CurrentTime 104 private ulong CurrentTime
@@ -348,14 +348,14 @@ namespace OpenSim.Region.Environment.Modules
348 // For interest we rotate it slightly about the X access. 348 // For interest we rotate it slightly about the X access.
349 // Celestial tilt is a value that ranges .025 349 // Celestial tilt is a value that ranges .025
350 350
351 Position = LLVector3.Rot(Position,Tilt); 351 Position *= Tilt;
352 352
353 // Finally we shift the axis so that more of the 353 // Finally we shift the axis so that more of the
354 // circle is above the horizon than below. This 354 // circle is above the horizon than below. This
355 // makes the nights shorter than the days. 355 // makes the nights shorter than the days.
356 356
357 Position.Z = Position.Z + (float) HorizonShift; 357 Position.Z = Position.Z + (float) HorizonShift;
358 Position = LLVector3.Norm(Position); 358 Position = Vector3.Normalize(Position);
359 359
360 // m_log.Debug("[SUN] Position("+Position.X+","+Position.Y+","+Position.Z+")"); 360 // m_log.Debug("[SUN] Position("+Position.X+","+Position.Y+","+Position.Z+")");
361 361
@@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules
365 365
366 // Correct angular velocity to reflect the seasonal rotation 366 // Correct angular velocity to reflect the seasonal rotation
367 367
368 Magnitude = LLVector3.Mag(Position); 368 Magnitude = Position.Length();
369 if (sunFixed) 369 if (sunFixed)
370 { 370 {
371 Velocity.X = 0; 371 Velocity.X = 0;
@@ -374,13 +374,12 @@ namespace OpenSim.Region.Environment.Modules
374 return; 374 return;
375 } 375 }
376 376
377 Velocity = LLVector3.Rot(Velocity, Tilt)*((float)(1.0/Magnitude)); 377 Velocity = (Velocity * Tilt) * (1.0f / Magnitude);
378 378
379 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")"); 379 // m_log.Debug("[SUN] Velocity("+Velocity.X+","+Velocity.Y+","+Velocity.Z+")");
380
381 } 380 }
382 381
383 private void ClientLoggedOut(LLUUID AgentId) 382 private void ClientLoggedOut(UUID AgentId)
384 { 383 {
385 lock (m_rootAgents) 384 lock (m_rootAgents)
386 { 385 {
@@ -392,7 +391,7 @@ namespace OpenSim.Region.Environment.Modules
392 } 391 }
393 } 392 }
394 393
395 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 394 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
396 { 395 {
397 lock (m_rootAgents) 396 lock (m_rootAgents)
398 { 397 {
diff --git a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
index 4a62446..ed4075c 100644
--- a/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/Terrain/TerrainModule.cs
@@ -29,7 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using System.Reflection; 31using System.Reflection;
32using libsecondlife; 32using OpenMetaverse;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using OpenSim.Framework; 35using OpenSim.Framework;
@@ -591,7 +591,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
591 float south, float east, IClientAPI remoteClient) 591 float south, float east, IClientAPI remoteClient)
592 { 592 {
593 // Not a good permissions check, if in area mode, need to check the entire area. 593 // Not a good permissions check, if in area mode, need to check the entire area.
594 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(north, west, 0))) 594 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new Vector3(north, west, 0)))
595 { 595 {
596 if (north == south && east == west) 596 if (north == south && east == west)
597 { 597 {
@@ -648,7 +648,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain
648 // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area. 648 // Not a good permissions check (see client_OnModifyTerrain above), need to check the entire area.
649 // for now check a point in the centre of the region 649 // for now check a point in the centre of the region
650 650
651 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new LLVector3(127, 127, 0))) 651 if (m_scene.ExternalChecks.ExternalChecksCanTerraformLand(remoteClient.AgentId, new Vector3(127, 127, 0)))
652 { 652 {
653 InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter 653 InterfaceBakeTerrain(null); //bake terrain does not use the passed in parameter
654 } 654 }
diff --git a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
index 98b3bf8..bbd7b70 100644
--- a/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/TreePopulator/TreePopulatorModule.cs
@@ -29,8 +29,7 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Timers; 31using System.Timers;
32using Axiom.Math; 32using OpenMetaverse;
33using libsecondlife;
34using log4net; 33using log4net;
35using Nini.Config; 34using Nini.Config;
36using OpenSim.Framework; 35using OpenSim.Framework;
@@ -49,7 +48,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
49 48
50 public double m_tree_density = 50.0; // Aim for this many per region 49 public double m_tree_density = 50.0; // Aim for this many per region
51 public double m_tree_updates = 1000.0; // MS between updates 50 public double m_tree_updates = 1000.0; // MS between updates
52 private List<LLUUID> m_trees; 51 private List<UUID> m_trees;
53 52
54 #region IRegionModule Members 53 #region IRegionModule Members
55 54
@@ -63,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
63 { 62 {
64 } 63 }
65 64
66 m_trees = new List<LLUUID>(); 65 m_trees = new List<UUID>();
67 m_scene = scene; 66 m_scene = scene;
68 67
69 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; 68 m_scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
@@ -98,24 +97,24 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
98 { 97 {
99 if (args[0] == "tree") 98 if (args[0] == "tree")
100 { 99 {
101 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; 100 UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
102 if (uuid == LLUUID.Zero) 101 if (uuid == UUID.Zero)
103 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 102 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
104 m_log.Debug("[TREES]: New tree planting"); 103 m_log.Debug("[TREES]: New tree planting");
105 CreateTree(uuid, new LLVector3(128.0f, 128.0f, 0.0f)); 104 CreateTree(uuid, new Vector3(128.0f, 128.0f, 0.0f));
106 } 105 }
107 } 106 }
108 107
109 private void growTrees() 108 private void growTrees()
110 { 109 {
111 foreach (LLUUID tree in m_trees) 110 foreach (UUID tree in m_trees)
112 { 111 {
113 if (m_scene.Entities.ContainsKey(tree)) 112 if (m_scene.Entities.ContainsKey(tree))
114 { 113 {
115 SceneObjectPart s_tree = ((SceneObjectGroup) m_scene.Entities[tree]).RootPart; 114 SceneObjectPart s_tree = ((SceneObjectGroup) m_scene.Entities[tree]).RootPart;
116 115
117 // 100 seconds to grow 1m 116 // 100 seconds to grow 1m
118 s_tree.Scale += new LLVector3(0.1f, 0.1f, 0.1f); 117 s_tree.Scale += new Vector3(0.1f, 0.1f, 0.1f);
119 s_tree.SendFullUpdateToAllClients(); 118 s_tree.SendFullUpdateToAllClients();
120 //s_tree.ScheduleTerseUpdate(); 119 //s_tree.ScheduleTerseUpdate();
121 } 120 }
@@ -128,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
128 127
129 private void seedTrees() 128 private void seedTrees()
130 { 129 {
131 foreach (LLUUID tree in m_trees) 130 foreach (UUID tree in m_trees)
132 { 131 {
133 if (m_scene.Entities.ContainsKey(tree)) 132 if (m_scene.Entities.ContainsKey(tree))
134 { 133 {
@@ -151,7 +150,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
151 150
152 private void killTrees() 151 private void killTrees()
153 { 152 {
154 foreach (LLUUID tree in m_trees) 153 foreach (UUID tree in m_trees)
155 { 154 {
156 double killLikelyhood = 0.0; 155 double killLikelyhood = 0.0;
157 156
@@ -162,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
162 Math.Pow(selectedTree.Scale.Y, 2) + 161 Math.Pow(selectedTree.Scale.Y, 2) +
163 Math.Pow(selectedTree.Scale.Z, 2)); 162 Math.Pow(selectedTree.Scale.Z, 2));
164 163
165 foreach (LLUUID picktree in m_trees) 164 foreach (UUID picktree in m_trees)
166 { 165 {
167 if (picktree != tree) 166 if (picktree != tree)
168 { 167 {
@@ -187,7 +186,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
187 186
188 m_scene.ForEachClient(delegate(IClientAPI controller) 187 m_scene.ForEachClient(delegate(IClientAPI controller)
189 { 188 {
190 controller.SendKillObject(m_scene.RegionInfo.RegionHandle, 189 controller.SendKiPrimitive(m_scene.RegionInfo.RegionHandle,
191 selectedTree.LocalId); 190 selectedTree.LocalId);
192 }); 191 });
193 192
@@ -204,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
204 203
205 private void SpawnChild(SceneObjectPart s_tree) 204 private void SpawnChild(SceneObjectPart s_tree)
206 { 205 {
207 LLVector3 position = new LLVector3(); 206 Vector3 position = new Vector3();
208 207
209 position.X = s_tree.AbsolutePosition.X + (1 * (-1 * Util.RandomClass.Next(1))); 208 position.X = s_tree.AbsolutePosition.X + (1 * (-1 * Util.RandomClass.Next(1)));
210 if (position.X > 255) 209 if (position.X > 255)
@@ -223,20 +222,20 @@ namespace OpenSim.Region.Environment.Modules.World.TreePopulator
223 position.X += (float) randX; 222 position.X += (float) randX;
224 position.Y += (float) randY; 223 position.Y += (float) randY;
225 224
226 LLUUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner; 225 UUID uuid = m_scene.RegionInfo.EstateSettings.EstateOwner;
227 if (uuid == LLUUID.Zero) 226 if (uuid == UUID.Zero)
228 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID; 227 uuid = m_scene.RegionInfo.MasterAvatarAssignedUUID;
229 228
230 CreateTree(uuid, position); 229 CreateTree(uuid, position);
231 } 230 }
232 231
233 private void CreateTree(LLUUID uuid, LLVector3 position) 232 private void CreateTree(UUID uuid, Vector3 position)
234 { 233 {
235 position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y]; 234 position.Z = (float) m_scene.Heightmap[(int) position.X, (int) position.Y];
236 235
237 SceneObjectGroup tree = 236 SceneObjectGroup tree =
238 m_scene.AddTree(uuid, new LLVector3(0.1f, 0.1f, 0.1f), 237 m_scene.AddTree(uuid, new Vector3(0.1f, 0.1f, 0.1f),
239 LLQuaternion.Identity, 238 Quaternion.Identity,
240 position, 239 position,
241 Tree.Cypress1, 240 Tree.Cypress1,
242 false); 241 false);
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
index bfb5016..cfbe5ae 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/MapImageModule.cs
@@ -32,13 +32,12 @@ using System.Drawing;
32using System.Drawing.Drawing2D; 32using System.Drawing.Drawing2D;
33using System.Drawing.Imaging; 33using System.Drawing.Imaging;
34using System.Reflection; 34using System.Reflection;
35using Axiom.Math;
36using Nini.Config; 35using Nini.Config;
36using OpenMetaverse.Imaging;
37using log4net; 37using log4net;
38using OpenJPEGNet;
39using OpenSim.Region.Environment.Interfaces; 38using OpenSim.Region.Environment.Interfaces;
40using OpenSim.Region.Environment.Scenes; 39using OpenSim.Region.Environment.Scenes;
41using libsecondlife; 40using OpenMetaverse;
42 41
43namespace OpenSim.Region.Environment.Modules.World.WorldMap 42namespace OpenSim.Region.Environment.Modules.World.WorldMap
44{ 43{
@@ -252,7 +251,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
252 if (part.Shape.Textures.DefaultTexture == null) 251 if (part.Shape.Textures.DefaultTexture == null)
253 continue; 252 continue;
254 253
255 LLColor texcolor = part.Shape.Textures.DefaultTexture.RGBA; 254 Color4 texcolor = part.Shape.Textures.DefaultTexture.RGBA;
256 255
257 // Not sure why some of these are null, oh well. 256 // Not sure why some of these are null, oh well.
258 257
@@ -265,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
265 //Try to set the map spot color 264 //Try to set the map spot color
266 try 265 try
267 { 266 {
268 // If the color gets goofy somehow, skip it *shakes fist at LLColor 267 // If the color gets goofy somehow, skip it *shakes fist at Color4
269 mapdotspot = Color.FromArgb(colorr, colorg, colorb); 268 mapdotspot = Color.FromArgb(colorr, colorg, colorb);
270 } 269 }
271 catch (ArgumentException) 270 catch (ArgumentException)
@@ -282,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
282 // Mono Array 281 // Mono Array
283 } 282 }
284 283
285 LLVector3 pos = part.GetWorldPosition(); 284 Vector3 pos = part.GetWorldPosition();
286 285
287 // skip prim outside of retion 286 // skip prim outside of retion
288 if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f) 287 if (pos.X < 0f || pos.X > 256f || pos.Y < 0f || pos.Y > 256f)
@@ -312,20 +311,20 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
312 Vector3 tScale = new Vector3(); 311 Vector3 tScale = new Vector3();
313 Vector3 axPos = new Vector3(pos.X,pos.Y,pos.Z); 312 Vector3 axPos = new Vector3(pos.X,pos.Y,pos.Z);
314 313
315 LLQuaternion llrot = part.GetWorldRotation(); 314 Quaternion llrot = part.GetWorldRotation();
316 Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z); 315 Quaternion rot = new Quaternion(llrot.W, llrot.X, llrot.Y, llrot.Z);
317 scale = rot * lscale; 316 scale = lscale * rot;
318 317
319 // negative scales don't work in this situation 318 // negative scales don't work in this situation
320 scale.x = Math.Abs(scale.x); 319 scale.X = Math.Abs(scale.X);
321 scale.y = Math.Abs(scale.y); 320 scale.Y = Math.Abs(scale.Y);
322 scale.z = Math.Abs(scale.z); 321 scale.Z = Math.Abs(scale.Z);
323 322
324 // This scaling isn't very accurate and doesn't take into account the face rotation :P 323 // This scaling isn't very accurate and doesn't take into account the face rotation :P
325 int mapdrawstartX = (int)(pos.X - scale.x); 324 int mapdrawstartX = (int)(pos.X - scale.X);
326 int mapdrawstartY = (int)(pos.Y - scale.y); 325 int mapdrawstartY = (int)(pos.Y - scale.Y);
327 int mapdrawendX = (int)(pos.X + scale.x); 326 int mapdrawendX = (int)(pos.X + scale.X);
328 int mapdrawendY = (int)(pos.Y + scale.y); 327 int mapdrawendY = (int)(pos.Y + scale.Y);
329 328
330 // If object is beyond the edge of the map, don't draw it to avoid errors 329 // If object is beyond the edge of the map, don't draw it to avoid errors
331 if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255 330 if (mapdrawstartX < 0 || mapdrawstartX > 255 || mapdrawendX < 0 || mapdrawendX > 255
@@ -342,9 +341,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
342 Vector3[] FaceC = new Vector3[6]; // vertex C for Facei 341 Vector3[] FaceC = new Vector3[6]; // vertex C for Facei
343 Vector3[] FaceD = new Vector3[6]; // vertex D for Facei 342 Vector3[] FaceD = new Vector3[6]; // vertex D for Facei
344 343
345 tScale = new Vector3(lscale.x, -lscale.y, lscale.z); 344 tScale = new Vector3(lscale.X, -lscale.Y, lscale.Z);
346 scale = ((rot * tScale)); 345 scale = ((tScale * rot));
347 vertexes[0] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 346 vertexes[0] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
348 // vertexes[0].x = pos.X + vertexes[0].x; 347 // vertexes[0].x = pos.X + vertexes[0].x;
349 //vertexes[0].y = pos.Y + vertexes[0].y; 348 //vertexes[0].y = pos.Y + vertexes[0].y;
350 //vertexes[0].z = pos.Z + vertexes[0].z; 349 //vertexes[0].z = pos.Z + vertexes[0].z;
@@ -354,8 +353,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
354 FaceA[4] = vertexes[0]; 353 FaceA[4] = vertexes[0];
355 354
356 tScale = lscale; 355 tScale = lscale;
357 scale = ((rot * tScale)); 356 scale = ((tScale * rot));
358 vertexes[1] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 357 vertexes[1] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
359 358
360 // vertexes[1].x = pos.X + vertexes[1].x; 359 // vertexes[1].x = pos.X + vertexes[1].x;
361 // vertexes[1].y = pos.Y + vertexes[1].y; 360 // vertexes[1].y = pos.Y + vertexes[1].y;
@@ -365,10 +364,10 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
365 FaceA[1] = vertexes[1]; 364 FaceA[1] = vertexes[1];
366 FaceC[4] = vertexes[1]; 365 FaceC[4] = vertexes[1];
367 366
368 tScale = new Vector3(lscale.x, -lscale.y, -lscale.z); 367 tScale = new Vector3(lscale.X, -lscale.Y, -lscale.Z);
369 scale = ((rot * tScale)); 368 scale = ((tScale * rot));
370 369
371 vertexes[2] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 370 vertexes[2] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
372 371
373 //vertexes[2].x = pos.X + vertexes[2].x; 372 //vertexes[2].x = pos.X + vertexes[2].x;
374 //vertexes[2].y = pos.Y + vertexes[2].y; 373 //vertexes[2].y = pos.Y + vertexes[2].y;
@@ -378,9 +377,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
378 FaceD[3] = vertexes[2]; 377 FaceD[3] = vertexes[2];
379 FaceC[5] = vertexes[2]; 378 FaceC[5] = vertexes[2];
380 379
381 tScale = new Vector3(lscale.x, lscale.y, -lscale.z); 380 tScale = new Vector3(lscale.X, lscale.Y, -lscale.Z);
382 scale = ((rot * tScale)); 381 scale = ((tScale * rot));
383 vertexes[3] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 382 vertexes[3] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
384 383
385 //vertexes[3].x = pos.X + vertexes[3].x; 384 //vertexes[3].x = pos.X + vertexes[3].x;
386 // vertexes[3].y = pos.Y + vertexes[3].y; 385 // vertexes[3].y = pos.Y + vertexes[3].y;
@@ -390,9 +389,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
390 FaceC[1] = vertexes[3]; 389 FaceC[1] = vertexes[3];
391 FaceA[5] = vertexes[3]; 390 FaceA[5] = vertexes[3];
392 391
393 tScale = new Vector3(-lscale.x, lscale.y, lscale.z); 392 tScale = new Vector3(-lscale.X, lscale.Y, lscale.Z);
394 scale = ((rot * tScale)); 393 scale = ((tScale * rot));
395 vertexes[4] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 394 vertexes[4] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
396 395
397 // vertexes[4].x = pos.X + vertexes[4].x; 396 // vertexes[4].x = pos.X + vertexes[4].x;
398 // vertexes[4].y = pos.Y + vertexes[4].y; 397 // vertexes[4].y = pos.Y + vertexes[4].y;
@@ -402,9 +401,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
402 FaceA[2] = vertexes[4]; 401 FaceA[2] = vertexes[4];
403 FaceD[4] = vertexes[4]; 402 FaceD[4] = vertexes[4];
404 403
405 tScale = new Vector3(-lscale.x, lscale.y, -lscale.z); 404 tScale = new Vector3(-lscale.X, lscale.Y, -lscale.Z);
406 scale = ((rot * tScale)); 405 scale = ((tScale * rot));
407 vertexes[5] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 406 vertexes[5] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
408 407
409 // vertexes[5].x = pos.X + vertexes[5].x; 408 // vertexes[5].x = pos.X + vertexes[5].x;
410 // vertexes[5].y = pos.Y + vertexes[5].y; 409 // vertexes[5].y = pos.Y + vertexes[5].y;
@@ -414,9 +413,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
414 FaceC[2] = vertexes[5]; 413 FaceC[2] = vertexes[5];
415 FaceB[5] = vertexes[5]; 414 FaceB[5] = vertexes[5];
416 415
417 tScale = new Vector3(-lscale.x, -lscale.y, lscale.z); 416 tScale = new Vector3(-lscale.X, -lscale.Y, lscale.Z);
418 scale = ((rot * tScale)); 417 scale = ((tScale * rot));
419 vertexes[6] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 418 vertexes[6] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
420 419
421 // vertexes[6].x = pos.X + vertexes[6].x; 420 // vertexes[6].x = pos.X + vertexes[6].x;
422 // vertexes[6].y = pos.Y + vertexes[6].y; 421 // vertexes[6].y = pos.Y + vertexes[6].y;
@@ -426,9 +425,9 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
426 FaceA[3] = vertexes[6]; 425 FaceA[3] = vertexes[6];
427 FaceB[4] = vertexes[6]; 426 FaceB[4] = vertexes[6];
428 427
429 tScale = new Vector3(-lscale.x, -lscale.y, -lscale.z); 428 tScale = new Vector3(-lscale.X, -lscale.Y, -lscale.Z);
430 scale = ((rot * tScale)); 429 scale = ((tScale * rot));
431 vertexes[7] = (new Vector3((pos.X + scale.x), (pos.Y + scale.y), (pos.Z + scale.z))); 430 vertexes[7] = (new Vector3((pos.X + scale.X), (pos.Y + scale.Y), (pos.Z + scale.Z)));
432 431
433 // vertexes[7].x = pos.X + vertexes[7].x; 432 // vertexes[7].x = pos.X + vertexes[7].x;
434 // vertexes[7].y = pos.Y + vertexes[7].y; 433 // vertexes[7].y = pos.Y + vertexes[7].y;
@@ -533,8 +532,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
533 //Vector3 topos = new Vector3(0, 0, 0); 532 //Vector3 topos = new Vector3(0, 0, 0);
534 // float z = -point3d.z - topos.z; 533 // float z = -point3d.z - topos.z;
535 534
536 returnpt.X = (int)point3d.x;//(int)((topos.x - point3d.x) / z * d); 535 returnpt.X = (int)point3d.X;//(int)((topos.x - point3d.x) / z * d);
537 returnpt.Y = (int)(255 - point3d.y);//(int)(255 - (((topos.y - point3d.y) / z * d))); 536 returnpt.Y = (int)(255 - point3d.Y);//(int)(255 - (((topos.y - point3d.y) / z * d)));
538 537
539 return returnpt; 538 return returnpt;
540 } 539 }
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
index 1ee86ba..dffa72a 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/ShadedMapTileRenderer.cs
@@ -32,13 +32,12 @@ using System.Drawing;
32using System.Drawing.Drawing2D; 32using System.Drawing.Drawing2D;
33using System.Drawing.Imaging; 33using System.Drawing.Imaging;
34using System.Reflection; 34using System.Reflection;
35using Axiom.Math; 35using OpenMetaverse;
36using OpenMetaverse.Imaging;
36using Nini.Config; 37using Nini.Config;
37using log4net; 38using log4net;
38using OpenJPEGNet;
39using OpenSim.Region.Environment.Interfaces; 39using OpenSim.Region.Environment.Interfaces;
40using OpenSim.Region.Environment.Scenes; 40using OpenSim.Region.Environment.Scenes;
41using libsecondlife;
42 41
43namespace OpenSim.Region.Environment.Modules.World.WorldMap 42namespace OpenSim.Region.Environment.Modules.World.WorldMap
44{ 43{
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
index 615befc..ff8d0b9 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/TexturedMapTileRenderer.cs
@@ -32,15 +32,14 @@ using System.Drawing;
32using System.Drawing.Drawing2D; 32using System.Drawing.Drawing2D;
33using System.Drawing.Imaging; 33using System.Drawing.Imaging;
34using System.Reflection; 34using System.Reflection;
35using Axiom.Math; 35using OpenMetaverse;
36using Nini.Config; 36using Nini.Config;
37using log4net; 37using log4net;
38using OpenJPEGNet; 38using OpenMetaverse.Imaging;
39using OpenSim.Framework; 39using OpenSim.Framework;
40using OpenSim.Region.Environment.Interfaces; 40using OpenSim.Region.Environment.Interfaces;
41using OpenSim.Region.Environment.Scenes; 41using OpenSim.Region.Environment.Scenes;
42using OpenSim.Region.Environment.Modules.World.Terrain; 42using OpenSim.Region.Environment.Modules.World.Terrain;
43using libsecondlife;
44 43
45namespace OpenSim.Region.Environment.Modules.World.WorldMap 44namespace OpenSim.Region.Environment.Modules.World.WorldMap
46{ 45{
@@ -122,15 +121,15 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
122 121
123 // some hardcoded terrain UUIDs that work with SL 1.20 (the four default textures and "Blank"). 122 // some hardcoded terrain UUIDs that work with SL 1.20 (the four default textures and "Blank").
124 // The color-values were choosen because they "look right" (at least to me) ;-) 123 // The color-values were choosen because they "look right" (at least to me) ;-)
125 private static readonly LLUUID defaultTerrainTexture1 = new LLUUID("0bc58228-74a0-7e83-89bc-5c23464bcec5"); 124 private static readonly UUID defaultTerrainTexture1 = new UUID("0bc58228-74a0-7e83-89bc-5c23464bcec5");
126 private static readonly Color defaultColor1 = Color.FromArgb(165, 137, 118); 125 private static readonly Color defaultColor1 = Color.FromArgb(165, 137, 118);
127 private static readonly LLUUID defaultTerrainTexture2 = new LLUUID("63338ede-0037-c4fd-855b-015d77112fc8"); 126 private static readonly UUID defaultTerrainTexture2 = new UUID("63338ede-0037-c4fd-855b-015d77112fc8");
128 private static readonly Color defaultColor2 = Color.FromArgb(69, 89, 49); 127 private static readonly Color defaultColor2 = Color.FromArgb(69, 89, 49);
129 private static readonly LLUUID defaultTerrainTexture3 = new LLUUID("303cd381-8560-7579-23f1-f0a880799740"); 128 private static readonly UUID defaultTerrainTexture3 = new UUID("303cd381-8560-7579-23f1-f0a880799740");
130 private static readonly Color defaultColor3 = Color.FromArgb(162, 154, 141); 129 private static readonly Color defaultColor3 = Color.FromArgb(162, 154, 141);
131 private static readonly LLUUID defaultTerrainTexture4 = new LLUUID("53a2f406-4895-1d13-d541-d2e3b86bc19c"); 130 private static readonly UUID defaultTerrainTexture4 = new UUID("53a2f406-4895-1d13-d541-d2e3b86bc19c");
132 private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200); 131 private static readonly Color defaultColor4 = Color.FromArgb(200, 200, 200);
133 private static readonly LLUUID blankTerrainTexture = new LLUUID("5748decc-f629-461c-9a36-a35a221fe21f"); 132 private static readonly UUID blankTerrainTexture = new UUID("5748decc-f629-461c-9a36-a35a221fe21f");
134 133
135 #endregion 134 #endregion
136 135
@@ -142,14 +141,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
142 // added when the terrain textures are changed in the estate dialog and a new map is generated (and will stay in 141 // added when the terrain textures are changed in the estate dialog and a new map is generated (and will stay in
143 // that map until the region-server restarts. This could be considered a memory-leak, but it's a *very* small one. 142 // that map until the region-server restarts. This could be considered a memory-leak, but it's a *very* small one.
144 // TODO does it make sense to use a "real" cache and regenerate missing entries on fetch? 143 // TODO does it make sense to use a "real" cache and regenerate missing entries on fetch?
145 private Dictionary<LLUUID, Color> m_mapping; 144 private Dictionary<UUID, Color> m_mapping;
146 145
147 146
148 public void Initialise(Scene scene, IConfigSource source) 147 public void Initialise(Scene scene, IConfigSource source)
149 { 148 {
150 m_scene = scene; 149 m_scene = scene;
151 // m_config = source; // not used currently 150 // m_config = source; // not used currently
152 m_mapping = new Dictionary<LLUUID,Color>(); 151 m_mapping = new Dictionary<UUID,Color>();
153 m_mapping.Add(defaultTerrainTexture1, defaultColor1); 152 m_mapping.Add(defaultTerrainTexture1, defaultColor1);
154 m_mapping.Add(defaultTerrainTexture2, defaultColor2); 153 m_mapping.Add(defaultTerrainTexture2, defaultColor2);
155 m_mapping.Add(defaultTerrainTexture3, defaultColor3); 154 m_mapping.Add(defaultTerrainTexture3, defaultColor3);
@@ -164,12 +163,18 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
164 // TODO (- on "map" command: We are in the command-line thread, we will wait for completion anyway) 163 // TODO (- on "map" command: We are in the command-line thread, we will wait for completion anyway)
165 // TODO (- on "automatic" update after some change: We are called from the mapUpdateTimer here and 164 // TODO (- on "automatic" update after some change: We are called from the mapUpdateTimer here and
166 // will wait anyway) 165 // will wait anyway)
167 private Bitmap fetchTexture(LLUUID id) 166 private Bitmap fetchTexture(UUID id)
168 { 167 {
169 AssetBase asset = m_scene.AssetCache.GetAsset(id, true); 168 AssetBase asset = m_scene.AssetCache.GetAsset(id, true);
170 m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null); 169 m_log.DebugFormat("Fetched texture {0}, found: {1}", id, asset != null);
171 if (asset == null) return null; 170 if (asset == null) return null;
172 return new Bitmap(OpenJPEG.DecodeToImage(asset.Data)); 171
172 ManagedImage managedImage;
173 Image image;
174 if (OpenJPEG.DecodeToImage(asset.Data, out managedImage, out image))
175 return new Bitmap(image);
176 else
177 return null;
173 } 178 }
174 179
175 // Compute the average color of a texture. 180 // Compute the average color of a texture.
@@ -196,8 +201,8 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
196 201
197 // return either the average color of the texture, or the defaultColor if the texturID is invalid 202 // return either the average color of the texture, or the defaultColor if the texturID is invalid
198 // or the texture couldn't be found 203 // or the texture couldn't be found
199 private Color computeAverageColor(LLUUID textureID, Color defaultColor) { 204 private Color computeAverageColor(UUID textureID, Color defaultColor) {
200 if (textureID == LLUUID.Zero) return defaultColor; // not set 205 if (textureID == UUID.Zero) return defaultColor; // not set
201 if (m_mapping.ContainsKey(textureID)) return m_mapping[textureID]; // one of the predefined textures 206 if (m_mapping.ContainsKey(textureID)) return m_mapping[textureID]; // one of the predefined textures
202 207
203 Bitmap bmp = fetchTexture(textureID); 208 Bitmap bmp = fetchTexture(textureID);
diff --git a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
index 2430822..ec9b79c 100644
--- a/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/Environment/Modules/World/WorldMap/WorldMapModule.cs
@@ -32,8 +32,8 @@ using System.Drawing;
32using System.Drawing.Imaging; 32using System.Drawing.Imaging;
33using System.IO; 33using System.IO;
34using System.Reflection; 34using System.Reflection;
35using libsecondlife; 35using OpenMetaverse;
36using OpenJPEGNet; 36using OpenMetaverse.Imaging;
37using log4net; 37using log4net;
38using Nini.Config; 38using Nini.Config;
39using OpenSim.Framework; 39using OpenSim.Framework;
@@ -103,7 +103,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
103 103
104 #endregion 104 #endregion
105 105
106 public void OnRegisterCaps(LLUUID agentID, Caps caps) 106 public void OnRegisterCaps(UUID agentID, Caps caps)
107 { 107 {
108 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); 108 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
109 string capsBase = "/CAPS/" + caps.CapsObjectPath; 109 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
127 /// <param name="caps"></param> 127 /// <param name="caps"></param>
128 /// <returns></returns> 128 /// <returns></returns>
129 public string MapLayerRequest(string request, string path, string param, 129 public string MapLayerRequest(string request, string path, string param,
130 LLUUID agentID, Caps caps) 130 UUID agentID, Caps caps)
131 { 131 {
132 //try 132 //try
133 //{ 133 //{
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
197 LLSDMapLayer mapLayer = new LLSDMapLayer(); 197 LLSDMapLayer mapLayer = new LLSDMapLayer();
198 mapLayer.Right = 5000; 198 mapLayer.Right = 5000;
199 mapLayer.Top = 5000; 199 mapLayer.Top = 5000;
200 mapLayer.ImageID = new LLUUID("00000000-0000-1111-9999-000000000006"); 200 mapLayer.ImageID = new UUID("00000000-0000-1111-9999-000000000006");
201 201
202 return mapLayer; 202 return mapLayer;
203 } 203 }
@@ -223,7 +223,7 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
223 //doFriendListUpdateOnline(client.AgentId); 223 //doFriendListUpdateOnline(client.AgentId);
224 client.OnRequestMapBlocks += RequestMapBlocks; 224 client.OnRequestMapBlocks += RequestMapBlocks;
225 } 225 }
226 private void ClientLoggedOut(LLUUID AgentId) 226 private void ClientLoggedOut(UUID AgentId)
227 { 227 {
228 228
229 } 229 }
@@ -248,15 +248,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
248 m_log.Info("[WEBMAP]: Sending map image jpeg"); 248 m_log.Info("[WEBMAP]: Sending map image jpeg");
249 Hashtable reply = new Hashtable(); 249 Hashtable reply = new Hashtable();
250 int statuscode = 200; 250 int statuscode = 200;
251 251 byte[] jpeg = new byte[0];
252 byte[] jpeg;
253
254 252
255 if (myMapImageJPEG.Length == 0) 253 if (myMapImageJPEG.Length == 0)
256 { 254 {
257 MemoryStream imgstream = new MemoryStream(); 255 MemoryStream imgstream = new MemoryStream();
258 Bitmap mapTexture = new Bitmap(1,1); 256 Bitmap mapTexture = new Bitmap(1,1);
259 System.Drawing.Image image = (System.Drawing.Image)mapTexture; 257 ManagedImage managedImage;
258 Image image = (Image)mapTexture;
260 259
261 try 260 try
262 { 261 {
@@ -268,21 +267,24 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
268 AssetBase mapasset = m_scene.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true); 267 AssetBase mapasset = m_scene.AssetCache.GetAsset(m_scene.RegionInfo.lastMapUUID, true);
269 268
270 // Decode image to System.Drawing.Image 269 // Decode image to System.Drawing.Image
271 image = OpenJPEG.DecodeToImage(mapasset.Data); 270 if (OpenJPEG.DecodeToImage(mapasset.Data, out managedImage, out image))
271 {
272 // Save to bitmap
273 mapTexture = new Bitmap(image);
272 274
273 // Save to bitmap 275 ImageCodecInfo myImageCodecInfo;
274 mapTexture = new Bitmap(image);
275 276
276 ImageCodecInfo myImageCodecInfo; 277 Encoder myEncoder;
277 278
278 Encoder myEncoder; 279 EncoderParameter myEncoderParameter;
280 EncoderParameters myEncoderParameters = new EncoderParameters();
279 281
280 EncoderParameter myEncoderParameter; 282 myImageCodecInfo = GetEncoderInfo("image/jpeg");
281 EncoderParameters myEncoderParameters = new EncoderParameters();
282 283
283 myImageCodecInfo = GetEncoderInfo("image/jpeg"); 284 myEncoder = Encoder.Quality;
284 285
285 myEncoder = Encoder.Quality; 286 myEncoderParameter = new EncoderParameter(myEncoder, 95L);
287 myEncoderParameters.Param[0] = myEncoderParameter;
286 288
287 myEncoderParameter = new EncoderParameter(myEncoder, 95L); 289 myEncoderParameter = new EncoderParameter(myEncoder, 95L);
288 myEncoderParameters.Param[0] = myEncoderParameter; 290 myEncoderParameters.Param[0] = myEncoderParameter;
@@ -290,14 +292,14 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
290 // Save bitmap to stream 292 // Save bitmap to stream
291 mapTexture.Save(imgstream, myImageCodecInfo, myEncoderParameters); 293 mapTexture.Save(imgstream, myImageCodecInfo, myEncoderParameters);
292 294
293 // Write the stream to a byte array for output 295 // Write the stream to a byte array for output
294 jpeg = imgstream.ToArray(); 296 jpeg = imgstream.ToArray();
295 myMapImageJPEG = jpeg; 297 myMapImageJPEG = jpeg;
298 }
296 } 299 }
297 catch (Exception) 300 catch (Exception)
298 { 301 {
299 // Dummy! 302 // Dummy!
300 jpeg = new byte[0];
301 m_log.Warn("[WEBMAP]: Unable to generate Map image"); 303 m_log.Warn("[WEBMAP]: Unable to generate Map image");
302 } 304 }
303 finally 305 finally
@@ -314,7 +316,6 @@ namespace OpenSim.Region.Environment.Modules.World.WorldMap
314 // Use cached version so we don't have to loose our mind 316 // Use cached version so we don't have to loose our mind
315 jpeg = myMapImageJPEG; 317 jpeg = myMapImageJPEG;
316 } 318 }
317 //jpeg = new byte[0];
318 319
319 reply["str_response_string"] = Convert.ToBase64String(jpeg); 320 reply["str_response_string"] = Convert.ToBase64String(jpeg);
320 reply["int_response_code"] = statuscode; 321 reply["int_response_code"] = statuscode;