aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs34
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs4
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs138
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs106
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs104
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs10
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs26
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs6
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs30
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs38
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs23
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs22
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs36
-rw-r--r--OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs28
-rw-r--r--OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs86
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs68
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs14
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs24
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs16
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs13
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs68
-rw-r--r--OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs100
-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
67 files changed, 1115 insertions, 1146 deletions
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
index d3cf41e..3b521c3 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetDownload/AssetDownloadModule.cs
@@ -26,8 +26,8 @@
26 */ 26 */
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using libsecondlife; 29using OpenMetaverse;
30using libsecondlife.Packets; 30using OpenMetaverse.Packets;
31using Nini.Config; 31using Nini.Config;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -43,16 +43,16 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
43 private List<AssetRequest> AssetRequests; 43 private List<AssetRequest> AssetRequests;
44 44
45 private Scene m_scene; 45 private Scene m_scene;
46 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 46 private Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
47 47
48 /// 48 ///
49 /// Assets requests (for each user) which are waiting for asset server data. This includes texture requests 49 /// Assets requests (for each user) which are waiting for asset server data. This includes texture requests
50 /// </summary> 50 /// </summary>
51 private Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>> RequestedAssets; 51 private Dictionary<UUID, Dictionary<UUID, AssetRequest>> RequestedAssets;
52 52
53 public AssetDownloadModule() 53 public AssetDownloadModule()
54 { 54 {
55 RequestedAssets = new Dictionary<LLUUID, Dictionary<LLUUID, AssetRequest>>(); 55 RequestedAssets = new Dictionary<UUID, Dictionary<UUID, AssetRequest>>();
56 AssetRequests = new List<AssetRequest>(); 56 AssetRequests = new List<AssetRequest>();
57 } 57 }
58 58
@@ -109,24 +109,24 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
109 /// <param name="transferRequest"></param> 109 /// <param name="transferRequest"></param>
110 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest) 110 public void AddAssetRequest(IClientAPI userInfo, TransferRequestPacket transferRequest)
111 { 111 {
112 LLUUID requestID = null; 112 UUID requestID = null;
113 byte source = 2; 113 byte source = 2;
114 if (transferRequest.TransferInfo.SourceType == 2) 114 if (transferRequest.TransferInfo.SourceType == 2)
115 { 115 {
116 //direct asset request 116 //direct asset request
117 requestID = new LLUUID(transferRequest.TransferInfo.Params, 0); 117 requestID = new UUID(transferRequest.TransferInfo.Params, 0);
118 } 118 }
119 else if (transferRequest.TransferInfo.SourceType == 3) 119 else if (transferRequest.TransferInfo.SourceType == 3)
120 { 120 {
121 //inventory asset request 121 //inventory asset request
122 requestID = new LLUUID(transferRequest.TransferInfo.Params, 80); 122 requestID = new UUID(transferRequest.TransferInfo.Params, 80);
123 source = 3; 123 source = 3;
124 //Console.WriteLine("asset request " + requestID); 124 //Console.WriteLine("asset request " + requestID);
125 } 125 }
126 126
127 //not found asset 127 //not found asset
128 // so request from asset server 128 // so request from asset server
129 Dictionary<LLUUID, AssetRequest> userRequests = null; 129 Dictionary<UUID, AssetRequest> userRequests = null;
130 if (RequestedAssets.TryGetValue(userInfo.AgentId, out userRequests)) 130 if (RequestedAssets.TryGetValue(userInfo.AgentId, out userRequests))
131 { 131 {
132 if (!userRequests.ContainsKey(requestID)) 132 if (!userRequests.ContainsKey(requestID))
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
143 } 143 }
144 else 144 else
145 { 145 {
146 userRequests = new Dictionary<LLUUID, AssetRequest>(); 146 userRequests = new Dictionary<UUID, AssetRequest>();
147 AssetRequest request = new AssetRequest(); 147 AssetRequest request = new AssetRequest();
148 request.RequestUser = userInfo; 148 request.RequestUser = userInfo;
149 request.RequestAssetID = requestID; 149 request.RequestAssetID = requestID;
@@ -156,11 +156,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
156 } 156 }
157 } 157 }
158 158
159 public void AssetCallback(LLUUID assetID, AssetBase asset) 159 public void AssetCallback(UUID assetID, AssetBase asset)
160 { 160 {
161 if (asset != null) 161 if (asset != null)
162 { 162 {
163 foreach (Dictionary<LLUUID, AssetRequest> userRequests in RequestedAssets.Values) 163 foreach (Dictionary<UUID, AssetRequest> userRequests in RequestedAssets.Values)
164 { 164 {
165 if (userRequests.ContainsKey(assetID)) 165 if (userRequests.ContainsKey(assetID))
166 { 166 {
@@ -212,9 +212,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
212 public int NumPackets = 0; 212 public int NumPackets = 0;
213 public int PacketCounter = 0; 213 public int PacketCounter = 0;
214 public byte[] Params = null; 214 public byte[] Params = null;
215 public LLUUID RequestAssetID; 215 public UUID RequestAssetID;
216 public IClientAPI RequestUser; 216 public IClientAPI RequestUser;
217 public LLUUID TransferRequestID; 217 public UUID TransferRequestID;
218 //public bool AssetInCache; 218 //public bool AssetInCache;
219 //public int TimeRequested; 219 //public int TimeRequested;
220 220
@@ -225,4 +225,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
225 225
226 #endregion 226 #endregion
227 } 227 }
228} \ No newline at end of file 228}
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
index bc1d710..c46c4a4 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AgentAssetsTransactions.cs
@@ -28,8 +28,8 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.IO; 30using System.IO;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Communications.Cache; 34using OpenSim.Framework.Communications.Cache;
35 35
@@ -46,18 +46,18 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
46 // Fields 46 // Fields
47 private bool m_dumpAssetsToFile; 47 private bool m_dumpAssetsToFile;
48 public AgentAssetTransactionsManager Manager; 48 public AgentAssetTransactionsManager Manager;
49 public LLUUID UserID; 49 public UUID UserID;
50 public Dictionary<LLUUID, AssetXferUploader> XferUploaders = new Dictionary<LLUUID, AssetXferUploader>(); 50 public Dictionary<UUID, AssetXferUploader> XferUploaders = new Dictionary<UUID, AssetXferUploader>();
51 51
52 // Methods 52 // Methods
53 public AgentAssetTransactions(LLUUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile) 53 public AgentAssetTransactions(UUID agentID, AgentAssetTransactionsManager manager, bool dumpAssetsToFile)
54 { 54 {
55 UserID = agentID; 55 UserID = agentID;
56 Manager = manager; 56 Manager = manager;
57 m_dumpAssetsToFile = dumpAssetsToFile; 57 m_dumpAssetsToFile = dumpAssetsToFile;
58 } 58 }
59 59
60 public AssetXferUploader RequestXferUploader(LLUUID transactionID) 60 public AssetXferUploader RequestXferUploader(UUID transactionID)
61 { 61 {
62 if (!XferUploaders.ContainsKey(transactionID)) 62 if (!XferUploaders.ContainsKey(transactionID))
63 { 63 {
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
90 } 90 }
91 } 91 }
92 92
93 public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 93 public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
94 uint callbackID, string description, string name, sbyte invType, 94 uint callbackID, string description, string name, sbyte invType,
95 sbyte type, byte wearableType, uint nextOwnerMask) 95 sbyte type, byte wearableType, uint nextOwnerMask)
96 { 96 {
@@ -102,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
102 } 102 }
103 } 103 }
104 104
105 public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, 105 public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID,
106 InventoryItemBase item) 106 InventoryItemBase item)
107 { 107 {
108 if (XferUploaders.ContainsKey(transactionID)) 108 if (XferUploaders.ContainsKey(transactionID))
@@ -116,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
116 /// </summary> 116 /// </summary>
117 /// <param name="transactionID"></param> 117 /// <param name="transactionID"></param>
118 /// <returns>The asset if the upload has completed, null if it has not.</returns> 118 /// <returns>The asset if the upload has completed, null if it has not.</returns>
119 public AssetBase GetTransactionAsset(LLUUID transactionID) 119 public AssetBase GetTransactionAsset(UUID transactionID)
120 { 120 {
121 if (XferUploaders.ContainsKey(transactionID)) 121 if (XferUploaders.ContainsKey(transactionID))
122 { 122 {
@@ -143,7 +143,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
143 // Fields 143 // Fields
144 public bool AddToInventory; 144 public bool AddToInventory;
145 public AssetBase Asset; 145 public AssetBase Asset;
146 public LLUUID InventFolder = LLUUID.Zero; 146 public UUID InventFolder = UUID.Zero;
147 private sbyte invType = 0; 147 private sbyte invType = 0;
148 private bool m_createItem = false; 148 private bool m_createItem = false;
149 private string m_description = String.Empty; 149 private string m_description = String.Empty;
@@ -154,7 +154,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
154 private AgentAssetTransactions m_userTransactions; 154 private AgentAssetTransactions m_userTransactions;
155 private uint nextPerm = 0; 155 private uint nextPerm = 0;
156 private IClientAPI ourClient; 156 private IClientAPI ourClient;
157 public LLUUID TransactionID = LLUUID.Zero; 157 public UUID TransactionID = UUID.Zero;
158 private sbyte type = 0; 158 private sbyte type = 0;
159 public bool UploadComplete; 159 public bool UploadComplete;
160 private byte wearableType = 0; 160 private byte wearableType = 0;
@@ -210,7 +210,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
210 /// <param name="packetID"></param> 210 /// <param name="packetID"></param>
211 /// <param name="data"></param> 211 /// <param name="data"></param>
212 /// <returns>True if the transfer is complete, false otherwise</returns> 212 /// <returns>True if the transfer is complete, false otherwise</returns>
213 public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data, 213 public bool Initialise(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type, byte[] data,
214 bool storeLocal, bool tempFile) 214 bool storeLocal, bool tempFile)
215 { 215 {
216 ourClient = remoteClient; 216 ourClient = remoteClient;
@@ -297,7 +297,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
297 fs.Close(); 297 fs.Close();
298 } 298 }
299 299
300 public void RequestCreateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 300 public void RequestCreateInventoryItem(IClientAPI remoteClient, UUID transactionID, UUID folderID,
301 uint callbackID, string description, string name, sbyte invType, 301 uint callbackID, string description, string name, sbyte invType,
302 sbyte type, byte wearableType, uint nextOwnerMask) 302 sbyte type, byte wearableType, uint nextOwnerMask)
303 { 303 {
@@ -321,7 +321,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
321 } 321 }
322 } 322 }
323 323
324 public void RequestUpdateInventoryItem(IClientAPI remoteClient, LLUUID transactionID, 324 public void RequestUpdateInventoryItem(IClientAPI remoteClient, UUID transactionID,
325 InventoryItemBase item) 325 InventoryItemBase item)
326 { 326 {
327 if (TransactionID == transactionID) 327 if (TransactionID == transactionID)
@@ -332,7 +332,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
332 332
333 if (userInfo != null) 333 if (userInfo != null)
334 { 334 {
335 LLUUID assetID = LLUUID.Combine(transactionID, remoteClient.SecureSessionId); 335 UUID assetID = UUID.Combine(transactionID, remoteClient.SecureSessionId);
336 336
337 AssetBase asset 337 AssetBase asset
338 = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset( 338 = m_userTransactions.Manager.MyScene.CommsManager.AssetCache.GetAsset(
@@ -346,7 +346,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
346 if (asset != null && asset.FullID == assetID) 346 if (asset != null && asset.FullID == assetID)
347 { 347 {
348 // Assets never get updated, new ones get created 348 // Assets never get updated, new ones get created
349 asset.FullID = LLUUID.Random(); 349 asset.FullID = UUID.Random();
350 asset.Name = item.Name; 350 asset.Name = item.Name;
351 asset.Description = item.Description; 351 asset.Description = item.Description;
352 asset.Type = (sbyte) item.AssetType; 352 asset.Type = (sbyte) item.AssetType;
@@ -371,7 +371,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
371 InventoryItemBase item = new InventoryItemBase(); 371 InventoryItemBase item = new InventoryItemBase();
372 item.Owner = ourClient.AgentId; 372 item.Owner = ourClient.AgentId;
373 item.Creator = ourClient.AgentId; 373 item.Creator = ourClient.AgentId;
374 item.ID = LLUUID.Random(); 374 item.ID = UUID.Random();
375 item.AssetID = Asset.FullID; 375 item.AssetID = Asset.FullID;
376 item.Description = m_description; 376 item.Description = m_description;
377 item.Name = m_name; 377 item.Name = m_name;
diff --git a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
index b1cbdcc..e6e27be 100644
--- a/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/AssetTransaction/AssetTransactionModule.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 Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
40{ 40{
41 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions 41 public class AssetTransactionModule : IRegionModule, IAgentAssetTransactions
42 { 42 {
43 private readonly Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 43 private readonly Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
44 private bool m_dumpAssetsToFile = false; 44 private bool m_dumpAssetsToFile = false;
45 private Scene m_scene = null; 45 private Scene m_scene = null;
46 46
@@ -53,7 +53,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
53 53
54 #region IAgentAssetTransactions Members 54 #region IAgentAssetTransactions Members
55 55
56 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 56 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
57 uint callbackID, string description, string name, sbyte invType, 57 uint callbackID, string description, string name, sbyte invType,
58 sbyte type, byte wearableType, uint nextOwnerMask) 58 sbyte type, byte wearableType, uint nextOwnerMask)
59 { 59 {
@@ -61,13 +61,13 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
61 wearableType, nextOwnerMask); 61 wearableType, nextOwnerMask);
62 } 62 }
63 63
64 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID, 64 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
65 InventoryItemBase item) 65 InventoryItemBase item)
66 { 66 {
67 m_transactionManager.HandleItemUpdateFromTransaction(remoteClient, transactionID, item); 67 m_transactionManager.HandleItemUpdateFromTransaction(remoteClient, transactionID, item);
68 } 68 }
69 69
70 public void RemoveAgentAssetTransactions(LLUUID userID) 70 public void RemoveAgentAssetTransactions(UUID userID)
71 { 71 {
72 m_transactionManager.RemoveAgentAssetTransactions(userID); 72 m_transactionManager.RemoveAgentAssetTransactions(userID);
73 } 73 }
@@ -146,8 +146,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
146 /// <summary> 146 /// <summary>
147 /// Each agent has its own singleton collection of transactions 147 /// Each agent has its own singleton collection of transactions
148 /// </summary> 148 /// </summary>
149 private Dictionary<LLUUID, AgentAssetTransactions> AgentTransactions = 149 private Dictionary<UUID, AgentAssetTransactions> AgentTransactions =
150 new Dictionary<LLUUID, AgentAssetTransactions>(); 150 new Dictionary<UUID, AgentAssetTransactions>();
151 151
152 /// <summary> 152 /// <summary>
153 /// Should we dump uploaded assets to the filesystem? 153 /// Should we dump uploaded assets to the filesystem?
@@ -168,7 +168,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
168 /// </summary> 168 /// </summary>
169 /// <param name="userID"></param> 169 /// <param name="userID"></param>
170 /// <returns></returns> 170 /// <returns></returns>
171 private AgentAssetTransactions GetUserTransactions(LLUUID userID) 171 private AgentAssetTransactions GetUserTransactions(UUID userID)
172 { 172 {
173 lock (AgentTransactions) 173 lock (AgentTransactions)
174 { 174 {
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
188 /// from a scene (and hence won't be making any more transactions here). 188 /// from a scene (and hence won't be making any more transactions here).
189 /// </summary> 189 /// </summary>
190 /// <param name="userID"></param> 190 /// <param name="userID"></param>
191 public void RemoveAgentAssetTransactions(LLUUID userID) 191 public void RemoveAgentAssetTransactions(UUID userID)
192 { 192 {
193 // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID); 193 // m_log.DebugFormat("Removing agent asset transactions structure for agent {0}", userID);
194 194
@@ -214,7 +214,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
214 /// <param name="type"></param> 214 /// <param name="type"></param>
215 /// <param name="wearableType"></param> 215 /// <param name="wearableType"></param>
216 /// <param name="nextOwnerMask"></param> 216 /// <param name="nextOwnerMask"></param>
217 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, LLUUID transactionID, LLUUID folderID, 217 public void HandleItemCreationFromTransaction(IClientAPI remoteClient, UUID transactionID, UUID folderID,
218 uint callbackID, string description, string name, sbyte invType, 218 uint callbackID, string description, string name, sbyte invType,
219 sbyte type, byte wearableType, uint nextOwnerMask) 219 sbyte type, byte wearableType, uint nextOwnerMask)
220 { 220 {
@@ -237,7 +237,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
237 /// <param name="remoteClient"></param> 237 /// <param name="remoteClient"></param>
238 /// <param name="transactionID"></param> 238 /// <param name="transactionID"></param>
239 /// <param name="item"></param> 239 /// <param name="item"></param>
240 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, LLUUID transactionID, 240 public void HandleItemUpdateFromTransaction(IClientAPI remoteClient, UUID transactionID,
241 InventoryItemBase item) 241 InventoryItemBase item)
242 { 242 {
243 m_log.DebugFormat( 243 m_log.DebugFormat(
@@ -259,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
259 /// <param name="type"></param> 259 /// <param name="type"></param>
260 /// <param name="data"></param></param> 260 /// <param name="data"></param></param>
261 /// <param name="tempFile"></param> 261 /// <param name="tempFile"></param>
262 public void HandleUDPUploadRequest(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, 262 public void HandleUDPUploadRequest(IClientAPI remoteClient, UUID assetID, UUID transaction, sbyte type,
263 byte[] data, bool storeLocal, bool tempFile) 263 byte[] data, bool storeLocal, bool tempFile)
264 { 264 {
265 if (((AssetType)type == AssetType.Texture || 265 if (((AssetType)type == AssetType.Texture ||
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
index 8f81f3d..813d271 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureDownloadModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Threading; 30using System.Threading;
31using libsecondlife; 31using OpenMetaverse;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
@@ -50,8 +50,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
50 /// <summary> 50 /// <summary>
51 /// Each user has their own texture download service. 51 /// Each user has their own texture download service.
52 /// </summary> 52 /// </summary>
53 private readonly Dictionary<LLUUID, UserTextureDownloadService> m_userTextureServices = 53 private readonly Dictionary<UUID, UserTextureDownloadService> m_userTextureServices =
54 new Dictionary<LLUUID, UserTextureDownloadService>(); 54 new Dictionary<UUID, UserTextureDownloadService>();
55 55
56 private Scene m_scene; 56 private Scene m_scene;
57 private List<Scene> m_scenes = new List<Scene>(); 57 private List<Scene> m_scenes = new List<Scene>();
@@ -109,7 +109,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
109 /// Cleanup the texture service related objects for the removed presence. 109 /// Cleanup the texture service related objects for the removed presence.
110 /// </summary> 110 /// </summary>
111 /// <param name="agentId"> </param> 111 /// <param name="agentId"> </param>
112 private void EventManager_OnRemovePresence(LLUUID agentId) 112 private void EventManager_OnRemovePresence(UUID agentId)
113 { 113 {
114 UserTextureDownloadService textureService; 114 UserTextureDownloadService textureService;
115 115
@@ -216,4 +216,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
216 m_scene.AddPendingDownloads(-1); 216 m_scene.AddPendingDownloads(-1);
217 } 217 }
218 } 218 }
219} \ No newline at end of file 219}
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
index c5af174..f6d8543 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/TextureNotFoundSender.cs
@@ -25,8 +25,8 @@
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 libsecondlife.Packets; 29using OpenMetaverse.Packets;
30using OpenSim.Framework; 30using OpenSim.Framework;
31using OpenSim.Region.Environment.Interfaces; 31using OpenSim.Region.Environment.Interfaces;
32 32
@@ -46,11 +46,11 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
46 // See ITextureSender 46 // See ITextureSender
47 47
48 // private bool m_sending = false; 48 // private bool m_sending = false;
49 private LLUUID m_textureId; 49 private UUID m_textureId;
50 50
51 // See ITextureSender 51 // See ITextureSender
52 52
53 public TextureNotFoundSender(IClientAPI client, LLUUID textureID) 53 public TextureNotFoundSender(IClientAPI client, UUID textureID)
54 { 54 {
55 // // m_client = client; 55 // // m_client = client;
56 m_textureId = textureID; 56 m_textureId = textureID;
@@ -101,4 +101,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
101 101
102 #endregion 102 #endregion
103 } 103 }
104} \ No newline at end of file 104}
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
index e6ee75f..c38bc62 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureDownload/UserTextureDownloadService.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Framework.Communications.Limit; 33using OpenSim.Framework.Communications.Limit;
@@ -65,8 +65,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
65 /// <summary> 65 /// <summary>
66 /// XXX Also going to limit requests for found textures. 66 /// XXX Also going to limit requests for found textures.
67 /// </summary> 67 /// </summary>
68 private readonly IRequestLimitStrategy<LLUUID> foundTextureLimitStrategy 68 private readonly IRequestLimitStrategy<UUID> foundTextureLimitStrategy
69 = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); 69 = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
70 70
71 private readonly IClientAPI m_client; 71 private readonly IClientAPI m_client;
72 private readonly Scene m_scene; 72 private readonly Scene m_scene;
@@ -80,15 +80,15 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
80 /// <summary> 80 /// <summary>
81 /// Holds texture senders before they have received the appropriate texture from the asset cache. 81 /// Holds texture senders before they have received the appropriate texture from the asset cache.
82 /// </summary> 82 /// </summary>
83 private readonly Dictionary<LLUUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<LLUUID, TextureSender.TextureSender>(); 83 private readonly Dictionary<UUID, TextureSender.TextureSender> m_textureSenders = new Dictionary<UUID, TextureSender.TextureSender>();
84 84
85 /// <summary> 85 /// <summary>
86 /// We're going to limit requests for the same missing texture. 86 /// We're going to limit requests for the same missing texture.
87 /// XXX This is really a temporary solution to deal with the situation where a client continually requests 87 /// XXX This is really a temporary solution to deal with the situation where a client continually requests
88 /// the same missing textures 88 /// the same missing textures
89 /// </summary> 89 /// </summary>
90 private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy 90 private readonly IRequestLimitStrategy<UUID> missingTextureLimitStrategy
91 = new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS); 91 = new RepeatLimitStrategy<UUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
92 92
93 public UserTextureDownloadService( 93 public UserTextureDownloadService(
94 IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue) 94 IClientAPI client, Scene scene, BlockingQueue<ITextureSender> sharedQueue)
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
172 /// </summary> 172 /// </summary>
173 /// <param name="textureID"></param> 173 /// <param name="textureID"></param>
174 /// <param name="texture"></param> 174 /// <param name="texture"></param>
175 public void TextureCallback(LLUUID textureID, AssetBase texture) 175 public void TextureCallback(UUID textureID, AssetBase texture)
176 { 176 {
177 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false)); 177 //m_log.DebugFormat("[USER TEXTURE DOWNLOAD SERVICE]: Calling TextureCallback with {0}, texture == null is {1}", textureID, (texture == null ? true : false));
178 178
diff --git a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
index 7554d1a..dbfd4d2 100644
--- a/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/TextureSender/TextureSender.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife.Packets; 30using OpenMetaverse.Packets;
31using log4net; 31using log4net;
32using OpenSim.Framework; 32using OpenSim.Framework;
33using OpenSim.Region.Environment.Interfaces; 33using OpenSim.Region.Environment.Interfaces;
@@ -55,7 +55,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
55 /// </summary> 55 /// </summary>
56 private AssetBase m_asset; 56 private AssetBase m_asset;
57 57
58 //public LLUUID assetID { get { return m_asset.FullID; } } 58 //public UUID assetID { get { return m_asset.FullID; } }
59 59
60 // private bool m_cancel = false; 60 // private bool m_cancel = false;
61 61
@@ -220,4 +220,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
220 return numPackets; 220 return numPackets;
221 } 221 }
222 } 222 }
223} \ No newline at end of file 223}
diff --git a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
index 16874d7..3c69621 100644
--- a/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.cs
+++ b/OpenSim/Region/Environment/Modules/Agent/Xfer/XferModule.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;
@@ -228,4 +228,4 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
228 228
229 #endregion 229 #endregion
230 } 230 }
231} \ No newline at end of file 231}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
index 5df3f52..9433cf6 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs
@@ -29,7 +29,7 @@
29using System; 29using System;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Threading; 31using System.Threading;
32using libsecondlife; 32using OpenMetaverse;
33using Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
35using OpenSim.Framework.Communications.Cache; 35using OpenSim.Framework.Communications.Cache;
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules
43 public class AvatarFactoryModule : IAvatarFactory 43 public class AvatarFactoryModule : IAvatarFactory
44 { 44 {
45 private Scene m_scene = null; 45 private Scene m_scene = null;
46 private readonly Dictionary<LLUUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<LLUUID, AvatarAppearance>(); 46 private readonly Dictionary<UUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<UUID, AvatarAppearance>();
47 47
48 private bool m_enablePersist = false; 48 private bool m_enablePersist = false;
49 private string m_connectionString; 49 private string m_connectionString;
@@ -51,10 +51,10 @@ namespace OpenSim.Region.Environment.Modules
51 private BaseDatabaseConnector m_databaseMapper; 51 private BaseDatabaseConnector m_databaseMapper;
52 private AppearanceTableMapper m_appearanceMapper; 52 private AppearanceTableMapper m_appearanceMapper;
53 53
54 private Dictionary<LLUUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<LLUUID, EventWaitHandle>(); 54 private Dictionary<UUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<UUID, EventWaitHandle>();
55 private object m_syncLock = new object(); 55 private object m_syncLock = new object();
56 56
57 public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance) 57 public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance)
58 { 58 {
59 59
60 //should only let one thread at a time do this part 60 //should only let one thread at a time do this part
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules
163 } 163 }
164 } 164 }
165 165
166 private AvatarAppearance CreateDefault(LLUUID avatarId) 166 private AvatarAppearance CreateDefault(UUID avatarId)
167 { 167 {
168 AvatarAppearance appearance = null; 168 AvatarAppearance appearance = null;
169 AvatarWearable[] wearables; 169 AvatarWearable[] wearables;
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules
174 return appearance; 174 return appearance;
175 } 175 }
176 176
177 private AvatarAppearance CheckDatabase(LLUUID avatarId) 177 private AvatarAppearance CheckDatabase(UUID avatarId)
178 { 178 {
179 AvatarAppearance appearance = null; 179 AvatarAppearance appearance = null;
180 if (m_enablePersist) 180 if (m_enablePersist)
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules
192 return appearance; 192 return appearance;
193 } 193 }
194 194
195 private AvatarAppearance CheckCache(LLUUID avatarId) 195 private AvatarAppearance CheckCache(UUID avatarId)
196 { 196 {
197 AvatarAppearance appearance = null; 197 AvatarAppearance appearance = null;
198 lock (m_avatarsAppearance) 198 lock (m_avatarsAppearance)
@@ -282,16 +282,16 @@ namespace OpenSim.Region.Environment.Modules
282 { 282 {
283 if (wear.Type < 13) 283 if (wear.Type < 13)
284 { 284 {
285 if (wear.ItemID == LLUUID.Zero) 285 if (wear.ItemID == UUID.Zero)
286 { 286 {
287 avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; 287 avatAppearance.Wearables[wear.Type].ItemID = UUID.Zero;
288 avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; 288 avatAppearance.Wearables[wear.Type].AssetID = UUID.Zero;
289 289
290 UpdateDatabase(clientView.AgentId, avatAppearance); 290 UpdateDatabase(clientView.AgentId, avatAppearance);
291 } 291 }
292 else 292 else
293 { 293 {
294 LLUUID assetId; 294 UUID assetId;
295 295
296 InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); 296 InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID);
297 if (baseItem != null) 297 if (baseItem != null)
@@ -310,11 +310,11 @@ namespace OpenSim.Region.Environment.Modules
310 } 310 }
311 } 311 }
312 312
313 public void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance) 313 public void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance)
314 { 314 {
315 if (m_enablePersist) 315 if (m_enablePersist)
316 { 316 {
317 m_appearanceMapper.Update(userID.UUID, avatAppearance); 317 m_appearanceMapper.Update(userID.Guid, avatAppearance);
318 } 318 }
319 } 319 }
320 320
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
index 1493e32..e1599a8 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs
@@ -32,7 +32,7 @@ using System.Net.Sockets;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
115 115
116 // chat works by redistributing every incoming chat 116 // chat works by redistributing every incoming chat
117 // message to each avatar in the scene 117 // message to each avatar in the scene
118 LLVector3 pos = new LLVector3(128, 128, 30); 118 Vector3 pos = new Vector3(128, 128, 30);
119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence) 119 ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence)
120 { 120 {
121 if (presence.IsChildAgent) return; 121 if (presence.IsChildAgent) return;
@@ -129,12 +129,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
129 129
130 if (null == c.SenderObject) 130 if (null == c.SenderObject)
131 client.SendChatMessage(c.Message, (byte)c.Type, 131 client.SendChatMessage(c.Message, (byte)c.Type,
132 pos, c.From, LLUUID.Zero, 132 pos, c.From, UUID.Zero,
133 (byte)ChatSourceType.Agent, 133 (byte)ChatSourceType.Agent,
134 (byte)ChatAudibleLevel.Fully); 134 (byte)ChatAudibleLevel.Fully);
135 else 135 else
136 client.SendChatMessage(c.Message, (byte)c.Type, 136 client.SendChatMessage(c.Message, (byte)c.Type,
137 pos, c.From, LLUUID.Zero, 137 pos, c.From, UUID.Zero,
138 (byte)ChatSourceType.Object, 138 (byte)ChatSourceType.Object,
139 (byte)ChatAudibleLevel.Fully); 139 (byte)ChatAudibleLevel.Fully);
140 }); 140 });
@@ -153,13 +153,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
153 scene = m_scenes[0]; 153 scene = m_scenes[0];
154 154
155 // Filled in since it's easier than rewriting right now. 155 // Filled in since it's easier than rewriting right now.
156 LLVector3 fromPos = e.Position; 156 Vector3 fromPos = e.Position;
157 LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 157 Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
158 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 158 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
159 159
160 string fromName = e.From; 160 string fromName = e.From;
161 string message = e.Message; 161 string message = e.Message;
162 LLUUID fromID = e.SenderUUID; 162 UUID fromID = e.SenderUUID;
163 163
164 if(message.Length >= 1000) // libomv limit 164 if(message.Length >= 1000) // libomv limit
165 message = message.Substring(0, 1000); 165 message = message.Substring(0, 1000);
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
172 if (avatar != null) 172 if (avatar != null)
173 { 173 {
174 fromPos = avatar.AbsolutePosition; 174 fromPos = avatar.AbsolutePosition;
175 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, 175 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
176 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 176 scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
177 fromName = avatar.Firstname + " " + avatar.Lastname; 177 fromName = avatar.Firstname + " " + avatar.Lastname;
178 fromID = e.Sender.AgentId; 178 fromID = e.Sender.AgentId;
@@ -217,16 +217,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
217 } 217 }
218 } 218 }
219 219
220 private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos, 220 private void TrySendChatMessage(ScenePresence presence, Vector3 fromPos, Vector3 regionPos,
221 LLUUID fromAgentID, string fromName, ChatTypeEnum type, 221 UUID fromAgentID, string fromName, ChatTypeEnum type,
222 string message, ChatSourceType src) 222 string message, ChatSourceType src)
223 { 223 {
224 // don't send stuff to child agents 224 // don't send stuff to child agents
225 if (presence.IsChildAgent) return; 225 if (presence.IsChildAgent) return;
226 226
227 LLVector3 fromRegionPos = fromPos + regionPos; 227 Vector3 fromRegionPos = fromPos + regionPos;
228 LLVector3 toRegionPos = presence.AbsolutePosition + 228 Vector3 toRegionPos = presence.AbsolutePosition +
229 new LLVector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, 229 new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize,
230 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); 230 presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
231 231
232 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); 232 int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
index 9df05e0..8fe5080 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs
@@ -32,7 +32,7 @@ using System.Net.Sockets;
32using System.Reflection; 32using System.Reflection;
33using System.Text.RegularExpressions; 33using System.Text.RegularExpressions;
34using System.Threading; 34using System.Threading;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using OpenSim.Framework; 38using OpenSim.Framework;
@@ -617,7 +617,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
617 public void ListenerRun() 617 public void ListenerRun()
618 { 618 {
619 string inputLine; 619 string inputLine;
620 LLVector3 pos = new LLVector3(128, 128, 20); 620 Vector3 pos = new Vector3(128, 128, 20);
621 while (m_enabled) 621 while (m_enabled)
622 { 622 {
623 try 623 try
@@ -638,7 +638,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
638 c.Position = pos; 638 c.Position = pos;
639 c.From = data["nick"]; 639 c.From = data["nick"];
640 c.Sender = null; 640 c.Sender = null;
641 c.SenderUUID = LLUUID.Zero; 641 c.SenderUUID = UUID.Zero;
642 642
643 // is message "\001ACTION foo 643 // is message "\001ACTION foo
644 // bar\001"? -> "/me foo bar" 644 // bar\001"? -> "/me foo bar"
@@ -684,9 +684,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
684 c.Message = String.Format(format, args); 684 c.Message = String.Format(format, args);
685 c.Type = ChatTypeEnum.Say; 685 c.Type = ChatTypeEnum.Say;
686 c.Channel = 0; 686 c.Channel = 0;
687 c.Position = new LLVector3(128, 128, 20); 687 c.Position = new Vector3(128, 128, 20);
688 c.Sender = null; 688 c.Sender = null;
689 c.SenderUUID = LLUUID.Zero; 689 c.SenderUUID = UUID.Zero;
690 690
691 foreach (Scene m_scene in m_scenes) 691 foreach (Scene m_scene in m_scenes)
692 { 692 {
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
index 2a0bba4..19c193f 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs
@@ -32,7 +32,7 @@ using System.Net;
32using System.Net.Sockets; 32using System.Net.Sockets;
33using System.Reflection; 33using System.Reflection;
34using System.Xml; 34using System.Xml;
35using libsecondlife; 35using OpenMetaverse;
36using log4net; 36using log4net;
37using Nini.Config; 37using Nini.Config;
38using Nwc.XmlRpc; 38using Nwc.XmlRpc;
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
62 /// <summary> 62 /// <summary>
63 /// Where Stipends come from and Fees go to. 63 /// Where Stipends come from and Fees go to.
64 /// </summary> 64 /// </summary>
65 // private LLUUID EconomyBaseAccount = LLUUID.Zero; 65 // private UUID EconomyBaseAccount = UUID.Zero;
66 66
67 private float EnergyEfficiency = 0f; 67 private float EnergyEfficiency = 0f;
68 private bool gridmode = false; 68 private bool gridmode = false;
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
72 private IConfigSource m_gConfig; 72 private IConfigSource m_gConfig;
73 73
74 private bool m_keepMoneyAcrossLogins = true; 74 private bool m_keepMoneyAcrossLogins = true;
75 private Dictionary<LLUUID, int> m_KnownClientFunds = new Dictionary<LLUUID, int>(); 75 private Dictionary<UUID, int> m_KnownClientFunds = new Dictionary<UUID, int>();
76 // private string m_LandAddress = String.Empty; 76 // private string m_LandAddress = String.Empty;
77 77
78 private int m_minFundsBeforeRefresh = 100; 78 private int m_minFundsBeforeRefresh = 100;
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
81 /// <summary> 81 /// <summary>
82 /// Region UUIDS indexed by AgentID 82 /// Region UUIDS indexed by AgentID
83 /// </summary> 83 /// </summary>
84 private Dictionary<LLUUID, LLUUID> m_rootAgents = new Dictionary<LLUUID, LLUUID>(); 84 private Dictionary<UUID, UUID> m_rootAgents = new Dictionary<UUID, UUID>();
85 85
86 /// <summary> 86 /// <summary>
87 /// Scenes by Region Handle 87 /// Scenes by Region Handle
@@ -184,11 +184,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
184 } 184 }
185 } 185 }
186 186
187 public void ApplyUploadCharge(LLUUID agentID) 187 public void ApplyUploadCharge(UUID agentID)
188 { 188 {
189 } 189 }
190 190
191 public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) 191 public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount)
192 { 192 {
193 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); 193 string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID));
194 194
@@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
252 PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10); 252 PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10);
253 PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1); 253 PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1);
254 PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); 254 PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1);
255 // string EBA = startupConfig.GetString("EconomyBaseAccount", LLUUID.Zero.ToString()); 255 // string EBA = startupConfig.GetString("EconomyBaseAccount", UUID.Zero.ToString());
256 // Helpers.TryParse(EBA, out EconomyBaseAccount); 256 // Helpers.TryParse(EBA, out EconomyBaseAccount);
257 257
258 // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1); 258 // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1);
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
294 if (s != null && agent != null && childYN == false) 294 if (s != null && agent != null && childYN == false)
295 { 295 {
296 //s.RegionInfo.RegionHandle; 296 //s.RegionInfo.RegionHandle;
297 LLUUID agentID = LLUUID.Zero; 297 UUID agentID = UUID.Zero;
298 int funds = 0; 298 int funds = 0;
299 299
300 Hashtable hbinfo = 300 Hashtable hbinfo =
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
302 s.RegionInfo.regionSecret); 302 s.RegionInfo.regionSecret);
303 if ((bool) hbinfo["success"] == true) 303 if ((bool) hbinfo["success"] == true)
304 { 304 {
305 Helpers.TryParse((string) hbinfo["agentId"], out agentID); 305 UUID.TryParse((string)hbinfo["agentId"], out agentID);
306 try 306 try
307 { 307 {
308 funds = (Int32) hbinfo["funds"]; 308 funds = (Int32) hbinfo["funds"];
@@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
331 (string) hbinfo["errorMessage"]); 331 (string) hbinfo["errorMessage"]);
332 client.SendAlertMessage((string) hbinfo["errorMessage"]); 332 client.SendAlertMessage((string) hbinfo["errorMessage"]);
333 } 333 }
334 SendMoneyBalance(client, agentID, client.SessionId, LLUUID.Zero); 334 SendMoneyBalance(client, agentID, client.SessionId, UUID.Zero);
335 } 335 }
336 } 336 }
337 } 337 }
@@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
365 /// <param name="Receiver"></param> 365 /// <param name="Receiver"></param>
366 /// <param name="amount"></param> 366 /// <param name="amount"></param>
367 /// <returns></returns> 367 /// <returns></returns>
368 private bool doMoneyTransfer(LLUUID Sender, LLUUID Receiver, int amount, int transactiontype, string description) 368 private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description)
369 { 369 {
370 bool result = false; 370 bool result = false;
371 if (amount >= 0) 371 if (amount >= 0)
@@ -425,7 +425,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
425 /// <param name="agentID"></param> 425 /// <param name="agentID"></param>
426 /// <param name="SessionID"></param> 426 /// <param name="SessionID"></param>
427 /// <param name="TransactionID"></param> 427 /// <param name="TransactionID"></param>
428 public void SendMoneyBalance(IClientAPI client, LLUUID agentID, LLUUID SessionID, LLUUID TransactionID) 428 public void SendMoneyBalance(IClientAPI client, UUID agentID, UUID SessionID, UUID TransactionID)
429 { 429 {
430 if (client.AgentId == agentID && client.SessionId == SessionID) 430 if (client.AgentId == agentID && client.SessionId == SessionID)
431 { 431 {
@@ -456,7 +456,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
456 /// <param name="regionId"></param> 456 /// <param name="regionId"></param>
457 /// <param name="regionSecret"></param> 457 /// <param name="regionSecret"></param>
458 /// <returns></returns> 458 /// <returns></returns>
459 public Hashtable GetBalanceForUserFromMoneyServer(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) 459 public Hashtable GetBalanceForUserFromMoneyServer(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret)
460 { 460 {
461 Hashtable MoneyBalanceRequestParams = new Hashtable(); 461 Hashtable MoneyBalanceRequestParams = new Hashtable();
462 MoneyBalanceRequestParams["agentId"] = agentId.ToString(); 462 MoneyBalanceRequestParams["agentId"] = agentId.ToString();
@@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
551 /// <param name="regionId"></param> 551 /// <param name="regionId"></param>
552 /// <param name="regionSecret"></param> 552 /// <param name="regionSecret"></param>
553 /// <returns></returns> 553 /// <returns></returns>
554 public Hashtable claim_user(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) 554 public Hashtable claim_user(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret)
555 { 555 {
556 Hashtable MoneyBalanceRequestParams = new Hashtable(); 556 Hashtable MoneyBalanceRequestParams = new Hashtable();
557 MoneyBalanceRequestParams["agentId"] = agentId.ToString(); 557 MoneyBalanceRequestParams["agentId"] = agentId.ToString();
@@ -563,12 +563,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
563 IClientAPI sendMoneyBal = LocateClientObject(agentId); 563 IClientAPI sendMoneyBal = LocateClientObject(agentId);
564 if (sendMoneyBal != null) 564 if (sendMoneyBal != null)
565 { 565 {
566 SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, LLUUID.Zero); 566 SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, UUID.Zero);
567 } 567 }
568 return MoneyRespData; 568 return MoneyRespData;
569 } 569 }
570 570
571 private SceneObjectPart findPrim(LLUUID objectID) 571 private SceneObjectPart findPrim(UUID objectID)
572 { 572 {
573 lock (m_scenel) 573 lock (m_scenel)
574 { 574 {
@@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
584 return null; 584 return null;
585 } 585 }
586 586
587 private string resolveObjectName(LLUUID objectID) 587 private string resolveObjectName(UUID objectID)
588 { 588 {
589 SceneObjectPart part = findPrim(objectID); 589 SceneObjectPart part = findPrim(objectID);
590 if (part != null) 590 if (part != null)
@@ -594,7 +594,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
594 return String.Empty; 594 return String.Empty;
595 } 595 }
596 596
597 private string resolveAgentName(LLUUID agentID) 597 private string resolveAgentName(UUID agentID)
598 { 598 {
599 // try avatar username surname 599 // try avatar username surname
600 Scene scene = GetRandomScene(); 600 Scene scene = GetRandomScene();
@@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
607 return String.Empty; 607 return String.Empty;
608 } 608 }
609 609
610 private void BalanceUpdate(LLUUID senderID, LLUUID receiverID, bool transactionresult, string description) 610 private void BalanceUpdate(UUID senderID, UUID receiverID, bool transactionresult, string description)
611 { 611 {
612 IClientAPI sender = LocateClientObject(senderID); 612 IClientAPI sender = LocateClientObject(senderID);
613 IClientAPI receiver = LocateClientObject(receiverID); 613 IClientAPI receiver = LocateClientObject(receiverID);
@@ -616,12 +616,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
616 { 616 {
617 if (sender != null) 617 if (sender != null)
618 { 618 {
619 sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(senderID)); 619 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID));
620 } 620 }
621 621
622 if (receiver != null) 622 if (receiver != null)
623 { 623 {
624 receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(receiverID)); 624 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID));
625 } 625 }
626 } 626 }
627 } 627 }
@@ -633,7 +633,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
633 /// <param name="destId"></param> 633 /// <param name="destId"></param>
634 /// <param name="amount"></param> 634 /// <param name="amount"></param>
635 /// <returns></returns> 635 /// <returns></returns>
636 public bool TransferMoneyonMoneyServer(LLUUID sourceId, LLUUID destId, int amount, int transactiontype, string description) 636 public bool TransferMoneyonMoneyServer(UUID sourceId, UUID destId, int amount, int transactiontype, string description)
637 { 637 {
638 int aggregatePermInventory = 0; 638 int aggregatePermInventory = 0;
639 int aggregatePermNextOwner = 0; 639 int aggregatePermNextOwner = 0;
@@ -709,7 +709,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
709 return rvalue; 709 return rvalue;
710 } 710 }
711 711
712 public int GetRemoteBalance(LLUUID agentId) 712 public int GetRemoteBalance(UUID agentId)
713 { 713 {
714 int funds = 0; 714 int funds = 0;
715 715
@@ -755,7 +755,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
755 } 755 }
756 756
757 SetLocalFundsForAgentID(agentId, funds); 757 SetLocalFundsForAgentID(agentId, funds);
758 SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero); 758 SendMoneyBalance(aClient, agentId, aClient.SessionId, UUID.Zero);
759 } 759 }
760 else 760 else
761 { 761 {
@@ -776,10 +776,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
776 776
777 if (requestData.ContainsKey("agentId")) 777 if (requestData.ContainsKey("agentId"))
778 { 778 {
779 LLUUID agentId = LLUUID.Zero; 779 UUID agentId = UUID.Zero;
780 780
781 Helpers.TryParse((string) requestData["agentId"], out agentId); 781 UUID.TryParse((string) requestData["agentId"], out agentId);
782 if (agentId != LLUUID.Zero) 782 if (agentId != UUID.Zero)
783 { 783 {
784 GetRemoteBalance(agentId); 784 GetRemoteBalance(agentId);
785 } 785 }
@@ -809,13 +809,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
809 Hashtable retparam = new Hashtable(); 809 Hashtable retparam = new Hashtable();
810 Hashtable requestData = (Hashtable) request.Params[0]; 810 Hashtable requestData = (Hashtable) request.Params[0];
811 811
812 LLUUID agentId = LLUUID.Zero; 812 UUID agentId = UUID.Zero;
813 LLUUID soundId = LLUUID.Zero; 813 UUID soundId = UUID.Zero;
814 LLUUID regionId = LLUUID.Zero; 814 UUID regionId = UUID.Zero;
815 815
816 Helpers.TryParse((string) requestData["agentId"], out agentId); 816 UUID.TryParse((string) requestData["agentId"], out agentId);
817 Helpers.TryParse((string) requestData["soundId"], out soundId); 817 UUID.TryParse((string) requestData["soundId"], out soundId);
818 Helpers.TryParse((string) requestData["regionId"], out regionId); 818 UUID.TryParse((string) requestData["regionId"], out regionId);
819 string text = (string) requestData["text"]; 819 string text = (string) requestData["text"];
820 string secret = (string) requestData["secret"]; 820 string secret = (string) requestData["secret"];
821 821
@@ -828,9 +828,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
828 IClientAPI client = LocateClientObject(agentId); 828 IClientAPI client = LocateClientObject(agentId);
829 if (client != null) 829 if (client != null)
830 { 830 {
831 if (soundId != LLUUID.Zero) 831
832 client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); 832 if (soundId != UUID.Zero)
833 client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); 833 client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0);
834
835 client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text);
836
834 retparam.Add("success", true); 837 retparam.Add("success", true);
835 } 838 }
836 else 839 else
@@ -843,10 +846,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
843 retparam.Add("success", false); 846 retparam.Add("success", false);
844 } 847 }
845 } 848 }
846 else 849
847 {
848 retparam.Add("success", false);
849 }
850 ret.Value = retparam; 850 ret.Value = retparam;
851 return ret; 851 return ret;
852 } 852 }
@@ -856,14 +856,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
856 public XmlRpcResponse quote_func(XmlRpcRequest request) 856 public XmlRpcResponse quote_func(XmlRpcRequest request)
857 { 857 {
858 Hashtable requestData = (Hashtable) request.Params[0]; 858 Hashtable requestData = (Hashtable) request.Params[0];
859 LLUUID agentId = LLUUID.Zero; 859 UUID agentId = UUID.Zero;
860 int amount = 0; 860 int amount = 0;
861 Hashtable quoteResponse = new Hashtable(); 861 Hashtable quoteResponse = new Hashtable();
862 XmlRpcResponse returnval = new XmlRpcResponse(); 862 XmlRpcResponse returnval = new XmlRpcResponse();
863 863
864 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) 864 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy"))
865 { 865 {
866 Helpers.TryParse((string) requestData["agentId"], out agentId); 866 UUID.TryParse((string) requestData["agentId"], out agentId);
867 try 867 try
868 { 868 {
869 amount = (Int32) requestData["currencyBuy"]; 869 amount = (Int32) requestData["currencyBuy"];
@@ -894,11 +894,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
894 public XmlRpcResponse buy_func(XmlRpcRequest request) 894 public XmlRpcResponse buy_func(XmlRpcRequest request)
895 { 895 {
896 Hashtable requestData = (Hashtable) request.Params[0]; 896 Hashtable requestData = (Hashtable) request.Params[0];
897 LLUUID agentId = LLUUID.Zero; 897 UUID agentId = UUID.Zero;
898 int amount = 0; 898 int amount = 0;
899 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) 899 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy"))
900 { 900 {
901 Helpers.TryParse((string) requestData["agentId"], out agentId); 901 UUID.TryParse((string) requestData["agentId"], out agentId);
902 try 902 try
903 { 903 {
904 amount = (Int32) requestData["currencyBuy"]; 904 amount = (Int32) requestData["currencyBuy"];
@@ -906,7 +906,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
906 catch (InvalidCastException) 906 catch (InvalidCastException)
907 { 907 {
908 } 908 }
909 if (agentId != LLUUID.Zero) 909 if (agentId != UUID.Zero)
910 { 910 {
911 lock (m_KnownClientFunds) 911 lock (m_KnownClientFunds)
912 { 912 {
@@ -922,7 +922,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
922 IClientAPI client = LocateClientObject(agentId); 922 IClientAPI client = LocateClientObject(agentId);
923 if (client != null) 923 if (client != null)
924 { 924 {
925 SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); 925 SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero);
926 } 926 }
927 } 927 }
928 } 928 }
@@ -974,11 +974,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
974 Hashtable retparam = new Hashtable(); 974 Hashtable retparam = new Hashtable();
975 Hashtable requestData = (Hashtable) request.Params[0]; 975 Hashtable requestData = (Hashtable) request.Params[0];
976 976
977 LLUUID agentId = LLUUID.Zero; 977 UUID agentId = UUID.Zero;
978 int amount = 0; 978 int amount = 0;
979 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) 979 if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy"))
980 { 980 {
981 Helpers.TryParse((string) requestData["agentId"], out agentId); 981 UUID.TryParse((string) requestData["agentId"], out agentId);
982 try 982 try
983 { 983 {
984 amount = (Int32) requestData["currencyBuy"]; 984 amount = (Int32) requestData["currencyBuy"];
@@ -986,7 +986,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
986 catch (InvalidCastException) 986 catch (InvalidCastException)
987 { 987 {
988 } 988 }
989 if (agentId != LLUUID.Zero) 989 if (agentId != UUID.Zero)
990 { 990 {
991 lock (m_KnownClientFunds) 991 lock (m_KnownClientFunds)
992 { 992 {
@@ -1002,7 +1002,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1002 IClientAPI client = LocateClientObject(agentId); 1002 IClientAPI client = LocateClientObject(agentId);
1003 if (client != null) 1003 if (client != null)
1004 { 1004 {
1005 SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); 1005 SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero);
1006 } 1006 }
1007 } 1007 }
1008 } 1008 }
@@ -1020,7 +1020,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1020 /// Ensures that the agent accounting data is set up in this instance. 1020 /// Ensures that the agent accounting data is set up in this instance.
1021 /// </summary> 1021 /// </summary>
1022 /// <param name="agentID"></param> 1022 /// <param name="agentID"></param>
1023 private void CheckExistAndRefreshFunds(LLUUID agentID) 1023 private void CheckExistAndRefreshFunds(UUID agentID)
1024 { 1024 {
1025 lock (m_KnownClientFunds) 1025 lock (m_KnownClientFunds)
1026 { 1026 {
@@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1043 /// </summary> 1043 /// </summary>
1044 /// <param name="AgentID"></param> 1044 /// <param name="AgentID"></param>
1045 /// <returns></returns> 1045 /// <returns></returns>
1046 private int GetFundsForAgentID(LLUUID AgentID) 1046 private int GetFundsForAgentID(UUID AgentID)
1047 { 1047 {
1048 int returnfunds = 0; 1048 int returnfunds = 0;
1049 lock (m_KnownClientFunds) 1049 lock (m_KnownClientFunds)
@@ -1060,7 +1060,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1060 return returnfunds; 1060 return returnfunds;
1061 } 1061 }
1062 1062
1063 private void SetLocalFundsForAgentID(LLUUID AgentID, int amount) 1063 private void SetLocalFundsForAgentID(UUID AgentID, int amount)
1064 { 1064 {
1065 lock (m_KnownClientFunds) 1065 lock (m_KnownClientFunds)
1066 { 1066 {
@@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1084 /// </summary> 1084 /// </summary>
1085 /// <param name="AgentID"></param> 1085 /// <param name="AgentID"></param>
1086 /// <returns></returns> 1086 /// <returns></returns>
1087 private IClientAPI LocateClientObject(LLUUID AgentID) 1087 private IClientAPI LocateClientObject(UUID AgentID)
1088 { 1088 {
1089 ScenePresence tPresence = null; 1089 ScenePresence tPresence = null;
1090 IClientAPI rclient = null; 1090 IClientAPI rclient = null;
@@ -1110,7 +1110,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1110 return null; 1110 return null;
1111 } 1111 }
1112 1112
1113 private Scene LocateSceneClientIn(LLUUID AgentId) 1113 private Scene LocateSceneClientIn(UUID AgentId)
1114 { 1114 {
1115 lock (m_scenel) 1115 lock (m_scenel)
1116 { 1116 {
@@ -1148,7 +1148,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1148 /// </summary> 1148 /// </summary>
1149 /// <param name="RegionID"></param> 1149 /// <param name="RegionID"></param>
1150 /// <returns></returns> 1150 /// <returns></returns>
1151 public Scene GetSceneByUUID(LLUUID RegionID) 1151 public Scene GetSceneByUUID(UUID RegionID)
1152 { 1152 {
1153 lock (m_scenel) 1153 lock (m_scenel)
1154 { 1154 {
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1167 1167
1168 #region event Handlers 1168 #region event Handlers
1169 1169
1170 public void requestPayPrice(IClientAPI client, LLUUID objectID) 1170 public void requestPayPrice(IClientAPI client, UUID objectID)
1171 { 1171 {
1172 Scene scene = LocateSceneClientIn(client.AgentId); 1172 Scene scene = LocateSceneClientIn(client.AgentId);
1173 if (scene == null) 1173 if (scene == null)
@@ -1186,7 +1186,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1186 /// When the client closes the connection we remove their accounting info from memory to free up resources. 1186 /// When the client closes the connection we remove their accounting info from memory to free up resources.
1187 /// </summary> 1187 /// </summary>
1188 /// <param name="AgentID"></param> 1188 /// <param name="AgentID"></param>
1189 public void ClientClosed(LLUUID AgentID) 1189 public void ClientClosed(UUID AgentID)
1190 { 1190 {
1191 lock (m_KnownClientFunds) 1191 lock (m_KnownClientFunds)
1192 { 1192 {
@@ -1204,7 +1204,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1204 /// Event called Economy Data Request handler. 1204 /// Event called Economy Data Request handler.
1205 /// </summary> 1205 /// </summary>
1206 /// <param name="agentId"></param> 1206 /// <param name="agentId"></param>
1207 public void EconomyDataRequestHandler(LLUUID agentId) 1207 public void EconomyDataRequestHandler(UUID agentId)
1208 { 1208 {
1209 IClientAPI user = LocateClientObject(agentId); 1209 IClientAPI user = LocateClientObject(agentId);
1210 1210
@@ -1309,11 +1309,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1309 1309
1310 if (e.sender != e.receiver) 1310 if (e.sender != e.receiver)
1311 { 1311 {
1312 sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); 1312 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender));
1313 } 1313 }
1314 if (receiver != null) 1314 if (receiver != null)
1315 { 1315 {
1316 receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID)); 1316 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(part.OwnerID));
1317 } 1317 }
1318 } 1318 }
1319 return; 1319 return;
@@ -1330,13 +1330,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1330 { 1330 {
1331 if (sender != null) 1331 if (sender != null)
1332 { 1332 {
1333 sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); 1333 sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender));
1334 } 1334 }
1335 } 1335 }
1336 1336
1337 if (receiver != null) 1337 if (receiver != null)
1338 { 1338 {
1339 receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.receiver)); 1339 receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.receiver));
1340 } 1340 }
1341 } 1341 }
1342 else 1342 else
@@ -1369,7 +1369,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1369 /// Event Handler for when the client logs out. 1369 /// Event Handler for when the client logs out.
1370 /// </summary> 1370 /// </summary>
1371 /// <param name="AgentId"></param> 1371 /// <param name="AgentId"></param>
1372 private void ClientLoggedOut(LLUUID AgentId) 1372 private void ClientLoggedOut(UUID AgentId)
1373 { 1373 {
1374 lock (m_rootAgents) 1374 lock (m_rootAgents)
1375 { 1375 {
@@ -1396,7 +1396,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1396 /// <param name="avatar"></param> 1396 /// <param name="avatar"></param>
1397 /// <param name="localLandID"></param> 1397 /// <param name="localLandID"></param>
1398 /// <param name="regionID"></param> 1398 /// <param name="regionID"></param>
1399 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 1399 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
1400 { 1400 {
1401 lock (m_rootAgents) 1401 lock (m_rootAgents)
1402 { 1402 {
@@ -1404,8 +1404,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1404 { 1404 {
1405 if (avatar.Scene.RegionInfo.originRegionID != m_rootAgents[avatar.UUID]) 1405 if (avatar.Scene.RegionInfo.originRegionID != m_rootAgents[avatar.UUID])
1406 { 1406 {
1407
1408
1409 m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; 1407 m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID;
1410 1408
1411 1409
@@ -1527,7 +1525,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1527 else 1525 else
1528 { 1526 {
1529 string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID); 1527 string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID);
1530 DeadAvatar.ControllingClient.SendAgentAlertMessage("You impailed yourself on " + part.Name + " owned by " + killer +"!", true); 1528 DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true);
1531 } 1529 }
1532 //DeadAvatar.Scene. part.ObjectOwner 1530 //DeadAvatar.Scene. part.ObjectOwner
1533 } 1531 }
@@ -1564,8 +1562,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
1564 1562
1565 #endregion 1563 #endregion
1566 1564
1567 public void ObjectBuy(IClientAPI remoteClient, LLUUID agentID, 1565 public void ObjectBuy(IClientAPI remoteClient, UUID agentID,
1568 LLUUID sessionID, LLUUID groupID, LLUUID categoryID, 1566 UUID sessionID, UUID groupID, UUID categoryID,
1569 uint localID, byte saleType, int salePrice) 1567 uint localID, byte saleType, int salePrice)
1570 { 1568 {
1571 GetClientFunds(remoteClient); 1569 GetClientFunds(remoteClient);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
index 4a98622..0be540d 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs
@@ -28,8 +28,8 @@ using System;
28using System.Collections; 28using System.Collections;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using libsecondlife.Packets; 32using OpenMetaverse.Packets;
33using log4net; 33using log4net;
34using Nini.Config; 34using Nini.Config;
35using Nwc.XmlRpc; 35using Nwc.XmlRpc;
@@ -43,10 +43,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private Dictionary<LLUUID, List<FriendListItem>> FriendLists = new Dictionary<LLUUID, List<FriendListItem>>(); 46 private Dictionary<UUID, List<FriendListItem>> FriendLists = new Dictionary<UUID, List<FriendListItem>>();
47 private Dictionary<LLUUID, LLUUID> m_pendingFriendRequests = new Dictionary<LLUUID, LLUUID>(); 47 private Dictionary<UUID, UUID> m_pendingFriendRequests = new Dictionary<UUID, UUID>();
48 private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); 48 private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>();
49 private Dictionary<LLUUID, List<StoredFriendListUpdate>> StoredFriendListUpdates = new Dictionary<LLUUID, List<StoredFriendListUpdate>>(); 49 private Dictionary<UUID, List<StoredFriendListUpdate>> StoredFriendListUpdates = new Dictionary<UUID, List<StoredFriendListUpdate>>();
50 50
51 private List<Scene> m_scene = new List<Scene>(); 51 private List<Scene> m_scene = new List<Scene>();
52 52
@@ -98,16 +98,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
98 98
99 if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status")) 99 if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status"))
100 { 100 {
101 LLUUID notifyAgentId = LLUUID.Zero; 101 UUID notifyAgentId = UUID.Zero;
102 LLUUID notifyAboutAgentId = LLUUID.Zero; 102 UUID notifyAboutAgentId = UUID.Zero;
103 bool notifyOnlineStatus = false; 103 bool notifyOnlineStatus = false;
104 104
105 if ((string)requestData["status"] == "TRUE") 105 if ((string)requestData["status"] == "TRUE")
106 notifyOnlineStatus = true; 106 notifyOnlineStatus = true;
107 107
108 Helpers.TryParse((string)requestData["notify_id"], out notifyAgentId); 108 UUID.TryParse((string)requestData["notify_id"], out notifyAgentId);
109 109
110 Helpers.TryParse((string)requestData["agent_id"], out notifyAboutAgentId); 110 UUID.TryParse((string)requestData["agent_id"], out notifyAboutAgentId);
111 m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString()); 111 m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString());
112 ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId); 112 ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId);
113 if (avatar != null) 113 if (avatar != null)
@@ -189,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
189 189
190 } 190 }
191 191
192 private void doFriendListUpdateOnline(LLUUID AgentId) 192 private void doFriendListUpdateOnline(UUID AgentId)
193 { 193 {
194 List<FriendListItem> fl = new List<FriendListItem>(); 194 List<FriendListItem> fl = new List<FriendListItem>();
195 195
@@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
213 } 213 }
214 } 214 }
215 215
216 List<LLUUID> UpdateUsers = new List<LLUUID>(); 216 List<UUID> UpdateUsers = new List<UUID>();
217 217
218 foreach (FriendListItem f in fl) 218 foreach (FriendListItem f in fl)
219 { 219 {
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
226 } 226 }
227 } 227 }
228 } 228 }
229 foreach (LLUUID user in UpdateUsers) 229 foreach (UUID user in UpdateUsers)
230 { 230 {
231 ScenePresence av = GetPresenceFromAgentID(user); 231 ScenePresence av = GetPresenceFromAgentID(user);
232 if (av != null) 232 if (av != null)
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
245 if (fli.Friend == AgentId) 245 if (fli.Friend == AgentId)
246 { 246 {
247 fli.onlinestatus = true; 247 fli.onlinestatus = true;
248 LLUUID[] Agents = new LLUUID[1]; 248 UUID[] Agents = new UUID[1];
249 Agents[0] = AgentId; 249 Agents[0] = AgentId;
250 av.ControllingClient.SendAgentOnline(Agents); 250 av.ControllingClient.SendAgentOnline(Agents);
251 251
@@ -266,7 +266,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
266 } 266 }
267 } 267 }
268 268
269 private void ClientLoggedOut(LLUUID AgentId) 269 private void ClientLoggedOut(UUID AgentId)
270 { 270 {
271 lock (m_rootAgents) 271 lock (m_rootAgents)
272 { 272 {
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
284 lfli = FriendLists[AgentId]; 284 lfli = FriendLists[AgentId];
285 } 285 }
286 } 286 }
287 List<LLUUID> updateUsers = new List<LLUUID>(); 287 List<UUID> updateUsers = new List<UUID>();
288 foreach (FriendListItem fli in lfli) 288 foreach (FriendListItem fli in lfli)
289 { 289 {
290 if (fli.onlinestatus == true) 290 if (fli.onlinestatus == true)
@@ -352,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
352 ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); 352 ScenePresence av = GetPresenceFromAgentID(updateUsers[i]);
353 if (av != null) 353 if (av != null)
354 { 354 {
355 LLUUID[] agents = new LLUUID[1]; 355 UUID[] agents = new UUID[1];
356 agents[0] = AgentId; 356 agents[0] = AgentId;
357 av.ControllingClient.SendAgentOffline(agents); 357 av.ControllingClient.SendAgentOffline(agents);
358 } 358 }
@@ -364,7 +364,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
364 } 364 }
365 } 365 }
366 366
367 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) 367 private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
368 { 368 {
369 lock (m_rootAgents) 369 lock (m_rootAgents)
370 { 370 {
@@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
427 } 427 }
428 } 428 }
429 429
430 private ScenePresence GetPresenceFromAgentID(LLUUID AgentID) 430 private ScenePresence GetPresenceFromAgentID(UUID AgentID)
431 { 431 {
432 ScenePresence returnAgent = null; 432 ScenePresence returnAgent = null;
433 lock (m_scene) 433 lock (m_scene)
@@ -451,11 +451,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
451 451
452 #region FriendRequestHandling 452 #region FriendRequestHandling
453 453
454 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 454 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
455 LLUUID fromAgentSession, LLUUID toAgentID, 455 UUID fromAgentSession, UUID toAgentID,
456 LLUUID imSessionID, uint timestamp, string fromAgentName, 456 UUID imSessionID, uint timestamp, string fromAgentName,
457 string message, byte dialog, bool fromGroup, byte offline, 457 string message, byte dialog, bool fromGroup, byte offline,
458 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 458 uint ParentEstateID, Vector3 Position, UUID RegionID,
459 byte[] binaryBucket) 459 byte[] binaryBucket)
460 { 460 {
461 // Friend Requests go by Instant Message.. using the dialog param 461 // Friend Requests go by Instant Message.. using the dialog param
@@ -464,17 +464,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
464 // 38 == Offer friendship 464 // 38 == Offer friendship
465 if (dialog == (byte) 38) 465 if (dialog == (byte) 38)
466 { 466 {
467 LLUUID friendTransactionID = LLUUID.Random(); 467 UUID friendTransactionID = UUID.Random();
468 468
469 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); 469 m_pendingFriendRequests.Add(friendTransactionID, fromAgentID);
470 470
471 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + 471 m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" +
472 message); 472 message);
473 GridInstantMessage msg = new GridInstantMessage(); 473 GridInstantMessage msg = new GridInstantMessage();
474 msg.fromAgentID = fromAgentID.UUID; 474 msg.fromAgentID = fromAgentID.Guid;
475 msg.fromAgentSession = fromAgentSession.UUID; 475 msg.fromAgentSession = fromAgentSession.Guid;
476 msg.toAgentID = toAgentID.UUID; 476 msg.toAgentID = toAgentID.Guid;
477 msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here 477 msg.imSessionID = friendTransactionID.Guid; // This is the item we're mucking with here
478 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); 478 m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString());
479 msg.timestamp = timestamp; 479 msg.timestamp = timestamp;
480 if (client != null) 480 if (client != null)
@@ -490,8 +490,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
490 msg.fromGroup = fromGroup; 490 msg.fromGroup = fromGroup;
491 msg.offline = offline; 491 msg.offline = offline;
492 msg.ParentEstateID = ParentEstateID; 492 msg.ParentEstateID = ParentEstateID;
493 msg.Position = new sLLVector3(Position); 493 msg.Position = Position;
494 msg.RegionID = RegionID.UUID; 494 msg.RegionID = RegionID.Guid;
495 msg.binaryBucket = binaryBucket; 495 msg.binaryBucket = binaryBucket;
496 // We don't really care which scene we pipe it through. 496 // We don't really care which scene we pipe it through.
497 m_scene[0].TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 497 m_scene[0].TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
@@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
512 } 512 }
513 } 513 }
514 514
515 private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) 515 private void OnApprovedFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List<UUID> callingCardFolders)
516 { 516 {
517 if (m_pendingFriendRequests.ContainsKey(transactionID)) 517 if (m_pendingFriendRequests.ContainsKey(transactionID))
518 { 518 {
@@ -528,18 +528,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
528 528
529 // Compose response to other agent. 529 // Compose response to other agent.
530 GridInstantMessage msg = new GridInstantMessage(); 530 GridInstantMessage msg = new GridInstantMessage();
531 msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; 531 msg.toAgentID = m_pendingFriendRequests[transactionID].Guid;
532 msg.fromAgentID = agentID.UUID; 532 msg.fromAgentID = agentID.Guid;
533 msg.fromAgentName = client.Name; 533 msg.fromAgentName = client.Name;
534 msg.fromAgentSession = client.SessionId.UUID; 534 msg.fromAgentSession = client.SessionId.Guid;
535 msg.fromGroup = false; 535 msg.fromGroup = false;
536 msg.imSessionID = transactionID.UUID; 536 msg.imSessionID = transactionID.Guid;
537 msg.message = agentID.UUID.ToString(); 537 msg.message = agentID.Guid.ToString();
538 msg.ParentEstateID = 0; 538 msg.ParentEstateID = 0;
539 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 539 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
540 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 540 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid;
541 msg.dialog = (byte) 39; // Approved friend request 541 msg.dialog = (byte) 39; // Approved friend request
542 msg.Position = new sLLVector3(); 542 msg.Position = Vector3.Zero;
543 msg.offline = (byte) 0; 543 msg.offline = (byte) 0;
544 msg.binaryBucket = new byte[0]; 544 msg.binaryBucket = new byte[0];
545 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database 545 // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database
@@ -548,7 +548,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
548 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1); 548 SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1);
549 549
550 550
551 //LLUUID[] Agents = new LLUUID[1]; 551 //UUID[] Agents = new UUID[1];
552 //Agents[0] = msg.toAgentID; 552 //Agents[0] = msg.toAgentID;
553 //av.ControllingClient.SendAgentOnline(Agents); 553 //av.ControllingClient.SendAgentOnline(Agents);
554 554
@@ -557,7 +557,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
557 } 557 }
558 } 558 }
559 559
560 private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) 560 private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List<UUID> callingCardFolders)
561 { 561 {
562 if (m_pendingFriendRequests.ContainsKey(transactionID)) 562 if (m_pendingFriendRequests.ContainsKey(transactionID))
563 { 563 {
@@ -571,18 +571,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
571 } 571 }
572 // Compose response to other agent. 572 // Compose response to other agent.
573 GridInstantMessage msg = new GridInstantMessage(); 573 GridInstantMessage msg = new GridInstantMessage();
574 msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; 574 msg.toAgentID = m_pendingFriendRequests[transactionID].Guid;
575 msg.fromAgentID = agentID.UUID; 575 msg.fromAgentID = agentID.Guid;
576 msg.fromAgentName = client.Name; 576 msg.fromAgentName = client.Name;
577 msg.fromAgentSession = client.SessionId.UUID; 577 msg.fromAgentSession = client.SessionId.Guid;
578 msg.fromGroup = false; 578 msg.fromGroup = false;
579 msg.imSessionID = transactionID.UUID; 579 msg.imSessionID = transactionID.Guid;
580 msg.message = agentID.UUID.ToString(); 580 msg.message = agentID.Guid.ToString();
581 msg.ParentEstateID = 0; 581 msg.ParentEstateID = 0;
582 msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); 582 msg.timestamp = (uint) Util.UnixTimeSinceEpoch();
583 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; 583 msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid;
584 msg.dialog = (byte) 40; // Deny friend request 584 msg.dialog = (byte) 40; // Deny friend request
585 msg.Position = new sLLVector3(); 585 msg.Position = Vector3.Zero;
586 msg.offline = (byte) 0; 586 msg.offline = (byte) 0;
587 msg.binaryBucket = new byte[0]; 587 msg.binaryBucket = new byte[0];
588 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); 588 SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule);
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
590 } 590 }
591 } 591 }
592 592
593 private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) 593 private void OnTerminateFriendship(IClientAPI client, UUID agent, UUID exfriendID)
594 { 594 {
595 m_scene[0].StoreRemoveFriendship(agent, exfriendID); 595 m_scene[0].StoreRemoveFriendship(agent, exfriendID);
596 // TODO: Inform the client that the ExFriend is offline 596 // TODO: Inform the client that the ExFriend is offline
@@ -599,10 +599,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
599 private void OnGridInstantMessage(GridInstantMessage msg) 599 private void OnGridInstantMessage(GridInstantMessage msg)
600 { 600 {
601 // Trigger the above event handler 601 // Trigger the above event handler
602 OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), 602 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession),
603 new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, 603 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName,
604 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, 604 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
605 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), 605 new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID),
606 msg.binaryBucket); 606 msg.binaryBucket);
607 } 607 }
608 608
@@ -611,8 +611,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
611 611
612 public struct StoredFriendListUpdate 612 public struct StoredFriendListUpdate
613 { 613 {
614 public LLUUID storedFor; 614 public UUID storedFor;
615 public LLUUID storedAbout; 615 public UUID storedAbout;
616 public bool OnlineYN; 616 public bool OnlineYN;
617 } 617 }
618} 618}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
index eaa5013..ad0cac0 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.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 Nini.Config; 33using Nini.Config;
34using OpenSim.Framework; 34using OpenSim.Framework;
@@ -41,11 +41,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
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 Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>(); 44 private Dictionary<UUID, GroupList> m_grouplistmap = new Dictionary<UUID, GroupList>();
45 private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>(); 45 private Dictionary<UUID, GroupData> m_groupmap = new Dictionary<UUID, GroupData>();
46 private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>(); 46 private Dictionary<UUID, IClientAPI> m_iclientmap = new Dictionary<UUID, IClientAPI>();
47 private Dictionary<LLUUID, GroupData> m_groupUUIDGroup = new Dictionary<LLUUID, GroupData>(); 47 private Dictionary<UUID, GroupData> m_groupUUIDGroup = new Dictionary<UUID, GroupData>();
48 private LLUUID opensimulatorGroupID = new LLUUID("00000000-68f9-1111-024e-222222111123"); 48 private UUID opensimulatorGroupID = new UUID("00000000-68f9-1111-024e-222222111123");
49 49
50 private List<Scene> m_scene = new List<Scene>(); 50 private List<Scene> m_scene = new List<Scene>();
51 51
@@ -161,13 +161,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
161 client.SendGroupMembership(updateGroups); 161 client.SendGroupMembership(updateGroups);
162 } 162 }
163 163
164 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID) 164 private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID AgentID, UUID SessionID)
165 { 165 {
166 // Adam, this is one of those impossible to refactor items without resorting to .Split hackery 166 // Adam, this is one of those impossible to refactor items without resorting to .Split hackery
167 string firstname = remoteClient.FirstName; 167 string firstname = remoteClient.FirstName;
168 string lastname = remoteClient.LastName; 168 string lastname = remoteClient.LastName;
169 169
170 LLUUID ActiveGroupID = LLUUID.Zero; 170 UUID ActiveGroupID = UUID.Zero;
171 uint ActiveGroupPowers = 0; 171 uint ActiveGroupPowers = 0;
172 string ActiveGroupName = "OpenSimulator Tester"; 172 string ActiveGroupName = "OpenSimulator Tester";
173 string ActiveGroupTitle = "I IZ N0T"; 173 string ActiveGroupTitle = "I IZ N0T";
@@ -202,11 +202,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
202 } 202 }
203 } 203 }
204 204
205 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 205 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
206 LLUUID fromAgentSession, LLUUID toAgentID, 206 UUID fromAgentSession, UUID toAgentID,
207 LLUUID imSessionID, uint timestamp, string fromAgentName, 207 UUID imSessionID, uint timestamp, string fromAgentName,
208 string message, byte dialog, bool fromGroup, byte offline, 208 string message, byte dialog, bool fromGroup, byte offline,
209 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 209 uint ParentEstateID, Vector3 Position, UUID RegionID,
210 byte[] binaryBucket) 210 byte[] binaryBucket)
211 { 211 {
212 } 212 }
@@ -214,16 +214,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
214 private void OnGridInstantMessage(GridInstantMessage msg) 214 private void OnGridInstantMessage(GridInstantMessage msg)
215 { 215 {
216 // Trigger the above event handler 216 // Trigger the above event handler
217 OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), 217 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession),
218 new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, 218 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName,
219 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, 219 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
220 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), 220 new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID),
221 msg.binaryBucket); 221 msg.binaryBucket);
222 } 222 }
223 private void HandleUUIDGroupNameRequest(LLUUID id,IClientAPI remote_client) 223 private void HandleUUIDGroupNameRequest(UUID id,IClientAPI remote_client)
224 { 224 {
225 string groupnamereply = "Unknown"; 225 string groupnamereply = "Unknown";
226 LLUUID groupUUID = LLUUID.Zero; 226 UUID groupUUID = UUID.Zero;
227 227
228 lock (m_groupUUIDGroup) 228 lock (m_groupUUIDGroup)
229 { 229 {
@@ -236,7 +236,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups
236 } 236 }
237 remote_client.SendGroupNameReply(groupUUID, groupnamereply); 237 remote_client.SendGroupNameReply(groupUUID, groupnamereply);
238 } 238 }
239 private void OnClientClosed(LLUUID agentID) 239 private void OnClientClosed(UUID agentID)
240 { 240 {
241 lock (m_iclientmap) 241 lock (m_iclientmap)
242 { 242 {
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
index bb3303f..6b2de80 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Reflection; 30using System.Reflection;
31using System.Net; 31using System.Net;
32using System.Threading; 32using System.Threading;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using Nini.Config; 35using Nini.Config;
36using Nwc.XmlRpc; 36using Nwc.XmlRpc;
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 45 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
46 46
47 private readonly List<Scene> m_scenes = new List<Scene>(); 47 private readonly List<Scene> m_scenes = new List<Scene>();
48 private Dictionary<LLUUID, ulong> m_userRegionMap = new Dictionary<LLUUID, ulong>(); 48 private Dictionary<UUID, ulong> m_userRegionMap = new Dictionary<UUID, ulong>();
49 49
50 #region IRegionModule Members 50 #region IRegionModule Members
51 51
@@ -106,11 +106,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
106 client.OnInstantMessage += OnInstantMessage; 106 client.OnInstantMessage += OnInstantMessage;
107 } 107 }
108 108
109 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 109 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
110 LLUUID fromAgentSession, LLUUID toAgentID, 110 UUID fromAgentSession, UUID toAgentID,
111 LLUUID imSessionID, uint timestamp, string fromAgentName, 111 UUID imSessionID, uint timestamp, string fromAgentName,
112 string message, byte dialog, bool fromGroup, byte offline, 112 string message, byte dialog, bool fromGroup, byte offline,
113 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 113 uint ParentEstateID, Vector3 Position, UUID RegionID,
114 byte[] binaryBucket) 114 byte[] binaryBucket)
115 { 115 {
116 bool dialogHandledElsewhere 116 bool dialogHandledElsewhere
@@ -122,8 +122,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
122 // IM dialogs need to be pre-processed and have their sessionID filled by the server 122 // IM dialogs need to be pre-processed and have their sessionID filled by the server
123 // so the sim can match the transaction on the return packet. 123 // so the sim can match the transaction on the return packet.
124 124
125 // Don't send a Friend Dialog IM with a LLUUID.Zero session. 125 // Don't send a Friend Dialog IM with a UUID.Zero session.
126 if (!(dialogHandledElsewhere && imSessionID == LLUUID.Zero)) 126 if (!(dialogHandledElsewhere && imSessionID == UUID.Zero))
127 { 127 {
128 // Try root avatar only first 128 // Try root avatar only first
129 foreach (Scene scene in m_scenes) 129 foreach (Scene scene in m_scenes)
@@ -195,10 +195,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
195 private void OnGridInstantMessage(GridInstantMessage msg) 195 private void OnGridInstantMessage(GridInstantMessage msg)
196 { 196 {
197 // Trigger the above event handler 197 // Trigger the above event handler
198 OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), 198 OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession),
199 new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, 199 new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName,
200 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, 200 msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID,
201 new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), 201 new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID),
202 msg.binaryBucket); 202 msg.binaryBucket);
203 } 203 }
204 204
@@ -214,10 +214,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
214 { 214 {
215 bool successful = false; 215 bool successful = false;
216 // various rational defaults 216 // various rational defaults
217 LLUUID fromAgentID = LLUUID.Zero; 217 UUID fromAgentID = UUID.Zero;
218 LLUUID fromAgentSession = LLUUID.Zero; 218 UUID fromAgentSession = UUID.Zero;
219 LLUUID toAgentID = LLUUID.Zero; 219 UUID toAgentID = UUID.Zero;
220 LLUUID imSessionID = LLUUID.Zero; 220 UUID imSessionID = UUID.Zero;
221 uint timestamp = 0; 221 uint timestamp = 0;
222 string fromAgentName = ""; 222 string fromAgentName = "";
223 string message = ""; 223 string message = "";
@@ -225,8 +225,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
225 bool fromGroup = false; 225 bool fromGroup = false;
226 byte offline = (byte)0; 226 byte offline = (byte)0;
227 uint ParentEstateID=0; 227 uint ParentEstateID=0;
228 LLVector3 Position = LLVector3.Zero; 228 Vector3 Position = Vector3.Zero;
229 LLUUID RegionID = LLUUID.Zero ; 229 UUID RegionID = UUID.Zero ;
230 byte[] binaryBucket = new byte[0]; 230 byte[] binaryBucket = new byte[0];
231 231
232 float pos_x = 0; 232 float pos_x = 0;
@@ -248,11 +248,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
248 && requestData.ContainsKey("binary_bucket") && requestData.ContainsKey("region_handle")) 248 && requestData.ContainsKey("binary_bucket") && requestData.ContainsKey("region_handle"))
249 { 249 {
250 // Do the easy way of validating the UUIDs 250 // Do the easy way of validating the UUIDs
251 Helpers.TryParse((string)requestData["from_agent_id"], out fromAgentID); 251 UUID.TryParse((string)requestData["from_agent_id"], out fromAgentID);
252 Helpers.TryParse((string)requestData["from_agent_session"], out fromAgentSession); 252 UUID.TryParse((string)requestData["from_agent_session"], out fromAgentSession);
253 Helpers.TryParse((string)requestData["to_agent_id"], out toAgentID); 253 UUID.TryParse((string)requestData["to_agent_id"], out toAgentID);
254 Helpers.TryParse((string)requestData["im_session_id"], out imSessionID); 254 UUID.TryParse((string)requestData["im_session_id"], out imSessionID);
255 Helpers.TryParse((string)requestData["region_id"], out RegionID); 255 UUID.TryParse((string)requestData["region_id"], out RegionID);
256 256
257 # region timestamp 257 # region timestamp
258 try 258 try
@@ -345,24 +345,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
345 } 345 }
346 # endregion 346 # endregion
347 347
348 Position = new LLVector3(pos_x, pos_y, pos_z); 348 Position = new Vector3(pos_x, pos_y, pos_z);
349 binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]); 349 binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]);
350 350
351 // Create a New GridInstantMessageObject the the data 351 // Create a New GridInstantMessageObject the the data
352 GridInstantMessage gim = new GridInstantMessage(); 352 GridInstantMessage gim = new GridInstantMessage();
353 gim.fromAgentID = fromAgentID.UUID; 353 gim.fromAgentID = fromAgentID.Guid;
354 gim.fromAgentName = fromAgentName; 354 gim.fromAgentName = fromAgentName;
355 gim.fromAgentSession = fromAgentSession.UUID; 355 gim.fromAgentSession = fromAgentSession.Guid;
356 gim.fromGroup = fromGroup; 356 gim.fromGroup = fromGroup;
357 gim.imSessionID = imSessionID.UUID; 357 gim.imSessionID = imSessionID.Guid;
358 gim.RegionID = RegionID.UUID; 358 gim.RegionID = RegionID.Guid;
359 gim.timestamp = timestamp; 359 gim.timestamp = timestamp;
360 gim.toAgentID = toAgentID.UUID; 360 gim.toAgentID = toAgentID.Guid;
361 gim.message = message; 361 gim.message = message;
362 gim.dialog = dialog; 362 gim.dialog = dialog;
363 gim.offline = offline; 363 gim.offline = offline;
364 gim.ParentEstateID = ParentEstateID; 364 gim.ParentEstateID = ParentEstateID;
365 gim.Position = new sLLVector3(Position); 365 gim.Position = Position;
366 gim.binaryBucket = binaryBucket; 366 gim.binaryBucket = binaryBucket;
367 367
368 368
@@ -418,11 +418,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
418 /// <param name="binaryBucket"></param> 418 /// <param name="binaryBucket"></param>
419 /// <param name="regionhandle"></param> 419 /// <param name="regionhandle"></param>
420 /// <param name="prevRegionHandle"></param> 420 /// <param name="prevRegionHandle"></param>
421 public delegate void GridInstantMessageDelegate(IClientAPI client, LLUUID fromAgentID, 421 public delegate void GridInstantMessageDelegate(IClientAPI client, UUID fromAgentID,
422 LLUUID fromAgentSession, LLUUID toAgentID, 422 UUID fromAgentSession, UUID toAgentID,
423 LLUUID imSessionID, uint timestamp, string fromAgentName, 423 UUID imSessionID, uint timestamp, string fromAgentName,
424 string message, byte dialog, bool fromGroup, byte offline, 424 string message, byte dialog, bool fromGroup, byte offline,
425 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 425 uint ParentEstateID, Vector3 Position, UUID RegionID,
426 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle); 426 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle);
427 427
428 private void GridInstantMessageCompleted(IAsyncResult iar) 428 private void GridInstantMessageCompleted(IAsyncResult iar)
@@ -432,11 +432,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
432 } 432 }
433 433
434 434
435 protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, LLUUID fromAgentID, 435 protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, UUID fromAgentID,
436 LLUUID fromAgentSession, LLUUID toAgentID, 436 UUID fromAgentSession, UUID toAgentID,
437 LLUUID imSessionID, uint timestamp, string fromAgentName, 437 UUID imSessionID, uint timestamp, string fromAgentName,
438 string message, byte dialog, bool fromGroup, byte offline, 438 string message, byte dialog, bool fromGroup, byte offline,
439 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 439 uint ParentEstateID, Vector3 Position, UUID RegionID,
440 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) 440 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle)
441 { 441 {
442 GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync; 442 GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync;
@@ -459,11 +459,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
459 /// if it's the same as the user's looked up region handle, then we end the recursive loop 459 /// if it's the same as the user's looked up region handle, then we end the recursive loop
460 /// </summary> 460 /// </summary>
461 /// <param name="prevRegionHandle"></param> 461 /// <param name="prevRegionHandle"></param>
462 protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, LLUUID fromAgentID, 462 protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, UUID fromAgentID,
463 LLUUID fromAgentSession, LLUUID toAgentID, 463 UUID fromAgentSession, UUID toAgentID,
464 LLUUID imSessionID, uint timestamp, string fromAgentName, 464 UUID imSessionID, uint timestamp, string fromAgentName,
465 string message, byte dialog, bool fromGroup, byte offline, 465 string message, byte dialog, bool fromGroup, byte offline,
466 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 466 uint ParentEstateID, Vector3 Position, UUID RegionID,
467 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) 467 byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle)
468 { 468 {
469 UserAgentData upd = null; 469 UserAgentData upd = null;
@@ -527,10 +527,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
527 if (reginfo != null) 527 if (reginfo != null)
528 { 528 {
529 GridInstantMessage msg = new GridInstantMessage(); 529 GridInstantMessage msg = new GridInstantMessage();
530 msg.fromAgentID = fromAgentID.UUID; 530 msg.fromAgentID = fromAgentID.Guid;
531 msg.fromAgentSession = fromAgentSession.UUID; 531 msg.fromAgentSession = fromAgentSession.Guid;
532 msg.toAgentID = toAgentID.UUID; 532 msg.toAgentID = toAgentID.Guid;
533 msg.imSessionID = imSessionID.UUID; 533 msg.imSessionID = imSessionID.Guid;
534 msg.timestamp = timestamp; 534 msg.timestamp = timestamp;
535 msg.fromAgentName = fromAgentName; 535 msg.fromAgentName = fromAgentName;
536 msg.message = message; 536 msg.message = message;
@@ -538,8 +538,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
538 msg.fromGroup = fromGroup; 538 msg.fromGroup = fromGroup;
539 msg.offline = offline; 539 msg.offline = offline;
540 msg.ParentEstateID = ParentEstateID; 540 msg.ParentEstateID = ParentEstateID;
541 msg.Position = new sLLVector3(Position); 541 msg.Position = Position;
542 msg.RegionID = RegionID.UUID; 542 msg.RegionID = RegionID.Guid;
543 msg.binaryBucket = binaryBucket; 543 msg.binaryBucket = binaryBucket;
544 544
545 Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(msg); 545 Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(msg);
@@ -649,7 +649,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
649 /// </summary> 649 /// </summary>
650 /// <param name="regionID">UUID of region to get the region handle for</param> 650 /// <param name="regionID">UUID of region to get the region handle for</param>
651 /// <returns></returns> 651 /// <returns></returns>
652 private ulong getLocalRegionHandleFromUUID(LLUUID regionID) 652 private ulong getLocalRegionHandleFromUUID(UUID regionID)
653 { 653 {
654 ulong returnhandle = 0; 654 ulong returnhandle = 0;
655 655
@@ -692,13 +692,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage
692 byte[] offlinedata = new byte[1]; offlinedata[0] = msg.offline; 692 byte[] offlinedata = new byte[1]; offlinedata[0] = msg.offline;
693 gim["offline"] = Convert.ToBase64String(offlinedata, Base64FormattingOptions.None); 693 gim["offline"] = Convert.ToBase64String(offlinedata, Base64FormattingOptions.None);
694 gim["parent_estate_id"] = msg.ParentEstateID.ToString(); 694 gim["parent_estate_id"] = msg.ParentEstateID.ToString();
695 gim["position_x"] = msg.Position.x.ToString(); 695 gim["position_x"] = msg.Position.X.ToString();
696 gim["position_y"] = msg.Position.y.ToString(); 696 gim["position_y"] = msg.Position.Y.ToString();
697 gim["position_z"] = msg.Position.z.ToString(); 697 gim["position_z"] = msg.Position.Z.ToString();
698 gim["region_id"] = msg.RegionID.ToString(); 698 gim["region_id"] = msg.RegionID.ToString();
699 gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None); 699 gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None);
700 return gim; 700 return gim;
701 } 701 }
702 702
703 } 703 }
704} \ No newline at end of file 704}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
index d036dbb..344cb5e 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs
@@ -27,7 +27,7 @@
27 27
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
@@ -46,10 +46,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
46 /// occurs in the initial offer message, not the accept message. So this dictionary links 46 /// occurs in the initial offer message, not the accept message. So this dictionary links
47 /// IM Session Ids to ItemIds 47 /// IM Session Ids to ItemIds
48 /// </summary> 48 /// </summary>
49 private IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>(); 49 private IDictionary<UUID, UUID> m_pendingOffers = new Dictionary<UUID, UUID>();
50 50
51 private List<Scene> m_Scenelist = new List<Scene>(); 51 private List<Scene> m_Scenelist = new List<Scene>();
52 private Dictionary<LLUUID, Scene> m_AgentRegions = new Dictionary<LLUUID, Scene>(); 52 private Dictionary<UUID, Scene> m_AgentRegions = new Dictionary<UUID, Scene>();
53 53
54 #region IRegionModule Members 54 #region IRegionModule Members
55 55
@@ -92,11 +92,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
92 client.OnInstantMessage += OnInstantMessage; 92 client.OnInstantMessage += OnInstantMessage;
93 } 93 }
94 94
95 private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, 95 private void OnInstantMessage(IClientAPI client, UUID fromAgentID,
96 LLUUID fromAgentSession, LLUUID toAgentID, 96 UUID fromAgentSession, UUID toAgentID,
97 LLUUID imSessionID, uint timestamp, string fromAgentName, 97 UUID imSessionID, uint timestamp, string fromAgentName,
98 string message, byte dialog, bool fromGroup, byte offline, 98 string message, byte dialog, bool fromGroup, byte offline,
99 uint ParentEstateID, LLVector3 Position, LLUUID RegionID, 99 uint ParentEstateID, Vector3 Position, UUID RegionID,
100 byte[] binaryBucket) 100 byte[] binaryBucket)
101 { 101 {
102 if (dialog == (byte) InstantMessageDialog.InventoryOffered) 102 if (dialog == (byte) InstantMessageDialog.InventoryOffered)
@@ -117,8 +117,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
117 // Next 16 bytes are the UUID 117 // Next 16 bytes are the UUID
118 //Array.Copy(binaryBucket, 1, rawId, 0, 16); 118 //Array.Copy(binaryBucket, 1, rawId, 0, 16);
119 119
120 //LLUUID itemId = new LLUUID(new Guid(rawId)); 120 //UUID itemId = new UUID(new Guid(rawId));
121 LLUUID itemId = new LLUUID(binaryBucket, 1); 121 UUID itemId = new UUID(binaryBucket, 1);
122 122
123 m_log.DebugFormat( 123 m_log.DebugFormat(
124 "[AGENT INVENTORY]: ItemId for giving is {0}", itemId); 124 "[AGENT INVENTORY]: ItemId for giving is {0}", itemId);
@@ -225,12 +225,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
225 } 225 }
226 } 226 }
227 227
228 public void SetRootAgentScene(LLUUID agentID, Scene scene) 228 public void SetRootAgentScene(UUID agentID, Scene scene)
229 { 229 {
230 m_AgentRegions[agentID] = scene; 230 m_AgentRegions[agentID] = scene;
231 } 231 }
232 232
233 public bool NeedSceneCacheClear(LLUUID agentID, Scene scene) 233 public bool NeedSceneCacheClear(UUID agentID, Scene scene)
234 { 234 {
235 if (!m_AgentRegions.ContainsKey(agentID)) 235 if (!m_AgentRegions.ContainsKey(agentID))
236 { 236 {
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
279 return false; 279 return false;
280 } 280 }
281 281
282 public void ClientLoggedOut(LLUUID agentID) 282 public void ClientLoggedOut(UUID agentID)
283 { 283 {
284 if (m_AgentRegions.ContainsKey(agentID)) 284 if (m_AgentRegions.ContainsKey(agentID))
285 m_AgentRegions.Remove(agentID); 285 m_AgentRegions.Remove(agentID);
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
index 20b1c1c..f9c0dcf 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs
@@ -27,7 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using libsecondlife; 30using OpenMetaverse;
31using log4net; 31using log4net;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
90 /// </summary> 90 /// </summary>
91 /// <param name="remoteClient"></param> 91 /// <param name="remoteClient"></param>
92 /// <param name="avatarID"></param> 92 /// <param name="avatarID"></param>
93 public void RequestAvatarProperty(IClientAPI remoteClient, LLUUID avatarID) 93 public void RequestAvatarProperty(IClientAPI remoteClient, UUID avatarID)
94 { 94 {
95 // FIXME: finish adding fields such as url, masking, etc. 95 // FIXME: finish adding fields such as url, masking, etc.
96 UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); 96 UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID);
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
104 } 104 }
105 else 105 else
106 { 106 {
107 charterMember = Helpers.StringToField(profile.CustomType); 107 charterMember = Utils.StringToBytes(profile.CustomType);
108 } 108 }
109 109
110 remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, 110 remoteClient.SendAvatarProperties(profile.ID, profile.AboutText,
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
index 1f41a92..e3a9a45 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Reflection; 30using System.Reflection;
31using libsecondlife; 31using OpenMetaverse;
32using log4net; 32using log4net;
33using Nini.Config; 33using Nini.Config;
34using Nwc.XmlRpc; 34using Nwc.XmlRpc;
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
125 125
126 #endregion 126 #endregion
127 127
128 public void OnRegisterCaps(LLUUID agentID, Caps caps) 128 public void OnRegisterCaps(UUID agentID, Caps caps)
129 { 129 {
130 m_log.DebugFormat("[ASTERISKVOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); 130 m_log.DebugFormat("[ASTERISKVOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
131 string capsBase = "/CAPS/" + caps.CapsObjectPath; 131 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
157 /// <param name="caps"></param> 157 /// <param name="caps"></param>
158 /// <returns></returns> 158 /// <returns></returns>
159 public string ParcelVoiceInfoRequest(string request, string path, string param, 159 public string ParcelVoiceInfoRequest(string request, string path, string param,
160 LLUUID agentID, Caps caps) 160 UUID agentID, Caps caps)
161 { 161 {
162 // we need to do: 162 // we need to do:
163 // - send channel_uri: as "sip:regionID@m_sipDomain" 163 // - send channel_uri: as "sip:regionID@m_sipDomain"
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
226 /// <param name="caps"></param> 226 /// <param name="caps"></param>
227 /// <returns></returns> 227 /// <returns></returns>
228 public string ProvisionVoiceAccountRequest(string request, string path, string param, 228 public string ProvisionVoiceAccountRequest(string request, string path, string param,
229 LLUUID agentID, Caps caps) 229 UUID agentID, Caps caps)
230 { 230 {
231 // we need to 231 // we need to
232 // - get user data from UserProfileCacheService 232 // - get user data from UserProfileCacheService
@@ -289,4 +289,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
289 } 289 }
290 } 290 }
291 } 291 }
292} \ No newline at end of file 292}
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
index c6852f7..bd89175 100644
--- a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
+++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
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;
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
98 98
99 #endregion 99 #endregion
100 100
101 public void OnRegisterCaps(LLUUID agentID, Caps caps) 101 public void OnRegisterCaps(UUID agentID, Caps caps)
102 { 102 {
103 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); 103 m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps);
104 string capsBase = "/CAPS/" + caps.CapsObjectPath; 104 string capsBase = "/CAPS/" + caps.CapsObjectPath;
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
130 /// <param name="caps"></param> 130 /// <param name="caps"></param>
131 /// <returns></returns> 131 /// <returns></returns>
132 public string ParcelVoiceInfoRequest(string request, string path, string param, 132 public string ParcelVoiceInfoRequest(string request, string path, string param,
133 LLUUID agentID, Caps caps) 133 UUID agentID, Caps caps)
134 { 134 {
135 try 135 try
136 { 136 {
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
172 /// <param name="caps"></param> 172 /// <param name="caps"></param>
173 /// <returns></returns> 173 /// <returns></returns>
174 public string ProvisionVoiceAccountRequest(string request, string path, string param, 174 public string ProvisionVoiceAccountRequest(string request, string path, string param,
175 LLUUID agentID, Caps caps) 175 UUID agentID, Caps caps)
176 { 176 {
177 try 177 try
178 { 178 {
@@ -199,4 +199,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
199 return null; 199 return null;
200 } 200 }
201 } 201 }
202} \ No newline at end of file 202}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
index f99bfc5..dd592dd 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/AuraMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class AuraMetaEntity : PointMetaEntity 55 public class AuraMetaEntity : PointMetaEntity
@@ -59,13 +57,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
59 #region Constructors 57 #region Constructors
60 58
61 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency. 59 //transparency of root part, NOT particle system. Should probably add support for changing particle system transparency.
62 public AuraMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) 60 public AuraMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
63 : base(scene, LocalId, groupPos, transparency) 61 : base(scene, LocalId, groupPos, transparency)
64 { 62 {
65 SetAura(color, scale); 63 SetAura(color, scale);
66 } 64 }
67 65
68 public AuraMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, LLVector3 color, LLVector3 scale) 66 public AuraMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, Vector3 color, Vector3 scale)
69 : base(scene, uuid, LocalId, groupPos, transparency) 67 : base(scene, uuid, LocalId, groupPos, transparency)
70 { 68 {
71 SetAura(color, scale); 69 SetAura(color, scale);
@@ -75,7 +73,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
75 73
76 #region Private Methods 74 #region Private Methods
77 75
78 private float Average(LLVector3 values) 76 private float Average(Vector3 values)
79 { 77 {
80 return (values.X + values.Y + values.Z)/3f; 78 return (values.X + values.Y + values.Z)/3f;
81 } 79 }
@@ -84,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
84 82
85 #region Public Methods 83 #region Public Methods
86 84
87 public void SetAura(LLVector3 color, LLVector3 scale) 85 public void SetAura(Vector3 color, Vector3 scale)
88 { 86 {
89 SetAura(color, Average(scale) * 2.0f); 87 SetAura(color, Average(scale) * 2.0f);
90 } 88 }
91 89
92 public void SetAura(LLVector3 color, float radius) 90 public void SetAura(Vector3 color, float radius)
93 { 91 {
94 SceneObjectPart From = m_Entity.RootPart; 92 SceneObjectPart From = m_Entity.RootPart;
95 93
@@ -110,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
110 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags); 108 SetAura(From, color, radius, burstRadius, age, burstRate, patternFlags);
111 } 109 }
112 110
113 public void SetAura(SceneObjectPart From, LLVector3 color, float radius, float burstRadius, float age, float burstRate, libsecondlife.Primitive.ParticleSystem.SourcePattern patternFlags) 111 public void SetAura(SceneObjectPart From, Vector3 color, float radius, float burstRadius, float age, float burstRate, Primitive.ParticleSystem.SourcePattern patternFlags)
114 { 112 {
115 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 113 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
116 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 114 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
@@ -139,7 +137,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
139 prules.PartAcceleration.Y = 0.0f; 137 prules.PartAcceleration.Y = 0.0f;
140 prules.PartAcceleration.Z = 0.0f; 138 prules.PartAcceleration.Z = 0.0f;
141 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN 139 prules.Pattern = patternFlags; //PSYS_SRC_PATTERN
142 //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank 140 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
143 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE 141 prules.BurstRate = burstRate; //PSYS_SRC_BURST_RATE
144 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT 142 prules.BurstPartCount = 2; //PSYS_SRC_BURST_PART_COUNT
145 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS 143 //prules.BurstRadius = radius; //PSYS_SRC_BURST_RADIUS
@@ -160,4 +158,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 158
161 #endregion Public Methods 159 #endregion Public Methods
162 } 160 }
163} \ No newline at end of file 161}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
index 9e39088..b27bbc0 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/BeamMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,21 +50,19 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class BeamMetaEntity : PointMetaEntity 55 public class BeamMetaEntity : PointMetaEntity
58 { 56 {
59 #region Constructors 57 #region Constructors
60 58
61 public BeamMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) 59 public BeamMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
62 : base(scene, LocalId, groupPos, transparency) 60 : base(scene, LocalId, groupPos, transparency)
63 { 61 {
64 SetBeamToUUID(To, color); 62 SetBeamToUUID(To, color);
65 } 63 }
66 64
67 public BeamMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency, SceneObjectPart To, LLVector3 color) 65 public BeamMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency, SceneObjectPart To, Vector3 color)
68 : base(scene, uuid, LocalId, groupPos, transparency) 66 : base(scene, uuid, LocalId, groupPos, transparency)
69 { 67 {
70 SetBeamToUUID(To, color); 68 SetBeamToUUID(To, color);
@@ -74,13 +72,13 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
74 72
75 #region Public Methods 73 #region Public Methods
76 74
77 public void SetBeamToUUID(SceneObjectPart To, LLVector3 color) 75 public void SetBeamToUUID(SceneObjectPart To, Vector3 color)
78 { 76 {
79 SceneObjectPart From = m_Entity.RootPart; 77 SceneObjectPart From = m_Entity.RootPart;
80 //Scale size of particles to distance objects are apart (for better visibility) 78 //Scale size of particles to distance objects are apart (for better visibility)
81 LLVector3 FromPos = From.GetWorldPosition(); 79 Vector3 FromPos = From.GetWorldPosition();
82 LLVector3 ToPos = From.GetWorldPosition(); 80 Vector3 ToPos = From.GetWorldPosition();
83// LLUUID toUUID = To.UUID; 81 UUID toUUID = To.UUID;
84 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) + 82 float distance = (float) (Math.Sqrt(Math.Pow(FromPos.X-ToPos.X, 2) +
85 Math.Pow(FromPos.X-ToPos.Y, 2) + 83 Math.Pow(FromPos.X-ToPos.Y, 2) +
86 Math.Pow(FromPos.X-ToPos.Z, 2) 84 Math.Pow(FromPos.X-ToPos.Z, 2)
@@ -94,7 +92,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
94 SetBeamToUUID(From, To, color, rate, scale, speed); 92 SetBeamToUUID(From, To, color, rate, scale, speed);
95 } 93 }
96 94
97 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, LLVector3 color, float rate, float scale, float speed) 95 public void SetBeamToUUID(SceneObjectPart From, SceneObjectPart To, Vector3 color, float rate, float scale, float speed)
98 { 96 {
99 Primitive.ParticleSystem prules = new Primitive.ParticleSystem(); 97 Primitive.ParticleSystem prules = new Primitive.ParticleSystem();
100 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive | 98 //prules.PartDataFlags = Primitive.ParticleSystem.ParticleDataFlags.Emissive |
@@ -118,7 +116,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
118 prules.PartAcceleration.Y = 0.0f; 116 prules.PartAcceleration.Y = 0.0f;
119 prules.PartAcceleration.Z = 0.0f; 117 prules.PartAcceleration.Z = 0.0f;
120 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN 118 //prules.Pattern = Primitive.ParticleSystem.SourcePattern.Explode; //PSYS_SRC_PATTERN
121 //prules.Texture = LLUUID.Zero;//= LLUUID //PSYS_SRC_TEXTURE, default used if blank 119 //prules.Texture = UUID.Zero;//= UUID //PSYS_SRC_TEXTURE, default used if blank
122 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE 120 prules.BurstRate = rate; //PSYS_SRC_BURST_RATE
123 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT 121 prules.BurstPartCount = 1; //PSYS_SRC_BURST_PART_COUNT
124 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS 122 prules.BurstRadius = 0.5f; //PSYS_SRC_BURST_RADIUS
@@ -138,4 +136,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
138 136
139 #endregion Public Methods 137 #endregion Public Methods
140 } 138 }
141} \ No newline at end of file 139}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
index 6ccb646..072de5e 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMController.cs
@@ -39,7 +39,7 @@ using System.Collections.Generic;
39using System.Diagnostics; 39using System.Diagnostics;
40using System.Threading; 40using System.Threading;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 /// <summary> 54 /// <summary>
@@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
266 /// <summary> 264 /// <summary>
267 /// Only called by the MainLoop. 265 /// Only called by the MainLoop.
268 /// </summary> 266 /// </summary>
269 private void UndoDid(CMModel model, CMView view, LLUUID uuid) 267 private void UndoDid(CMModel model, CMView view, UUID uuid)
270 { 268 {
271 if ((m_state & State.SHOWING_CHANGES) > 0) 269 if ((m_state & State.SHOWING_CHANGES) > 0)
272 { 270 {
@@ -289,7 +287,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
289 m_WorkQueue.Enqueue(moreWork); 287 m_WorkQueue.Enqueue(moreWork);
290 } 288 }
291 289
292 protected void ObjectDuplicated(uint localID, LLVector3 offset, uint dupeFlags, LLUUID AgentID, LLUUID GroupID) 290 protected void ObjectDuplicated(uint localID, Vector3 offset, uint dupeFlags, UUID AgentID, UUID GroupID)
293 { 291 {
294 Work moreWork = new Work(); 292 Work moreWork = new Work();
295 moreWork.Type = WorkType.OBJECTDUPLICATED; 293 moreWork.Type = WorkType.OBJECTDUPLICATED;
@@ -298,8 +296,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
298 m_log.Debug("[CONTENT MANAGEMENT] dup queue"); 296 m_log.Debug("[CONTENT MANAGEMENT] dup queue");
299 } 297 }
300 298
301 protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, LLUUID AgentID, LLUUID GroupID, 299 protected void ObjectDuplicatedOnRay(uint localID, uint dupeFlags, UUID AgentID, UUID GroupID,
302 LLUUID RayTargetObj, LLVector3 RayEnd, LLVector3 RayStart, 300 UUID RayTargetObj, Vector3 RayEnd, Vector3 RayStart,
303 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates) 301 bool BypassRaycast, bool RayEndIsIntersection, bool CopyCenters, bool CopyRotates)
304 { 302 {
305 Work moreWork = new Work(); 303 Work moreWork = new Work();
@@ -318,7 +316,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
318 m_log.Debug("[CONTENT MANAGEMENT] new client"); 316 m_log.Debug("[CONTENT MANAGEMENT] new client");
319 } 317 }
320 318
321 protected void OnUnDid(IClientAPI remoteClient, LLUUID primId) 319 protected void OnUnDid(IClientAPI remoteClient, UUID primId)
322 { 320 {
323 Work moreWork = new Work(); 321 Work moreWork = new Work();
324 moreWork.Type = WorkType.UNDODID; 322 moreWork.Type = WorkType.UNDODID;
@@ -405,7 +403,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
405 /// <summary> 403 /// <summary>
406 /// 404 ///
407 /// </summary> 405 /// </summary>
408 protected void StopManaging(LLUUID clientUUID) 406 protected void StopManaging(UUID clientUUID)
409 { 407 {
410 foreach(Object sceneobj in m_sceneList.Values) 408 foreach(Object sceneobj in m_sceneList.Values)
411 { 409 {
@@ -433,7 +431,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
433 } 431 }
434 } 432 }
435 433
436 protected void UpdateMultiplePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 434 protected void UpdateMultiplePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
437 { 435 {
438 Work moreWork = new Work(); 436 Work moreWork = new Work();
439 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 437 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -442,7 +440,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
442 m_log.Debug("[CONTENT MANAGEMENT] pos"); 440 m_log.Debug("[CONTENT MANAGEMENT] pos");
443 } 441 }
444 442
445 protected void UpdateMultipleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 443 protected void UpdateMultipleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
446 { 444 {
447 Work moreWork = new Work(); 445 Work moreWork = new Work();
448 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 446 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -451,7 +449,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
451 m_log.Debug("[CONTENT MANAGEMENT] rot"); 449 m_log.Debug("[CONTENT MANAGEMENT] rot");
452 } 450 }
453 451
454 protected void UpdateMultipleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 452 protected void UpdateMultipleScale(uint localID, Vector3 scale, IClientAPI remoteClient)
455 { 453 {
456 Work moreWork = new Work(); 454 Work moreWork = new Work();
457 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 455 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -460,8 +458,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
460 m_log.Debug("[CONTENT MANAGEMENT]scale"); 458 m_log.Debug("[CONTENT MANAGEMENT]scale");
461 } 459 }
462 460
463 protected void UpdateNewParts(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, 461 protected void UpdateNewParts(UUID ownerID, Vector3 RayEnd, Quaternion rot, PrimitiveBaseShape shape,
464 byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, 462 byte bypassRaycast, Vector3 RayStart, UUID RayTargetID,
465 byte RayEndIsIntersection) 463 byte RayEndIsIntersection)
466 { 464 {
467 Work moreWork = new Work(); 465 Work moreWork = new Work();
@@ -471,7 +469,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
471 m_log.Debug("[CONTENT MANAGEMENT] new parts"); 469 m_log.Debug("[CONTENT MANAGEMENT] new parts");
472 } 470 }
473 471
474 protected void UpdateSinglePosition(uint localID, LLVector3 pos, IClientAPI remoteClient) 472 protected void UpdateSinglePosition(uint localID, Vector3 pos, IClientAPI remoteClient)
475 { 473 {
476 Work moreWork = new Work(); 474 Work moreWork = new Work();
477 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 475 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -483,7 +481,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
483 /// <summary> 481 /// <summary>
484 /// 482 ///
485 /// </summary> 483 /// </summary>
486 protected void UpdateSingleRotation(uint localID, LLQuaternion rot, IClientAPI remoteClient) 484 protected void UpdateSingleRotation(uint localID, Quaternion rot, IClientAPI remoteClient)
487 { 485 {
488 Work moreWork = new Work(); 486 Work moreWork = new Work();
489 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 487 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -492,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
492 m_log.Debug("[CONTENT MANAGEMENT] rot"); 490 m_log.Debug("[CONTENT MANAGEMENT] rot");
493 } 491 }
494 492
495 protected void UpdateSingleScale(uint localID, LLVector3 scale, IClientAPI remoteClient) 493 protected void UpdateSingleScale(uint localID, Vector3 scale, IClientAPI remoteClient)
496 { 494 {
497 Work moreWork = new Work(); 495 Work moreWork = new Work();
498 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE; 496 moreWork.Type = WorkType.OBJECTATTRIBUTECHANGE;
@@ -723,7 +721,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
723 public Object Data2; //Just more space for holding data. 721 public Object Data2; //Just more space for holding data.
724 public uint LocalId; //Convenient 722 public uint LocalId; //Convenient
725 public WorkType Type; 723 public WorkType Type;
726 public LLUUID UUID; //Convenient 724 public UUID UUID; //Convenient
727 725
728 #endregion Fields 726 #endregion Fields
729 } 727 }
@@ -745,4 +743,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
745 743
746 #endregion Other 744 #endregion Other
747 } 745 }
748} \ No newline at end of file 746}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
index 454429c..996badf 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMEntityCollection.cs
@@ -40,7 +40,7 @@ using System.Collections;
40using System.Collections.Generic; 40using System.Collections.Generic;
41using System.Threading; 41using System.Threading;
42 42
43using libsecondlife; 43using OpenMetaverse;
44 44
45using Nini.Config; 45using Nini.Config;
46 46
@@ -52,8 +52,6 @@ using OpenSim.Region.Physics.Manager;
52 52
53using log4net; 53using log4net;
54 54
55using Axiom.Math;
56
57namespace OpenSim.Region.Environment.Modules.ContentManagement 55namespace OpenSim.Region.Environment.Modules.ContentManagement
58{ 56{
59 public class CMEntityCollection 57 public class CMEntityCollection
@@ -63,12 +61,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
63 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); 61 // private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
64 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or 62 // Any ContentManagementEntities that represent old versions of current SceneObjectGroups or
65 // old versions of deleted SceneObjectGroups will be stored in this hash table. 63 // old versions of deleted SceneObjectGroups will be stored in this hash table.
66 // The LLUUID keys are from the SceneObjectGroup RootPart UUIDs 64 // The UUID keys are from the SceneObjectGroup RootPart UUIDs
67 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //LLUUID to ContentManagementEntity 65 protected Hashtable m_CMEntityHash = Hashtable.Synchronized(new Hashtable()); //UUID to ContentManagementEntity
68 66
69 // SceneObjectParts that have not been revisioned will be given green auras stored in this hashtable 67 // SceneObjectParts that have not been revisioned will be given green auras stored in this hashtable
70 // The LLUUID keys are from the SceneObjectPart that they are supposed to be on. 68 // The UUID keys are from the SceneObjectPart that they are supposed to be on.
71 protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //LLUUID to AuraMetaEntity 69 protected Hashtable m_NewlyCreatedEntityAura = Hashtable.Synchronized(new Hashtable()); //UUID to AuraMetaEntity
72 70
73 #endregion Fields 71 #endregion Fields
74 72
@@ -151,7 +149,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
151 part.ParentGroup.Scene.PrimIDAllocate(), 149 part.ParentGroup.Scene.PrimIDAllocate(),
152 part.GetWorldPosition(), 150 part.GetWorldPosition(),
153 MetaEntity.TRANSLUCENT, 151 MetaEntity.TRANSLUCENT,
154 new LLVector3(0,254,0), 152 new Vector3(0,254,0),
155 part.Scale 153 part.Scale
156 ); 154 );
157 m_NewlyCreatedEntityAura.Add(part.UUID, ent); 155 m_NewlyCreatedEntityAura.Add(part.UUID, ent);
@@ -175,7 +173,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
175 return ent; 173 return ent;
176 } 174 }
177 175
178 public bool RemoveEntity(LLUUID uuid) 176 public bool RemoveEntity(UUID uuid)
179 { 177 {
180 if (!m_CMEntityHash.ContainsKey(uuid)) 178 if (!m_CMEntityHash.ContainsKey(uuid))
181 return false; 179 return false;
@@ -183,7 +181,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
183 return true; 181 return true;
184 } 182 }
185 183
186 public bool RemoveNewlyCreatedEntityAura(LLUUID uuid) 184 public bool RemoveNewlyCreatedEntityAura(UUID uuid)
187 { 185 {
188 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid)) 186 if (!m_NewlyCreatedEntityAura.ContainsKey(uuid))
189 return false; 187 return false;
@@ -193,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
193 191
194 #endregion Public Methods 192 #endregion Public Methods
195 } 193 }
196} \ No newline at end of file 194}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
index 92ae0d7..e1b4129 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMModel.cs
@@ -39,7 +39,7 @@ using System.Collections;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Diagnostics; 40using System.Diagnostics;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class CMModel 54 public class CMModel
@@ -133,14 +131,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
133 m_MetaEntityCollection.ClearAll(); 131 m_MetaEntityCollection.ClearAll();
134 } 132 }
135 133
136 public ContentManagementEntity FindMetaEntityAffectedByUndo(LLUUID uuid) 134 public ContentManagementEntity FindMetaEntityAffectedByUndo(UUID uuid)
137 { 135 {
138 ContentManagementEntity ent = GetMetaGroupByPrim(uuid); 136 ContentManagementEntity ent = GetMetaGroupByPrim(uuid);
139 return ent; 137 return ent;
140 } 138 }
141 139
142 //-------------------------------- HELPERS --------------------------------------------------------------------// 140 //-------------------------------- HELPERS --------------------------------------------------------------------//
143 public ContentManagementEntity GetMetaGroupByPrim(LLUUID uuid) 141 public ContentManagementEntity GetMetaGroupByPrim(UUID uuid)
144 { 142 {
145 foreach (Object ent in m_MetaEntityCollection.Entities.Values) 143 foreach (Object ent in m_MetaEntityCollection.Entities.Values)
146 { 144 {
@@ -194,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
194 SceneObjectGroup temp = null; 192 SceneObjectGroup temp = null;
195 System.Collections.Hashtable deleteListUUIDs = new Hashtable(); 193 System.Collections.Hashtable deleteListUUIDs = new Hashtable();
196// Dictionary<LLUUID, EntityBase> SearchList = new Dictionary<LLUUID,EntityBase>(); 194// Dictionary<LLUUID, EntityBase> SearchList = new Dictionary<LLUUID,EntityBase>();
197 Dictionary<LLUUID, EntityBase> ReplacementList = new Dictionary<LLUUID,EntityBase>(); 195 Dictionary<UUID, EntityBase> ReplacementList = new Dictionary<UUID,EntityBase>();
198 int revision = m_database.GetMostRecentRevision(scene.RegionInfo.RegionID); 196 int revision = m_database.GetMostRecentRevision(scene.RegionInfo.RegionID);
199// EntityBase[] searchArray; 197// EntityBase[] searchArray;
200 198
@@ -255,14 +253,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
255 break; 253 break;
256 } 254 }
257 255
258 foreach(LLUUID uuid in deleteListUUIDs.Keys) 256 foreach(UUID uuid in deleteListUUIDs.Keys)
259 { 257 {
260 try 258 try
261 { 259 {
262 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles. 260 // I thought that the DeleteGroup() function would handle all of this, but it doesn't. I'm not sure WHAT it handles.
263 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]); 261 ((SceneObjectGroup)scene.Entities[uuid]).DetachFromBackup((SceneObjectGroup)scene.Entities[uuid]);
264 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor); 262 scene.PhysicsScene.RemovePrim(((SceneObjectGroup)scene.Entities[uuid]).RootPart.PhysActor);
265 scene.SendKillObject(scene.Entities[uuid].LocalId); 263 scene.SendKiPrimitive(scene.Entities[uuid].LocalId);
266 scene.m_innerScene.DeleteSceneObject(uuid, false); 264 scene.m_innerScene.DeleteSceneObject(uuid, false);
267 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup(); 265 ((SceneObjectGroup)scene.Entities[uuid]).DeleteGroup();
268 } 266 }
@@ -284,7 +282,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
284 if (!(ent is SceneObjectGroup)) 282 if (!(ent is SceneObjectGroup))
285 continue; 283 continue;
286 284
287 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) LLObject.ObjectFlags.Phantom) == 0) 285 if ((((SceneObjectGroup)ent).RootPart.GetEffectiveObjectFlags() & (uint) PrimFlags.Phantom) == 0)
288 ((SceneObjectGroup)ent).ApplyPhysics(true); 286 ((SceneObjectGroup)ent).ApplyPhysics(true);
289 ((SceneObjectGroup)ent).AttachToBackup(); 287 ((SceneObjectGroup)ent).AttachToBackup();
290 ((SceneObjectGroup)ent).HasGroupChanged = true; // If not true, then attaching to backup does nothing because no change is detected. 288 ((SceneObjectGroup)ent).HasGroupChanged = true; // If not true, then attaching to backup does nothing because no change is detected.
@@ -346,7 +344,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
346 { 344 {
347 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID)) 345 if (m_MetaEntityCollection.Auras.ContainsKey(part.UUID))
348 { 346 {
349 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new LLVector3(0,254,0), part.Scale); 347 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).SetAura(new Vector3(0,254,0), part.Scale);
350 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).RootPart.GroupPosition = part.GetWorldPosition(); 348 ((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]).RootPart.GroupPosition = part.GetWorldPosition();
351 auraList.Add((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]); 349 auraList.Add((AuraMetaEntity)m_MetaEntityCollection.Auras[part.UUID]);
352 } 350 }
@@ -356,4 +354,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
356 354
357 #endregion Public Methods 355 #endregion Public Methods
358 } 356 }
359} \ No newline at end of file 357}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
index fca2830..90ef6ef 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/CMView.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections; 39using System.Collections;
40using System.Collections.Generic; 40using System.Collections.Generic;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using OpenSim; 44using OpenSim;
45using OpenSim.Framework; 45using OpenSim.Framework;
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class CMView 54 public class CMView
@@ -136,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
136 SendSimChatMessage(scene, menu); 134 SendSimChatMessage(scene, menu);
137 } 135 }
138 136
139 public void DisplayMetaEntity(LLUUID uuid) 137 public void DisplayMetaEntity(UUID uuid)
140 { 138 {
141 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid); 139 ContentManagementEntity group = m_model.GetMetaGroupByPrim(uuid);
142 if (group != null) 140 if (group != null)
@@ -199,10 +197,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
199 197
200 public void SendSimChatMessage(Scene scene, string message) 198 public void SendSimChatMessage(Scene scene, string message)
201 { 199 {
202 scene.SimChat(Helpers.StringToField(message), 200 scene.SimChat(Utils.StringToBytes(message),
203 ChatTypeEnum.Broadcast, 0, new LLVector3(0,0,0), "Content Manager", LLUUID.Zero, false); 201 ChatTypeEnum.Broadcast, 0, new Vector3(0,0,0), "Content Manager", UUID.Zero, false);
204 } 202 }
205 203
206 #endregion Public Methods 204 #endregion Public Methods
207 } 205 }
208} \ No newline at end of file 206}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
index 8e0dd33..819ff87 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementEntity.cs
@@ -38,7 +38,7 @@ using System;
38using System.Collections.Generic; 38using System.Collections.Generic;
39using System.Drawing; 39using System.Drawing;
40 40
41using libsecondlife; 41using OpenMetaverse;
42 42
43using Nini.Config; 43using Nini.Config;
44 44
@@ -49,8 +49,6 @@ using OpenSim.Region.Physics.Manager;
49 49
50using log4net; 50using log4net;
51 51
52using Axiom.Math;
53
54namespace OpenSim.Region.Environment.Modules.ContentManagement 52namespace OpenSim.Region.Environment.Modules.ContentManagement
55{ 53{
56 public class ContentManagementEntity : MetaEntity 54 public class ContentManagementEntity : MetaEntity
@@ -64,8 +62,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
64 62
65 #region Fields 63 #region Fields
66 64
67 protected Dictionary<LLUUID, AuraMetaEntity> m_AuraEntities = new Dictionary<LLUUID, AuraMetaEntity>(); 65 protected Dictionary<UUID, AuraMetaEntity> m_AuraEntities = new Dictionary<UUID, AuraMetaEntity>();
68 protected Dictionary<LLUUID, BeamMetaEntity> m_BeamEntities = new Dictionary<LLUUID, BeamMetaEntity>(); 66 protected Dictionary<UUID, BeamMetaEntity> m_BeamEntities = new Dictionary<UUID, BeamMetaEntity>();
69 67
70 // The LinkNum of parts in m_Entity and m_UnchangedEntity are the same though UUID and LocalId are different. 68 // The LinkNum of parts in m_Entity and m_UnchangedEntity are the same though UUID and LocalId are different.
71 // This can come in handy. 69 // This can come in handy.
@@ -108,7 +106,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
108 /// <summary> 106 /// <summary>
109 /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid. 107 /// Check if an entitybase list (like that returned by scene.GetEntities() ) contains a group with the rootpart uuid that matches the current uuid.
110 /// </summary> 108 /// </summary>
111 private bool ContainsKey(List<EntityBase> list, LLUUID uuid) 109 private bool ContainsKey(List<EntityBase> list, UUID uuid)
112 { 110 {
113 foreach( EntityBase part in list) 111 foreach( EntityBase part in list)
114 if (part.UUID == uuid) 112 if (part.UUID == uuid)
@@ -116,7 +114,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
116 return false; 114 return false;
117 } 115 }
118 116
119 private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List<EntityBase> list, LLUUID uuid) 117 private SceneObjectGroup GetGroupByUUID(System.Collections.Generic.List<EntityBase> list, UUID uuid)
120 { 118 {
121 foreach (EntityBase ent in list) 119 foreach (EntityBase ent in list)
122 { 120 {
@@ -150,7 +148,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
150 // if already displaying a red aura over part, make sure its red 148 // if already displaying a red aura over part, make sure its red
151 if (m_AuraEntities.ContainsKey(part.UUID)) 149 if (m_AuraEntities.ContainsKey(part.UUID))
152 { 150 {
153 m_AuraEntities[part.UUID].SetAura(new LLVector3(254,0,0), part.Scale); 151 m_AuraEntities[part.UUID].SetAura(new Vector3(254,0,0), part.Scale);
154 } 152 }
155 else 153 else
156 { 154 {
@@ -158,7 +156,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
158 m_Entity.Scene.PrimIDAllocate(), 156 m_Entity.Scene.PrimIDAllocate(),
159 part.GetWorldPosition(), 157 part.GetWorldPosition(),
160 MetaEntity.TRANSLUCENT, 158 MetaEntity.TRANSLUCENT,
161 new LLVector3(254,0,0), 159 new Vector3(254,0,0),
162 part.Scale 160 part.Scale
163 ); 161 );
164 m_AuraEntities.Add(part.UUID, auraGroup); 162 m_AuraEntities.Add(part.UUID, auraGroup);
@@ -189,7 +187,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
189 /// <summary> 187 /// <summary>
190 /// Check if the revisioned scene object group that this CMEntity is based off of contains a child with the given UUID. 188 /// Check if the revisioned scene object group that this CMEntity is based off of contains a child with the given UUID.
191 /// </summary> 189 /// </summary>
192 public bool HasChildPrim(LLUUID uuid) 190 public bool HasChildPrim(UUID uuid)
193 { 191 {
194 if (m_UnchangedEntity.Children.ContainsKey(uuid)) 192 if (m_UnchangedEntity.Children.ContainsKey(uuid))
195 return true; 193 return true;
@@ -266,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
266 m_UnchangedEntity.RootPart.GetWorldPosition(), 264 m_UnchangedEntity.RootPart.GetWorldPosition(),
267 MetaEntity.TRANSLUCENT, 265 MetaEntity.TRANSLUCENT,
268 sceneEntityPart, 266 sceneEntityPart,
269 new LLVector3(0,0,254) 267 new Vector3(0,0,254)
270 ); 268 );
271 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup); 269 m_BeamEntities.Add(m_UnchangedEntity.RootPart.UUID, beamGroup);
272 } 270 }
@@ -280,7 +278,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
280 m_Entity.Scene.PrimIDAllocate(), 278 m_Entity.Scene.PrimIDAllocate(),
281 UnchangedPart.GetWorldPosition(), 279 UnchangedPart.GetWorldPosition(),
282 MetaEntity.TRANSLUCENT, 280 MetaEntity.TRANSLUCENT,
283 new LLVector3(0,0,254), 281 new Vector3(0,0,254),
284 UnchangedPart.Scale 282 UnchangedPart.Scale
285 ); 283 );
286 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 284 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
@@ -314,7 +312,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
314 m_Entity.Scene.PrimIDAllocate(), 312 m_Entity.Scene.PrimIDAllocate(),
315 UnchangedPart.GetWorldPosition(), 313 UnchangedPart.GetWorldPosition(),
316 MetaEntity.TRANSLUCENT, 314 MetaEntity.TRANSLUCENT,
317 new LLVector3(254,0,0), 315 new Vector3(254,0,0),
318 UnchangedPart.Scale 316 UnchangedPart.Scale
319 ); 317 );
320 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup); 318 m_AuraEntities.Add(UnchangedPart.UUID, auraGroup);
@@ -386,4 +384,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
386 384
387 #endregion Public Methods 385 #endregion Public Methods
388 } 386 }
389} \ No newline at end of file 387}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
index d5423e0..85eb927 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/ContentManagementModule.cs
@@ -36,7 +36,7 @@ using System;
36using System.Collections.Generic; 36using System.Collections.Generic;
37using System.Threading; 37using System.Threading;
38 38
39using libsecondlife; 39using OpenMetaverse;
40 40
41using Nini.Config; 41using Nini.Config;
42 42
@@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager;
48 48
49using log4net; 49using log4net;
50 50
51using Axiom.Math;
52
53namespace OpenSim.Region.Environment.Modules.ContentManagement 51namespace OpenSim.Region.Environment.Modules.ContentManagement
54{ 52{
55 public class ContentManagementModule : IRegionModule 53 public class ContentManagementModule : IRegionModule
@@ -162,4 +160,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
162 160
163 #endregion Public Methods 161 #endregion Public Methods
164 } 162 }
165} \ No newline at end of file 163}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
index c675365..66d279a 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/FileSystemDatabase.cs
@@ -40,7 +40,7 @@ using Slash = System.IO.Path;
40using System.Reflection; 40using System.Reflection;
41using System.Xml; 41using System.Xml;
42 42
43using libsecondlife; 43using OpenMetaverse;
44 44
45using Nini.Config; 45using Nini.Config;
46 46
@@ -53,8 +53,6 @@ using OpenSim.Region.Physics.Manager;
53 53
54using log4net; 54using log4net;
55 55
56using Axiom.Math;
57
58namespace OpenSim.Region.Environment.Modules.ContentManagement 56namespace OpenSim.Region.Environment.Modules.ContentManagement
59{ 57{
60 public class FileSystemDatabase : IContentDatabase 58 public class FileSystemDatabase : IContentDatabase
@@ -70,8 +68,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
70 #region Fields 68 #region Fields
71 69
72 private string m_repodir = null; 70 private string m_repodir = null;
73 private Dictionary<LLUUID, Scene> m_scenes = new Dictionary<LLUUID, Scene>(); 71 private Dictionary<UUID, Scene> m_scenes = new Dictionary<UUID, Scene>();
74 private Dictionary<LLUUID, IRegionSerialiser> m_serialiser = new Dictionary<LLUUID, IRegionSerialiser>(); 72 private Dictionary<UUID, IRegionSerialiser> m_serialiser = new Dictionary<UUID, IRegionSerialiser>();
75 73
76 #endregion Fields 74 #endregion Fields
77 75
@@ -92,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
92 if (!Directory.Exists(m_repodir)) 90 if (!Directory.Exists(m_repodir))
93 Directory.CreateDirectory(m_repodir); 91 Directory.CreateDirectory(m_repodir);
94 92
95 foreach (LLUUID region in m_scenes.Keys) 93 foreach (UUID region in m_scenes.Keys)
96 { 94 {
97 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar; 95 scenedir = m_repodir + Slash.DirectorySeparatorChar + region + Slash.DirectorySeparatorChar;
98 if (!Directory.Exists(scenedir)) 96 if (!Directory.Exists(scenedir))
@@ -104,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
104 private void SetupSerialiser() 102 private void SetupSerialiser()
105 { 103 {
106 if (m_serialiser.Count == 0) 104 if (m_serialiser.Count == 0)
107 foreach(LLUUID region in m_scenes.Keys) 105 foreach(UUID region in m_scenes.Keys)
108 m_serialiser.Add(region, 106 m_serialiser.Add(region,
109 m_scenes[region].RequestModuleInterface<IRegionSerialiser>() 107 m_scenes[region].RequestModuleInterface<IRegionSerialiser>()
110 ); 108 );
@@ -114,12 +112,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
114 112
115 #region Public Methods 113 #region Public Methods
116 114
117 public int GetMostRecentRevision(LLUUID regionid) 115 public int GetMostRecentRevision(UUID regionid)
118 { 116 {
119 return NumOfRegionRev(regionid); 117 return NumOfRegionRev(regionid);
120 } 118 }
121 119
122 public string GetRegionObjectHeightMap(LLUUID regionid) 120 public string GetRegionObjectHeightMap(UUID regionid)
123 { 121 {
124 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 122 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
125 Slash.DirectorySeparatorChar + "heightmap.r32"; 123 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -131,7 +129,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
131 return result; 129 return result;
132 } 130 }
133 131
134 public string GetRegionObjectHeightMap(LLUUID regionid, int revision) 132 public string GetRegionObjectHeightMap(UUID regionid, int revision)
135 { 133 {
136 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid + 134 String filename = m_repodir + Slash.DirectorySeparatorChar + regionid +
137 Slash.DirectorySeparatorChar + "heightmap.r32"; 135 Slash.DirectorySeparatorChar + "heightmap.r32";
@@ -143,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
143 return result; 141 return result;
144 } 142 }
145 143
146 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) 144 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
147 { 145 {
148 System.Collections.ArrayList objectList = new System.Collections.ArrayList(); 146 System.Collections.ArrayList objectList = new System.Collections.ArrayList();
149 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar + 147 string filename = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar +
@@ -169,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
169 return null; 167 return null;
170 } 168 }
171 169
172 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) 170 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid)
173 { 171 {
174 int revision = NumOfRegionRev(regionid); 172 int revision = NumOfRegionRev(regionid);
175 m_log.Info("[FSDB]: found revisions:" + revision); 173 m_log.Info("[FSDB]: found revisions:" + revision);
@@ -215,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
215 m_scenes.Add(scene.RegionInfo.RegionID, scene); 213 m_scenes.Add(scene.RegionInfo.RegionID, scene);
216 } 214 }
217 215
218 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID regionid) 216 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID regionid)
219 { 217 {
220 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>(); 218 SortedDictionary<string, string> revisionDict = new SortedDictionary<string,string>();
221 219
@@ -244,7 +242,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
244 return revisionDict; 242 return revisionDict;
245 } 243 }
246 244
247 public int NumOfRegionRev(LLUUID regionid) 245 public int NumOfRegionRev(UUID regionid)
248 { 246 {
249 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 247 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
250 m_log.Info("[FSDB]: Reading scene dir: " + scenedir); 248 m_log.Info("[FSDB]: Reading scene dir: " + scenedir);
@@ -261,7 +259,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
261 CreateDirectory(); 259 CreateDirectory();
262 } 260 }
263 261
264 public void SaveRegion(LLUUID regionid, string regionName, string logMessage) 262 public void SaveRegion(UUID regionid, string regionName, string logMessage)
265 { 263 {
266 m_log.Info("[FSDB]: ..............................."); 264 m_log.Info("[FSDB]: ...............................");
267 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar; 265 string scenedir = m_repodir + Slash.DirectorySeparatorChar + regionid + Slash.DirectorySeparatorChar;
@@ -311,4 +309,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
311 309
312 #endregion Public Methods 310 #endregion Public Methods
313 } 311 }
314} \ No newline at end of file 312}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
index 6417a0f..9fd542c 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/GitDatabase.cs
@@ -41,7 +41,7 @@ using Slash = System.IO.Path;
41using System.Reflection; 41using System.Reflection;
42using System.Xml; 42using System.Xml;
43 43
44using libsecondlife; 44using OpenMetaverse;
45 45
46using Nini.Config; 46using Nini.Config;
47 47
@@ -54,8 +54,6 @@ using OpenSim.Region.Physics.Manager;
54 54
55using log4net; 55using log4net;
56 56
57using Axiom.Math;
58
59namespace OpenSim.Region.Environment.Modules.ContentManagement 57namespace OpenSim.Region.Environment.Modules.ContentManagement
60{ 58{
61 /// <summary> 59 /// <summary>
@@ -73,57 +71,57 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
73 71
74 #region Public Methods 72 #region Public Methods
75 73
76 public SceneObjectGroup GetMostRecentObjectRevision(LLUUID id) 74 public SceneObjectGroup GetMostRecentObjectRevision(UUID id)
77 { 75 {
78 return null; 76 return null;
79 } 77 }
80 78
81 public int GetMostRecentRevision(LLUUID regionid) 79 public int GetMostRecentRevision(UUID regionid)
82 { 80 {
83 return 0; 81 return 0;
84 } 82 }
85 83
86 public SceneObjectGroup GetObjectRevision(LLUUID id, int revision) 84 public SceneObjectGroup GetObjectRevision(UUID id, int revision)
87 { 85 {
88 return null; 86 return null;
89 } 87 }
90 88
91 public System.Collections.ArrayList GetObjectsFromRegion(LLUUID regionid, int revision) 89 public System.Collections.ArrayList GetObjectsFromRegion(UUID regionid, int revision)
92 { 90 {
93 return null; 91 return null;
94 } 92 }
95 93
96 public string GetRegionObjectHeightMap(LLUUID regionid) 94 public string GetRegionObjectHeightMap(UUID regionid)
97 { 95 {
98 return null; 96 return null;
99 } 97 }
100 98
101 public string GetRegionObjectHeightMap(LLUUID regionid, int revision) 99 public string GetRegionObjectHeightMap(UUID regionid, int revision)
102 { 100 {
103 return null; 101 return null;
104 } 102 }
105 103
106 public string GetRegionObjectXML(LLUUID regionid) 104 public string GetRegionObjectXML(UUID regionid)
107 { 105 {
108 return null; 106 return null;
109 } 107 }
110 108
111 public string GetRegionObjectXML(LLUUID regionid, int revision) 109 public string GetRegionObjectXML(UUID regionid, int revision)
112 { 110 {
113 return null; 111 return null;
114 } 112 }
115 113
116 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid) 114 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid)
117 { 115 {
118 return null; 116 return null;
119 } 117 }
120 118
121 public System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision) 119 public System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision)
122 { 120 {
123 return null; 121 return null;
124 } 122 }
125 123
126 public bool InRepository(LLUUID id) 124 public bool InRepository(UUID id)
127 { 125 {
128 return false; 126 return false;
129 } 127 }
@@ -132,22 +130,22 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
132 { 130 {
133 } 131 }
134 132
135 public System.Collections.Generic.SortedDictionary<string, string> ListOfObjectRevisions(LLUUID id) 133 public System.Collections.Generic.SortedDictionary<string, string> ListOfObjectRevisions(UUID id)
136 { 134 {
137 return null; 135 return null;
138 } 136 }
139 137
140 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID id) 138 public System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID id)
141 { 139 {
142 return null; 140 return null;
143 } 141 }
144 142
145 public int NumOfObjectRev(LLUUID id) 143 public int NumOfObjectRev(UUID id)
146 { 144 {
147 return 0; 145 return 0;
148 } 146 }
149 147
150 public int NumOfRegionRev(LLUUID regionid) 148 public int NumOfRegionRev(UUID regionid)
151 { 149 {
152 return 0; 150 return 0;
153 } 151 }
@@ -160,10 +158,10 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
160 { 158 {
161 } 159 }
162 160
163 public void SaveRegion(LLUUID regionid, string regionName, string logMessage) 161 public void SaveRegion(UUID regionid, string regionName, string logMessage)
164 { 162 {
165 } 163 }
166 164
167 #endregion Public Methods 165 #endregion Public Methods
168 } 166 }
169} \ No newline at end of file 167}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
index 6a940d3..638172b 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/IContentDatabase.cs
@@ -36,11 +36,8 @@
36#endregion Header 36#endregion Header
37 37
38using System; 38using System;
39 39using OpenMetaverse;
40using libsecondlife;
41
42using OpenSim.Region.Environment.Scenes; 40using OpenSim.Region.Environment.Scenes;
43
44using Nini.Config; 41using Nini.Config;
45 42
46namespace OpenSim.Region.Environment.Modules.ContentManagement 43namespace OpenSim.Region.Environment.Modules.ContentManagement
@@ -52,18 +49,18 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
52 /// <summary> 49 /// <summary>
53 /// Returns the most recent revision number of a region. 50 /// Returns the most recent revision number of a region.
54 /// </summary> 51 /// </summary>
55 int GetMostRecentRevision(LLUUID regionid); 52 int GetMostRecentRevision(UUID regionid);
56 53
57 string GetRegionObjectHeightMap(LLUUID regionid); 54 string GetRegionObjectHeightMap(UUID regionid);
58 55
59 string GetRegionObjectHeightMap(LLUUID regionid, int revision); 56 string GetRegionObjectHeightMap(UUID regionid, int revision);
60 57
61 /// <summary> 58 /// <summary>
62 /// Retrieves the xml that describes each individual object from the last revision or specific revision of the given region. 59 /// Retrieves the xml that describes each individual object from the last revision or specific revision of the given region.
63 /// </summary> 60 /// </summary>
64 System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid); 61 System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid);
65 62
66 System.Collections.ArrayList GetRegionObjectXMLList(LLUUID regionid, int revision); 63 System.Collections.ArrayList GetRegionObjectXMLList(UUID regionid, int revision);
67 64
68 /// <summary> 65 /// <summary>
69 /// Similar to the IRegionModule function. This is the function to be called before attempting to interface with the database. 66 /// Similar to the IRegionModule function. This is the function to be called before attempting to interface with the database.
@@ -75,12 +72,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
75 /// <summary> 72 /// <summary>
76 /// Returns a list of the revision numbers and corresponding log messages for a given region. 73 /// Returns a list of the revision numbers and corresponding log messages for a given region.
77 /// </summary> 74 /// </summary>
78 System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(LLUUID id); 75 System.Collections.Generic.SortedDictionary<string, string> ListOfRegionRevisions(UUID id);
79 76
80 /// <summary> 77 /// <summary>
81 /// Returns the total number of revisions saved for a specific region. 78 /// Returns the total number of revisions saved for a specific region.
82 /// </summary> 79 /// </summary>
83 int NumOfRegionRev(LLUUID regionid); 80 int NumOfRegionRev(UUID regionid);
84 81
85 /// <summary> 82 /// <summary>
86 /// Should be called once after Initialise has been called. 83 /// Should be called once after Initialise has been called.
@@ -90,8 +87,8 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
90 /// <summary> 87 /// <summary>
91 /// Saves the Region terrain map and objects within the region as xml to the database. 88 /// Saves the Region terrain map and objects within the region as xml to the database.
92 /// </summary> 89 /// </summary>
93 void SaveRegion(LLUUID regionid, string regionName, string logMessage); 90 void SaveRegion(UUID regionid, string regionName, string logMessage);
94 91
95 #endregion Methods 92 #endregion Methods
96 } 93 }
97} \ No newline at end of file 94}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
index 4823bfd..5a6dbc8 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/MetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,8 +50,6 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class MetaEntity 55 public class MetaEntity
@@ -109,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
109 107
110 #region Public Properties 108 #region Public Properties
111 109
112 public Dictionary<LLUUID, SceneObjectPart> Children 110 public Dictionary<UUID, SceneObjectPart> Children
113 { 111 {
114 get { return m_Entity.Children; } 112 get { return m_Entity.Children; }
115 set { m_Entity.Children = value; } 113 set { m_Entity.Children = value; }
@@ -142,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
142 get { return m_Entity.Scene; } 140 get { return m_Entity.Scene; }
143 } 141 }
144 142
145 public LLUUID UUID 143 public UUID UUID
146 { 144 {
147 get { return m_Entity.UUID; } 145 get { return m_Entity.UUID; }
148 set { m_Entity.UUID = value; } 146 set { m_Entity.UUID = value; }
@@ -161,7 +159,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
161 protected void Initialize(bool physics) 159 protected void Initialize(bool physics)
162 { 160 {
163 //make new uuids 161 //make new uuids
164 Dictionary<LLUUID, SceneObjectPart> parts = new Dictionary<LLUUID, SceneObjectPart>(); 162 Dictionary<UUID, SceneObjectPart> parts = new Dictionary<UUID, SceneObjectPart>();
165 foreach(SceneObjectPart part in m_Entity.Children.Values) 163 foreach(SceneObjectPart part in m_Entity.Children.Values)
166 { 164 {
167 part.ResetIDs(part.LinkNum); 165 part.ResetIDs(part.LinkNum);
@@ -191,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
191 //This is important because we are not IN any database. 189 //This is important because we are not IN any database.
192 //m_Entity.FakeDeleteGroup(); 190 //m_Entity.FakeDeleteGroup();
193 foreach( SceneObjectPart part in m_Entity.Children.Values) 191 foreach( SceneObjectPart part in m_Entity.Children.Values)
194 client.SendKillObject(m_Entity.RegionHandle, part.LocalId); 192 client.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId);
195 } 193 }
196 194
197 /// <summary> 195 /// <summary>
@@ -201,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
201 { 199 {
202 foreach( SceneObjectPart part in m_Entity.Children.Values) 200 foreach( SceneObjectPart part in m_Entity.Children.Values)
203 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller) 201 m_Entity.Scene.ClientManager.ForEachClient(delegate(IClientAPI controller)
204 { controller.SendKillObject(m_Entity.RegionHandle, part.LocalId); } 202 { controller.SendKiPrimitive(m_Entity.RegionHandle, part.LocalId); }
205 ); 203 );
206 } 204 }
207 205
@@ -237,12 +235,12 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
237 /// </param> 235 /// </param>
238 public static void SetPartTransparency(SceneObjectPart part, float transparencyAmount) 236 public static void SetPartTransparency(SceneObjectPart part, float transparencyAmount)
239 { 237 {
240 LLObject.TextureEntry tex = null; 238 Primitive.TextureEntry tex = null;
241 LLColor texcolor; 239 Color4 texcolor;
242 try 240 try
243 { 241 {
244 tex = part.Shape.Textures; 242 tex = part.Shape.Textures;
245 texcolor = new LLColor(); 243 texcolor = new Color4();
246 } 244 }
247 catch(Exception) 245 catch(Exception)
248 { 246 {
@@ -280,4 +278,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
280 278
281 #endregion Public Methods 279 #endregion Public Methods
282 } 280 }
283} \ No newline at end of file 281}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
index cafc2bf..b0c6955 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/PointMetaEntity.cs
@@ -39,7 +39,7 @@ using System;
39using System.Collections.Generic; 39using System.Collections.Generic;
40using System.Drawing; 40using System.Drawing;
41 41
42using libsecondlife; 42using OpenMetaverse;
43 43
44using Nini.Config; 44using Nini.Config;
45 45
@@ -50,22 +50,20 @@ using OpenSim.Region.Physics.Manager;
50 50
51using log4net; 51using log4net;
52 52
53using Axiom.Math;
54
55namespace OpenSim.Region.Environment.Modules.ContentManagement 53namespace OpenSim.Region.Environment.Modules.ContentManagement
56{ 54{
57 public class PointMetaEntity : MetaEntity 55 public class PointMetaEntity : MetaEntity
58 { 56 {
59 #region Constructors 57 #region Constructors
60 58
61 public PointMetaEntity(Scene scene, uint LocalId, LLVector3 groupPos, float transparency) 59 public PointMetaEntity(Scene scene, uint LocalId, Vector3 groupPos, float transparency)
62 : base() 60 : base()
63 { 61 {
64 CreatePointEntity(scene, LLUUID.Random(), LocalId, groupPos); 62 CreatePointEntity(scene, UUID.Random(), LocalId, groupPos);
65 SetPartTransparency(m_Entity.RootPart, transparency); 63 SetPartTransparency(m_Entity.RootPart, transparency);
66 } 64 }
67 65
68 public PointMetaEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos, float transparency) 66 public PointMetaEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos, float transparency)
69 : base() 67 : base()
70 { 68 {
71 CreatePointEntity(scene, uuid, LocalId, groupPos); 69 CreatePointEntity(scene, uuid, LocalId, groupPos);
@@ -76,7 +74,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
76 74
77 #region Private Methods 75 #region Private Methods
78 76
79 private void CreatePointEntity(Scene scene, LLUUID uuid, uint LocalId, LLVector3 groupPos) 77 private void CreatePointEntity(Scene scene, UUID uuid, uint LocalId, Vector3 groupPos)
80 { 78 {
81 SceneObjectGroup x = new SceneObjectGroup(); 79 SceneObjectGroup x = new SceneObjectGroup();
82 SceneObjectPart y = new SceneObjectPart(); 80 SceneObjectPart y = new SceneObjectPart();
@@ -85,23 +83,23 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
85 y.Name = "Very Small Point"; 83 y.Name = "Very Small Point";
86 y.RegionHandle = scene.RegionInfo.RegionHandle; 84 y.RegionHandle = scene.RegionInfo.RegionHandle;
87 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds; 85 y.CreationDate = (Int32) (DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
88 y.OwnerID = LLUUID.Zero; 86 y.OwnerID = UUID.Zero;
89 y.CreatorID = LLUUID.Zero; 87 y.CreatorID = UUID.Zero;
90 y.LastOwnerID = LLUUID.Zero; 88 y.LastOwnerID = UUID.Zero;
91 y.UUID = uuid; 89 y.UUID = uuid;
92 90
93 y.LocalId = LocalId; 91 y.LocalId = LocalId;
94 92
95 y.Shape = PrimitiveBaseShape.CreateBox(); 93 y.Shape = PrimitiveBaseShape.CreateBox();
96 y.Scale = new LLVector3(0.01f,0.01f,0.01f); 94 y.Scale = new Vector3(0.01f,0.01f,0.01f);
97 y.LastOwnerID = LLUUID.Zero; 95 y.LastOwnerID = UUID.Zero;
98 y.GroupPosition = groupPos; 96 y.GroupPosition = groupPos;
99 y.OffsetPosition = new LLVector3(0, 0, 0); 97 y.OffsetPosition = new Vector3(0, 0, 0);
100 y.RotationOffset = new LLQuaternion(0,0,0,0); 98 y.RotationOffset = new Quaternion(0,0,0,0);
101 y.Velocity = new LLVector3(0, 0, 0); 99 y.Velocity = new Vector3(0, 0, 0);
102 y.RotationalVelocity = new LLVector3(0, 0, 0); 100 y.RotationalVelocity = new Vector3(0, 0, 0);
103 y.AngularVelocity = new LLVector3(0, 0, 0); 101 y.AngularVelocity = new Vector3(0, 0, 0);
104 y.Acceleration = new LLVector3(0, 0, 0); 102 y.Acceleration = new Vector3(0, 0, 0);
105 103
106 y.Flags = 0; 104 y.Flags = 0;
107 y.TrimPermissions(); 105 y.TrimPermissions();
@@ -121,4 +119,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
121 119
122 #endregion Private Methods 120 #endregion Private Methods
123 } 121 }
124} \ No newline at end of file 122}
diff --git a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
index 38938c6..ba937f5 100644
--- a/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
+++ b/OpenSim/Region/Environment/Modules/ContentManagementSystem/SceneObjectGroupDiff.cs
@@ -37,7 +37,7 @@ using System.Collections.Generic;
37using System.Diagnostics; 37using System.Diagnostics;
38using System.Drawing; 38using System.Drawing;
39 39
40using libsecondlife; 40using OpenMetaverse;
41 41
42using Nini.Config; 42using Nini.Config;
43 43
@@ -48,8 +48,6 @@ using OpenSim.Region.Physics.Manager;
48 48
49using log4net; 49using log4net;
50 50
51using Axiom.Math;
52
53namespace OpenSim.Region.Environment.Modules.ContentManagement 51namespace OpenSim.Region.Environment.Modules.ContentManagement
54{ 52{
55 #region Enumerations 53 #region Enumerations
@@ -99,14 +97,14 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
99 97
100 #region Private Methods 98 #region Private Methods
101 99
102 private static bool AreQuaternionsEquivalent(LLQuaternion first, LLQuaternion second) 100 private static bool AreQuaternionsEquivalent(Quaternion first, Quaternion second)
103 { 101 {
104 LLVector3 firstVector = llRot2Euler(first); 102 Vector3 firstVector = llRot2Euler(first);
105 LLVector3 secondVector = llRot2Euler(second); 103 Vector3 secondVector = llRot2Euler(second);
106 return AreVectorsEquivalent(firstVector, secondVector); 104 return AreVectorsEquivalent(firstVector, secondVector);
107 } 105 }
108 106
109 private static bool AreVectorsEquivalent(LLVector3 first, LLVector3 second) 107 private static bool AreVectorsEquivalent(Vector3 first, Vector3 second)
110 { 108 {
111 if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2) 109 if(TruncateSignificant(first.X, 2) == TruncateSignificant(second.X, 2)
112 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2) 110 && TruncateSignificant(first.Y, 2) == TruncateSignificant(second.Y, 2)
@@ -133,21 +131,21 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
133 131
134 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs 132 // Taken from Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
135 // Also changed the original function from LSL_Types to LL types 133 // Also changed the original function from LSL_Types to LL types
136 private static LLVector3 llRot2Euler(LLQuaternion r) 134 private static Vector3 llRot2Euler(Quaternion r)
137 { 135 {
138 LLQuaternion t = new LLQuaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W); 136 Quaternion t = new Quaternion(r.X * r.X, r.Y * r.Y, r.Z * r.Z, r.W * r.W);
139 double m = (t.X + t.Y + t.Z + t.W); 137 double m = (t.X + t.Y + t.Z + t.W);
140 if (m == 0) return new LLVector3(); 138 if (m == 0) return new Vector3();
141 double n = 2 * (r.Y * r.W + r.X * r.Z); 139 double n = 2 * (r.Y * r.W + r.X * r.Z);
142 double p = m * m - n * n; 140 double p = m * m - n * n;
143 if (p > 0) 141 if (p > 0)
144 return new LLVector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))), 142 return new Vector3((float)NormalizeAngle(Math.Atan2(2.0 * (r.X * r.W - r.Y * r.Z), (-t.X - t.Y + t.Z + t.W))),
145 (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))), 143 (float)NormalizeAngle(Math.Atan2(n, Math.Sqrt(p))),
146 (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W)))); 144 (float)NormalizeAngle(Math.Atan2(2.0 * (r.Z * r.W - r.X * r.Y), (t.X - t.Y - t.Z + t.W))));
147 else if (n > 0) 145 else if (n > 0)
148 return new LLVector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); 146 return new Vector3(0.0f, (float)(Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z)));
149 else 147 else
150 return new LLVector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z))); 148 return new Vector3(0.0f, (float)(-Math.PI / 2), (float)NormalizeAngle(Math.Atan2((r.Z * r.W + r.X * r.Y), 0.5 - t.X - t.Z)));
151 } 149 }
152 150
153 #endregion Private Methods 151 #endregion Private Methods
@@ -187,7 +185,7 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
187 result |= Diff.ROTATIONOFFSET; 185 result |= Diff.ROTATIONOFFSET;
188 186
189 187
190 // MISC COMPARISONS (LLUUID, Byte) 188 // MISC COMPARISONS (UUID, Byte)
191 if(first.ClickAction != second.ClickAction) 189 if(first.ClickAction != second.ClickAction)
192 result |= Diff.CLICKACTION; 190 result |= Diff.CLICKACTION;
193 if(first.ObjectOwner != second.ObjectOwner) 191 if(first.ObjectOwner != second.ObjectOwner)
@@ -217,4 +215,4 @@ namespace OpenSim.Region.Environment.Modules.ContentManagement
217 215
218 #endregion Public Methods 216 #endregion Public Methods
219 } 217 }
220} \ No newline at end of file 218}
diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
index 8fad62f..8fd4104 100644
--- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -37,8 +37,8 @@ using System.Reflection;
37using System.Text.RegularExpressions; 37using System.Text.RegularExpressions;
38using System.Threading; 38using System.Threading;
39 39
40using libsecondlife; 40using OpenMetaverse;
41using libsecondlife.StructuredData; 41using OpenMetaverse.StructuredData;
42 42
43using log4net; 43using log4net;
44using Nini.Config; 44using Nini.Config;
@@ -50,9 +50,9 @@ using OpenSim.Region.Environment.Scenes;
50using OpenSim.Framework.Communications.Cache; 50using OpenSim.Framework.Communications.Cache;
51using OpenSim.Framework.Communications.Capabilities; 51using OpenSim.Framework.Communications.Capabilities;
52using OpenSim.Framework.Statistics; 52using OpenSim.Framework.Statistics;
53using LLSD = libsecondlife.StructuredData.LLSD; 53using LLSD = OpenMetaverse.StructuredData.LLSD;
54using LLSDMap = libsecondlife.StructuredData.LLSDMap; 54using LLSDMap = OpenMetaverse.StructuredData.LLSDMap;
55using LLSDArray = libsecondlife.StructuredData.LLSDArray; 55using LLSDArray = OpenMetaverse.StructuredData.LLSDArray;
56 56
57namespace OpenSim.Region.Environment.Modules.InterGrid 57namespace OpenSim.Region.Environment.Modules.InterGrid
58{ 58{
@@ -60,12 +60,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
60 { 60 {
61 public string first_name; 61 public string first_name;
62 public string last_name; 62 public string last_name;
63 public LLUUID agent_id; 63 public UUID agent_id;
64 public LLUUID local_agent_id; 64 public UUID local_agent_id;
65 public LLUUID region_id; 65 public UUID region_id;
66 public uint circuit_code; 66 public uint circuit_code;
67 public LLUUID secure_session_id; 67 public UUID secure_session_id;
68 public LLUUID session_id; 68 public UUID session_id;
69 public bool agent_access; 69 public bool agent_access;
70 public string sim_access; 70 public string sim_access;
71 public uint god_level; 71 public uint god_level;
@@ -89,7 +89,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
89 private List<Scene> m_scene = new List<Scene>(); 89 private List<Scene> m_scene = new List<Scene>();
90 90
91 private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>(); 91 private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>();
92 private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>(); 92 private Dictionary<UUID, OGPState> m_OGPState = new Dictionary<UUID, OGPState>();
93 private string LastNameSuffix = "_EXTERNAL"; 93 private string LastNameSuffix = "_EXTERNAL";
94 private string FirstNamePrefix = ""; 94 private string FirstNamePrefix = "";
95 95
@@ -231,10 +231,10 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
231 //string RegionURI = reg.ServerURI; 231 //string RegionURI = reg.ServerURI;
232 //int RegionPort = (int)reg.HttpPort; 232 //int RegionPort = (int)reg.HttpPort;
233 233
234 LLUUID RemoteAgentID = requestMap["agent_id"].AsUUID(); 234 UUID RemoteAgentID = requestMap["agent_id"].AsUUID();
235 235
236 // will be used in the future. The client always connects with the aditi agentid currently 236 // will be used in the future. The client always connects with the aditi agentid currently
237 LLUUID LocalAgentID = RemoteAgentID; 237 UUID LocalAgentID = RemoteAgentID;
238 238
239 string FirstName = requestMap["first_name"].AsString(); 239 string FirstName = requestMap["first_name"].AsString();
240 string LastName = requestMap["last_name"].AsString(); 240 string LastName = requestMap["last_name"].AsString();
@@ -274,15 +274,15 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
274 // Generate a dummy agent for the user so we can get back a CAPS path 274 // Generate a dummy agent for the user so we can get back a CAPS path
275 AgentCircuitData agentData = new AgentCircuitData(); 275 AgentCircuitData agentData = new AgentCircuitData();
276 agentData.AgentID = LocalAgentID; 276 agentData.AgentID = LocalAgentID;
277 agentData.BaseFolder=LLUUID.Zero; 277 agentData.BaseFolder=UUID.Zero;
278 agentData.CapsPath=Util.GetRandomCapsPath(); 278 agentData.CapsPath=Util.GetRandomCapsPath();
279 agentData.child = false; 279 agentData.child = false;
280 agentData.circuitcode = (uint)(Util.RandomClass.Next()); 280 agentData.circuitcode = (uint)(Util.RandomClass.Next());
281 agentData.firstname = FirstName; 281 agentData.firstname = FirstName;
282 agentData.lastname = LastName; 282 agentData.lastname = LastName;
283 agentData.SecureSessionID=LLUUID.Random(); 283 agentData.SecureSessionID=UUID.Random();
284 agentData.SessionID=LLUUID.Random(); 284 agentData.SessionID=UUID.Random();
285 agentData.startpos = new LLVector3(128f, 128f, 100f); 285 agentData.startpos = new Vector3(128f, 128f, 100f);
286 286
287 // Pre-Fill our region cache with information on the agent. 287 // Pre-Fill our region cache with information on the agent.
288 UserAgentData useragent = new UserAgentData(); 288 UserAgentData useragent = new UserAgentData();
@@ -308,14 +308,14 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
308 userProfile.CurrentAgent = useragent; 308 userProfile.CurrentAgent = useragent;
309 userProfile.CustomType = "OGP"; 309 userProfile.CustomType = "OGP";
310 userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol"; 310 userProfile.FirstLifeAboutText = "I'm testing OpenGrid Protocol";
311 userProfile.FirstLifeImage = LLUUID.Zero; 311 userProfile.FirstLifeImage = UUID.Zero;
312 userProfile.FirstName = agentData.firstname; 312 userProfile.FirstName = agentData.firstname;
313 userProfile.GodLevel = 0; 313 userProfile.GodLevel = 0;
314 userProfile.HomeLocation = agentData.startpos; 314 userProfile.HomeLocation = agentData.startpos;
315 userProfile.HomeLocationX = agentData.startpos.X; 315 userProfile.HomeLocationX = agentData.startpos.X;
316 userProfile.HomeLocationY = agentData.startpos.Y; 316 userProfile.HomeLocationY = agentData.startpos.Y;
317 userProfile.HomeLocationZ = agentData.startpos.Z; 317 userProfile.HomeLocationZ = agentData.startpos.Z;
318 userProfile.HomeLookAt = LLVector3.Zero; 318 userProfile.HomeLookAt = Vector3.Zero;
319 userProfile.HomeLookAtX = userProfile.HomeLookAt.X; 319 userProfile.HomeLookAtX = userProfile.HomeLookAt.X;
320 userProfile.HomeLookAtY = userProfile.HomeLookAt.Y; 320 userProfile.HomeLookAtY = userProfile.HomeLookAt.Y;
321 userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z; 321 userProfile.HomeLookAtZ = userProfile.HomeLookAt.Z;
@@ -324,18 +324,18 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
324 userProfile.HomeRegionX = reg.RegionLocX; 324 userProfile.HomeRegionX = reg.RegionLocX;
325 userProfile.HomeRegionY = reg.RegionLocY; 325 userProfile.HomeRegionY = reg.RegionLocY;
326 userProfile.ID = agentData.AgentID; 326 userProfile.ID = agentData.AgentID;
327 userProfile.Image = LLUUID.Zero; 327 userProfile.Image = UUID.Zero;
328 userProfile.LastLogin = Util.UnixTimeSinceEpoch(); 328 userProfile.LastLogin = Util.UnixTimeSinceEpoch();
329 userProfile.Partner = LLUUID.Zero; 329 userProfile.Partner = UUID.Zero;
330 userProfile.PasswordHash = "$1$"; 330 userProfile.PasswordHash = "$1$";
331 userProfile.PasswordSalt = ""; 331 userProfile.PasswordSalt = "";
332 userProfile.RootInventoryFolderID = LLUUID.Zero; 332 userProfile.RootInventoryFolderID = UUID.Zero;
333 userProfile.SurName = agentData.lastname; 333 userProfile.SurName = agentData.lastname;
334 userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL; 334 userProfile.UserAssetURI = homeScene.CommsManager.NetworkServersInfo.AssetURL;
335 userProfile.UserFlags = 0; 335 userProfile.UserFlags = 0;
336 userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL; 336 userProfile.UserInventoryURI = homeScene.CommsManager.NetworkServersInfo.InventoryURL;
337 userProfile.WantDoMask = 0; 337 userProfile.WantDoMask = 0;
338 userProfile.WebLoginKey = LLUUID.Random(); 338 userProfile.WebLoginKey = UUID.Random();
339 339
340 // Do caps registration 340 // Do caps registration
341 // get seed cap 341 // get seed cap
@@ -348,7 +348,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
348 348
349 //string raCap = string.Empty; 349 //string raCap = string.Empty;
350 350
351 LLUUID AvatarRezCapUUID = LLUUID.Random(); 351 UUID AvatarRezCapUUID = UUID.Random();
352 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar"; 352 string rezAvatarPath = "/agent/" + AvatarRezCapUUID + "/rez_avatar";
353 353
354 // Get a reference to the user's cap so we can pull out the Caps Object Path 354 // Get a reference to the user's cap so we can pull out the Caps Object Path
@@ -389,8 +389,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
389 LLSDMap requestMap = (LLSDMap)request; 389 LLSDMap requestMap = (LLSDMap)request;
390 390
391 // take these values to start. There's a few more 391 // take these values to start. There's a few more
392 LLUUID SecureSessionID=requestMap["secure_session_id"].AsUUID(); 392 UUID SecureSessionID=requestMap["secure_session_id"].AsUUID();
393 LLUUID SessionID = requestMap["session_id"].AsUUID(); 393 UUID SessionID = requestMap["session_id"].AsUUID();
394 int circuitcode = requestMap["circuit_code"].AsInteger(); 394 int circuitcode = requestMap["circuit_code"].AsInteger();
395 LLSDArray Parameter = new LLSDArray(); 395 LLSDArray Parameter = new LLSDArray();
396 if (requestMap.ContainsKey("parameter")) 396 if (requestMap.ContainsKey("parameter"))
@@ -401,7 +401,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
401 //int version = 1; 401 //int version = 1;
402 int estateID = 1; 402 int estateID = 1;
403 int parentEstateID = 1; 403 int parentEstateID = 1;
404 LLUUID regionID = LLUUID.Zero; 404 UUID regionID = UUID.Zero;
405 bool visibleToParent = true; 405 bool visibleToParent = true;
406 406
407 for (int i = 0; i < Parameter.Count; i++) 407 for (int i = 0; i < Parameter.Count; i++)
@@ -537,17 +537,17 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
537 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]); 537 m_log.InfoFormat("[OGP]: prefix {0}, uuid {1}, suffix {2}", PathArray[1], PathArray[2], PathArray[3]);
538 string uuidString = PathArray[2]; 538 string uuidString = PathArray[2];
539 m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString); 539 m_log.InfoFormat("[OGP]: Request to Derez avatar with UUID {0}", uuidString);
540 LLUUID userUUID = LLUUID.Zero; 540 UUID userUUID = UUID.Zero;
541 if (Helpers.TryParse(uuidString, out userUUID)) 541 if (UUID.TryParse(uuidString, out userUUID))
542 { 542 {
543 LLUUID RemoteID = uuidString; 543 UUID RemoteID = uuidString;
544 LLUUID LocalID = RemoteID; 544 UUID LocalID = RemoteID;
545 // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds 545 // FIXME: TODO: Routine to map RemoteUUIDs to LocalUUIds
546 // would be done already.. but the client connects with the Aditi UUID 546 // would be done already.. but the client connects with the Aditi UUID
547 // regardless over the UDP stack 547 // regardless over the UDP stack
548 548
549 OGPState userState = GetOGPState(LocalID); 549 OGPState userState = GetOGPState(LocalID);
550 if (userState.agent_id != LLUUID.Zero) 550 if (userState.agent_id != UUID.Zero)
551 { 551 {
552 //LLSDMap outboundRequestMap = new LLSDMap(); 552 //LLSDMap outboundRequestMap = new LLSDMap();
553 LLSDMap inboundRequestMap = (LLSDMap)request; 553 LLSDMap inboundRequestMap = (LLSDMap)request;
@@ -592,7 +592,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
592 int rrX = rezResponseMap["region_x"].AsInteger(); 592 int rrX = rezResponseMap["region_x"].AsInteger();
593 int rrY = rezResponseMap["region_y"].AsInteger(); 593 int rrY = rezResponseMap["region_y"].AsInteger();
594 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY); 594 m_log.ErrorFormat("X:{0}, Y:{1}", rrX, rrY);
595 LLUUID rrRID = rezResponseMap["region_id"].AsUUID(); 595 UUID rrRID = rezResponseMap["region_id"].AsUUID();
596 596
597 string rrAccess = rezResponseMap["sim_access"].AsString(); 597 string rrAccess = rezResponseMap["sim_access"].AsString();
598 598
@@ -802,12 +802,12 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
802 OGPState returnState = new OGPState(); 802 OGPState returnState = new OGPState();
803 returnState.first_name = ""; 803 returnState.first_name = "";
804 returnState.last_name = ""; 804 returnState.last_name = "";
805 returnState.agent_id = LLUUID.Zero; 805 returnState.agent_id = UUID.Zero;
806 returnState.local_agent_id = LLUUID.Zero; 806 returnState.local_agent_id = UUID.Zero;
807 returnState.region_id = LLUUID.Zero; 807 returnState.region_id = UUID.Zero;
808 returnState.circuit_code = 0; 808 returnState.circuit_code = 0;
809 returnState.secure_session_id = LLUUID.Zero; 809 returnState.secure_session_id = UUID.Zero;
810 returnState.session_id = LLUUID.Zero; 810 returnState.session_id = UUID.Zero;
811 returnState.agent_access = true; 811 returnState.agent_access = true;
812 returnState.god_level = 0; 812 returnState.god_level = 0;
813 returnState.god_overide = false; 813 returnState.god_overide = false;
@@ -827,7 +827,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
827 return returnState; 827 return returnState;
828 } 828 }
829 829
830 private OGPState GetOGPState(LLUUID agentId) 830 private OGPState GetOGPState(UUID agentId)
831 { 831 {
832 lock (m_OGPState) 832 lock (m_OGPState)
833 { 833 {
@@ -842,7 +842,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
842 } 842 }
843 } 843 }
844 844
845 public void DeleteOGPState(LLUUID agentId) 845 public void DeleteOGPState(UUID agentId)
846 { 846 {
847 lock (m_OGPState) 847 lock (m_OGPState)
848 { 848 {
@@ -851,7 +851,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
851 } 851 }
852 } 852 }
853 853
854 private void UpdateOGPState(LLUUID agentId, OGPState state) 854 private void UpdateOGPState(UUID agentId, OGPState state)
855 { 855 {
856 lock (m_OGPState) 856 lock (m_OGPState)
857 { 857 {
@@ -866,7 +866,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
866 } 866 }
867 } 867 }
868 868
869 public void ShutdownConnection(LLUUID avatarId, OpenGridProtocolModule mod) 869 public void ShutdownConnection(UUID avatarId, OpenGridProtocolModule mod)
870 { 870 {
871 Scene homeScene = GetRootScene(); 871 Scene homeScene = GetRootScene();
872 ScenePresence avatar = null; 872 ScenePresence avatar = null;
@@ -905,7 +905,7 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
905 905
906 public void ShutdownNoLogout() 906 public void ShutdownNoLogout()
907 { 907 {
908 LLUUID avUUID = LLUUID.Zero; 908 UUID avUUID = UUID.Zero;
909 909
910 if (avToBeKilled != null) 910 if (avToBeKilled != null)
911 { 911 {
diff --git a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
index 15ce584..59d29d6 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -29,9 +29,9 @@ using System;
29using System.Collections.Generic; 29using System.Collections.Generic;
30using System.Drawing; 30using System.Drawing;
31using System.Drawing.Imaging; 31using System.Drawing.Imaging;
32using libsecondlife; 32using OpenMetaverse;
33using OpenMetaverse.Imaging;
33using Nini.Config; 34using Nini.Config;
34using OpenJPEGNet;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
37using OpenSim.Region.Environment.Scenes; 37using OpenSim.Region.Environment.Scenes;
@@ -40,12 +40,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
40{ 40{
41 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager 41 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager
42 { 42 {
43 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 43 private Dictionary<UUID, Scene> RegisteredScenes = new Dictionary<UUID, Scene>();
44 44
45 private Dictionary<string, IDynamicTextureRender> RenderPlugins = 45 private Dictionary<string, IDynamicTextureRender> RenderPlugins =
46 new Dictionary<string, IDynamicTextureRender>(); 46 new Dictionary<string, IDynamicTextureRender>();
47 47
48 private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>(); 48 private Dictionary<UUID, DynamicTextureUpdater> Updaters = new Dictionary<UUID, DynamicTextureUpdater>();
49 49
50 #region IDynamicTextureManager Members 50 #region IDynamicTextureManager Members
51 51
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
62 /// </summary> 62 /// </summary>
63 /// <param name="id"></param> 63 /// <param name="id"></param>
64 /// <param name="data"></param> 64 /// <param name="data"></param>
65 public void ReturnData(LLUUID id, byte[] data) 65 public void ReturnData(UUID id, byte[] data)
66 { 66 {
67 if (Updaters.ContainsKey(id)) 67 if (Updaters.ContainsKey(id))
68 { 68 {
@@ -75,13 +75,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
75 } 75 }
76 } 76 }
77 77
78 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, 78 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
79 string extraParams, int updateTimer) 79 string extraParams, int updateTimer)
80 { 80 {
81 return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255); 81 return AddDynamicTextureURL(simID, primID, contentType, url, extraParams, updateTimer, false, 255);
82 } 82 }
83 83
84 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, 84 public UUID AddDynamicTextureURL(UUID simID, UUID primID, string contentType, string url,
85 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 85 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
86 { 86 {
87 if (RenderPlugins.ContainsKey(contentType)) 87 if (RenderPlugins.ContainsKey(contentType))
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
94 updater.ContentType = contentType; 94 updater.ContentType = contentType;
95 updater.Url = url; 95 updater.Url = url;
96 updater.UpdateTimer = updateTimer; 96 updater.UpdateTimer = updateTimer;
97 updater.UpdaterID = LLUUID.Random(); 97 updater.UpdaterID = UUID.Random();
98 updater.Params = extraParams; 98 updater.Params = extraParams;
99 updater.BlendWithOldTexture = SetBlending; 99 updater.BlendWithOldTexture = SetBlending;
100 updater.FrontAlpha = AlphaValue; 100 updater.FrontAlpha = AlphaValue;
@@ -107,16 +107,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
107 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); 107 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams);
108 return updater.UpdaterID; 108 return updater.UpdaterID;
109 } 109 }
110 return LLUUID.Zero; 110 return UUID.Zero;
111 } 111 }
112 112
113 public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, 113 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
114 string extraParams, int updateTimer) 114 string extraParams, int updateTimer)
115 { 115 {
116 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255); 116 return AddDynamicTextureData(simID, primID, contentType, data, extraParams, updateTimer, false, 255);
117 } 117 }
118 118
119 public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, 119 public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
120 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue) 120 string extraParams, int updateTimer, bool SetBlending, byte AlphaValue)
121 { 121 {
122 if (RenderPlugins.ContainsKey(contentType)) 122 if (RenderPlugins.ContainsKey(contentType))
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
127 updater.ContentType = contentType; 127 updater.ContentType = contentType;
128 updater.BodyData = data; 128 updater.BodyData = data;
129 updater.UpdateTimer = updateTimer; 129 updater.UpdateTimer = updateTimer;
130 updater.UpdaterID = LLUUID.Random(); 130 updater.UpdaterID = UUID.Random();
131 updater.Params = extraParams; 131 updater.Params = extraParams;
132 updater.BlendWithOldTexture = SetBlending; 132 updater.BlendWithOldTexture = SetBlending;
133 updater.FrontAlpha = AlphaValue; 133 updater.FrontAlpha = AlphaValue;
@@ -140,7 +140,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
140 RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); 140 RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
141 return updater.UpdaterID; 141 return updater.UpdaterID;
142 } 142 }
143 return LLUUID.Zero; 143 return UUID.Zero;
144 } 144 }
145 145
146 #endregion 146 #endregion
@@ -184,18 +184,18 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
184 public string BodyData; 184 public string BodyData;
185 public string ContentType; 185 public string ContentType;
186 public byte FrontAlpha = 255; 186 public byte FrontAlpha = 255;
187 public LLUUID LastAssetID; 187 public UUID LastAssetID;
188 public string Params; 188 public string Params;
189 public LLUUID PrimID; 189 public UUID PrimID;
190 public bool SetNewFrontAlpha = false; 190 public bool SetNewFrontAlpha = false;
191 public LLUUID SimUUID; 191 public UUID SimUUID;
192 public LLUUID UpdaterID; 192 public UUID UpdaterID;
193 public int UpdateTimer; 193 public int UpdateTimer;
194 public string Url; 194 public string Url;
195 195
196 public DynamicTextureUpdater() 196 public DynamicTextureUpdater()
197 { 197 {
198 LastAssetID = LLUUID.Zero; 198 LastAssetID = UUID.Zero;
199 UpdateTimer = 0; 199 UpdateTimer = 0;
200 BodyData = null; 200 BodyData = null;
201 } 201 }
@@ -211,7 +211,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
211 211
212 if (BlendWithOldTexture) 212 if (BlendWithOldTexture)
213 { 213 {
214 LLUUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID; 214 UUID lastTextureID = part.Shape.Textures.DefaultTexture.TextureID;
215 oldAsset = scene.AssetCache.GetAsset(lastTextureID, true); 215 oldAsset = scene.AssetCache.GetAsset(lastTextureID, true);
216 if (oldAsset != null) 216 if (oldAsset != null)
217 { 217 {
@@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
231 231
232 // Create a new asset for user 232 // Create a new asset for user
233 AssetBase asset = new AssetBase(); 233 AssetBase asset = new AssetBase();
234 asset.FullID = LLUUID.Random(); 234 asset.FullID = UUID.Random();
235 asset.Data = assetData; 235 asset.Data = assetData;
236 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); 236 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000);
237 asset.Type = 0; 237 asset.Type = 0;
@@ -243,10 +243,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
243 LastAssetID = asset.FullID; 243 LastAssetID = asset.FullID;
244 244
245 // mostly keep the values from before 245 // mostly keep the values from before
246 LLObject.TextureEntry tmptex = part.Shape.Textures; 246 Primitive.TextureEntry tmptex = part.Shape.Textures;
247 247
248 // remove the old asset from the cache 248 // remove the old asset from the cache
249 LLUUID oldID = tmptex.DefaultTexture.TextureID; 249 UUID oldID = tmptex.DefaultTexture.TextureID;
250 scene.AssetCache.ExpireAsset(oldID); 250 scene.AssetCache.ExpireAsset(oldID);
251 251
252 tmptex.DefaultTexture.TextureID = asset.FullID; 252 tmptex.DefaultTexture.TextureID = asset.FullID;
@@ -259,15 +259,27 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
259 259
260 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha) 260 private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha)
261 { 261 {
262 Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage)); 262 ManagedImage managedImage;
263 Bitmap image2 = new Bitmap(OpenJPEG.DecodeToImage(backImage)); 263 Image image;
264 if (setNewAlpha) 264
265 if (OpenJPEG.DecodeToImage(frontImage, out managedImage, out image))
265 { 266 {
266 SetAlpha(ref image1, newAlpha); 267 Bitmap image1 = new Bitmap(image);
268
269 if (OpenJPEG.DecodeToImage(backImage, out managedImage, out image))
270 {
271 Bitmap image2 = new Bitmap(image);
272
273 if (setNewAlpha)
274 SetAlpha(ref image1, newAlpha);
275
276 Bitmap joint = MergeBitMaps(image1, image2);
277
278 return OpenJPEG.EncodeFromImage(joint, true);
279 }
267 } 280 }
268 Bitmap joint = MergeBitMaps(image1, image2);
269 281
270 return OpenJPEG.EncodeFromImage(joint, true); 282 return null;
271 } 283 }
272 284
273 public Bitmap MergeBitMaps(Bitmap front, Bitmap back) 285 public Bitmap MergeBitMaps(Bitmap front, Bitmap back)
diff --git a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
index bcf3e76..5a715f5 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/EMailModules/EmailModule.cs
@@ -29,7 +29,7 @@ using System;
29using System.Reflection; 29using System.Reflection;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using System.Text.RegularExpressions; 31using System.Text.RegularExpressions;
32using libsecondlife; 32using OpenMetaverse;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
35using OpenSim.Region.Environment.Scenes; 35using OpenSim.Region.Environment.Scenes;
@@ -161,7 +161,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
161 } 161 }
162 } 162 }
163 163
164 private SceneObjectPart findPrim(LLUUID objectID, out string ObjectRegionName) 164 private SceneObjectPart findPrim(UUID objectID, out string ObjectRegionName)
165 { 165 {
166 lock (m_Scenes) 166 lock (m_Scenes)
167 { 167 {
@@ -179,7 +179,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
179 return null; 179 return null;
180 } 180 }
181 181
182 private void resolveNamePositionRegionName(LLUUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName) 182 private void resolveNamePositionRegionName(UUID objectID, out string ObjectName, out string ObjectAbsolutePosition, out string ObjectRegionName)
183 { 183 {
184 string m_ObjectRegionName; 184 string m_ObjectRegionName;
185 SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName); 185 SceneObjectPart part = findPrim(objectID, out m_ObjectRegionName);
@@ -203,7 +203,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
203 /// <param name="address"></param> 203 /// <param name="address"></param>
204 /// <param name="subject"></param> 204 /// <param name="subject"></param>
205 /// <param name="body"></param> 205 /// <param name="body"></param>
206 public void SendEmail(LLUUID objectID, string address, string subject, string body) 206 public void SendEmail(UUID objectID, string address, string subject, string body)
207 { 207 {
208 //Check if address is empty 208 //Check if address is empty
209 if (address == string.Empty) 209 if (address == string.Empty)
@@ -240,7 +240,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
240 //Creation EmailMessage 240 //Creation EmailMessage
241 EmailMessage emailMessage = new EmailMessage(); 241 EmailMessage emailMessage = new EmailMessage();
242 //From 242 //From
243 emailMessage.FromAddress = new EmailAddress(objectID.UUID.ToString()+"@"+m_HostName); 243 emailMessage.FromAddress = new EmailAddress(objectID.ToString()+"@"+m_HostName);
244 //To - Only One 244 //To - Only One
245 emailMessage.AddToAddress(new EmailAddress(address)); 245 emailMessage.AddToAddress(new EmailAddress(address));
246 //Subject 246 //Subject
@@ -264,7 +264,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
264 //Send Email Message 264 //Send Email Message
265 emailMessage.Send(smtpServer); 265 emailMessage.Send(smtpServer);
266 //Log 266 //Log
267 m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.UUID.ToString()); 267 m_log.Info("[EMAIL] EMail sent to: " + address + " from object: " + objectID.ToString());
268 } 268 }
269 catch (Exception e) 269 catch (Exception e)
270 { 270 {
@@ -280,7 +280,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.EmailModules
280 /// <param name="sender"></param> 280 /// <param name="sender"></param>
281 /// <param name="subject"></param> 281 /// <param name="subject"></param>
282 /// <returns></returns> 282 /// <returns></returns>
283 public Email GetNextEmail(LLUUID objectID, string sender, string subject) 283 public Email GetNextEmail(UUID objectID, string sender, string subject)
284 { 284 {
285 return null; 285 return null;
286 } 286 }
diff --git a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
index 1eb0387..9595588 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/HttpRequest/ScriptsHttpRequests.cs
@@ -31,7 +31,7 @@ using System.IO;
31using System.Net; 31using System.Net;
32using System.Text; 32using System.Text;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using Nini.Config; 35using Nini.Config;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Framework.Servers; 37using OpenSim.Framework.Servers;
@@ -91,7 +91,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
91 private string m_name = "HttpScriptRequests"; 91 private string m_name = "HttpScriptRequests";
92 92
93 // <request id, HttpRequestClass> 93 // <request id, HttpRequestClass>
94 private Dictionary<LLUUID, HttpRequestClass> m_pendingRequests; 94 private Dictionary<UUID, HttpRequestClass> m_pendingRequests;
95 private Scene m_scene; 95 private Scene m_scene;
96 // private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>(); 96 // private Queue<HttpRequestClass> rpcQueue = new Queue<HttpRequestClass>();
97 97
@@ -101,14 +101,14 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
101 101
102 #region IHttpRequests Members 102 #region IHttpRequests Members
103 103
104 public LLUUID MakeHttpRequest(string url, string parameters, string body) 104 public UUID MakeHttpRequest(string url, string parameters, string body)
105 { 105 {
106 return LLUUID.Zero; 106 return UUID.Zero;
107 } 107 }
108 108
109 public LLUUID StartHttpRequest(uint localID, LLUUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body) 109 public UUID StartHttpRequest(uint localID, UUID itemID, string url, List<string> parameters, Dictionary<string, string> headers, string body)
110 { 110 {
111 LLUUID reqID = LLUUID.Random(); 111 UUID reqID = UUID.Random();
112 HttpRequestClass htc = new HttpRequestClass(); 112 HttpRequestClass htc = new HttpRequestClass();
113 113
114 // Partial implementation: support for parameter flags needed 114 // Partial implementation: support for parameter flags needed
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
163 return reqID; 163 return reqID;
164 } 164 }
165 165
166 public void StopHttpRequest(uint m_localID, LLUUID m_itemID) 166 public void StopHttpRequest(uint m_localID, UUID m_itemID)
167 { 167 {
168 if (m_pendingRequests != null) 168 if (m_pendingRequests != null)
169 { 169 {
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
192 { 192 {
193 lock (HttpListLock) 193 lock (HttpListLock)
194 { 194 {
195 foreach (LLUUID luid in m_pendingRequests.Keys) 195 foreach (UUID luid in m_pendingRequests.Keys)
196 { 196 {
197 HttpRequestClass tmpReq; 197 HttpRequestClass tmpReq;
198 198
@@ -208,7 +208,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
208 return null; 208 return null;
209 } 209 }
210 210
211 public void RemoveCompletedRequest(LLUUID id) 211 public void RemoveCompletedRequest(UUID id)
212 { 212 {
213 lock (HttpListLock) 213 lock (HttpListLock)
214 { 214 {
@@ -232,7 +232,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
232 232
233 m_scene.RegisterModuleInterface<IHttpRequests>(this); 233 m_scene.RegisterModuleInterface<IHttpRequests>(this);
234 234
235 m_pendingRequests = new Dictionary<LLUUID, HttpRequestClass>(); 235 m_pendingRequests = new Dictionary<UUID, HttpRequestClass>();
236 } 236 }
237 237
238 public void PostInitialise() 238 public void PostInitialise()
@@ -274,11 +274,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest
274 public bool httpVerifyCert = true; // not implemented 274 public bool httpVerifyCert = true; // not implemented
275 275
276 // Request info 276 // Request info
277 public LLUUID itemID; 277 public UUID itemID;
278 public uint localID; 278 public uint localID;
279 public DateTime next; 279 public DateTime next;
280 public string outbound_body; 280 public string outbound_body;
281 public LLUUID reqID; 281 public UUID reqID;
282 public HttpWebRequest request; 282 public HttpWebRequest request;
283 public string response_body; 283 public string response_body;
284 public List<string> response_metadata; 284 public List<string> response_metadata;
diff --git a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
index 725322b..339ad42 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/LoadImageURL/LoadImageURLModule.cs
@@ -29,9 +29,9 @@ using System;
29using System.Drawing; 29using System.Drawing;
30using System.IO; 30using System.IO;
31using System.Net; 31using System.Net;
32using libsecondlife; 32using OpenMetaverse;
33using OpenMetaverse.Imaging;
33using Nini.Config; 34using Nini.Config;
34using OpenJPEGNet;
35using OpenSim.Region.Environment.Interfaces; 35using OpenSim.Region.Environment.Interfaces;
36using OpenSim.Region.Environment.Scenes; 36using OpenSim.Region.Environment.Scenes;
37 37
@@ -70,13 +70,13 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
70 return null; 70 return null;
71 } 71 }
72 72
73 public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) 73 public bool AsyncConvertUrl(UUID id, string url, string extraParams)
74 { 74 {
75 MakeHttpRequest(url, id); 75 MakeHttpRequest(url, id);
76 return true; 76 return true;
77 } 77 }
78 78
79 public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) 79 public bool AsyncConvertData(UUID id, string bodyData, string extraParams)
80 { 80 {
81 return false; 81 return false;
82 } 82 }
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
118 118
119 #endregion 119 #endregion
120 120
121 private void MakeHttpRequest(string url, LLUUID requestID) 121 private void MakeHttpRequest(string url, UUID requestID)
122 { 122 {
123 WebRequest request = HttpWebRequest.Create(url); 123 WebRequest request = HttpWebRequest.Create(url);
124 RequestState state = new RequestState((HttpWebRequest) request, requestID); 124 RequestState state = new RequestState((HttpWebRequest) request, requestID);
@@ -177,10 +177,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
177 public class RequestState 177 public class RequestState
178 { 178 {
179 public HttpWebRequest Request = null; 179 public HttpWebRequest Request = null;
180 public LLUUID RequestID = LLUUID.Zero; 180 public UUID RequestID = UUID.Zero;
181 public int TimeOfRequest = 0; 181 public int TimeOfRequest = 0;
182 182
183 public RequestState(HttpWebRequest request, LLUUID requestID) 183 public RequestState(HttpWebRequest request, UUID requestID)
184 { 184 {
185 Request = request; 185 Request = request;
186 RequestID = requestID; 186 RequestID = requestID;
@@ -189,4 +189,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.LoadImageURL
189 189
190 #endregion 190 #endregion
191 } 191 }
192} \ No newline at end of file 192}
diff --git a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
index 27f1182..256bf27 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/VectorRender/VectorRenderModule.cs
@@ -31,12 +31,11 @@ using System.Drawing.Imaging;
31using System.Globalization; 31using System.Globalization;
32using System.IO; 32using System.IO;
33using System.Net; 33using System.Net;
34using libsecondlife; 34using OpenMetaverse;
35using OpenMetaverse.Imaging;
35using Nini.Config; 36using Nini.Config;
36using OpenJPEGNet;
37using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
38using OpenSim.Region.Environment.Scenes; 38using OpenSim.Region.Environment.Scenes;
39using Image=System.Drawing.Image;
40 39
41//using Cairo; 40//using Cairo;
42 41
@@ -79,12 +78,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
79 return null; 78 return null;
80 } 79 }
81 80
82 public bool AsyncConvertUrl(LLUUID id, string url, string extraParams) 81 public bool AsyncConvertUrl(UUID id, string url, string extraParams)
83 { 82 {
84 return false; 83 return false;
85 } 84 }
86 85
87 public bool AsyncConvertData(LLUUID id, string bodyData, string extraParams) 86 public bool AsyncConvertData(UUID id, string bodyData, string extraParams)
88 { 87 {
89 Draw(bodyData, id, extraParams); 88 Draw(bodyData, id, extraParams);
90 return true; 89 return true;
@@ -127,7 +126,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
127 126
128 #endregion 127 #endregion
129 128
130 private void Draw(string data, LLUUID id, string extraParams) 129 private void Draw(string data, UUID id, string extraParams)
131 { 130 {
132 // TODO: this is a brutal hack. extraParams should actually be parsed reasonably. 131 // TODO: this is a brutal hack. extraParams should actually be parsed reasonably.
133 int size = 256; 132 int size = 256;
@@ -374,4 +373,4 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
374 return null; 373 return null;
375 } 374 }
376 } 375 }
377} \ No newline at end of file 376}
diff --git a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
index 2f67dee..ae5eefc 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/WorldComm/WorldCommModule.cs
@@ -28,7 +28,7 @@
28using System; 28using System;
29using System.Collections; 29using System.Collections;
30using System.Collections.Generic; 30using System.Collections.Generic;
31using libsecondlife; 31using OpenMetaverse;
32using Nini.Config; 32using Nini.Config;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Region.Environment.Interfaces; 34using OpenSim.Region.Environment.Interfaces;
@@ -66,7 +66,7 @@ using OpenSim.Region.Environment.Scenes;
66 * 66 *
67 * For LSL compliance, note the following: 67 * For LSL compliance, note the following:
68 * (Tested again 1.21.1 on May 2, 2008) 68 * (Tested again 1.21.1 on May 2, 2008)
69 * 1. 'id' has to be parsed into a LLUUID. None-UUID keys are 69 * 1. 'id' has to be parsed into a UUID. None-UUID keys are
70 * to be replaced by the ZeroID key. (Well, TryParse does 70 * to be replaced by the ZeroID key. (Well, TryParse does
71 * that for us. 71 * that for us.
72 * 2. Setting up an listen event from the same script, with the 72 * 2. Setting up an listen event from the same script, with the
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
157 /// <param name="id">key to filter on (user given, could be totally faked)</param> 157 /// <param name="id">key to filter on (user given, could be totally faked)</param>
158 /// <param name="msg">msg to filter on</param> 158 /// <param name="msg">msg to filter on</param>
159 /// <returns>number of the scripts handle</returns> 159 /// <returns>number of the scripts handle</returns>
160 public int Listen(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) 160 public int Listen(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg)
161 { 161 {
162 return m_listenerManager.AddListener(localID, itemID, hostID, channel, name, id, msg); 162 return m_listenerManager.AddListener(localID, itemID, hostID, channel, name, id, msg);
163 } 163 }
@@ -169,7 +169,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
169 /// <param name="itemID">UUID of the script engine</param> 169 /// <param name="itemID">UUID of the script engine</param>
170 /// <param name="handle">handle returned by Listen()</param> 170 /// <param name="handle">handle returned by Listen()</param>
171 /// <param name="active">temp. activate or deactivate the Listen()</param> 171 /// <param name="active">temp. activate or deactivate the Listen()</param>
172 public void ListenControl(LLUUID itemID, int handle, int active) 172 public void ListenControl(UUID itemID, int handle, int active)
173 { 173 {
174 if (active == 1) 174 if (active == 1)
175 m_listenerManager.Activate(itemID, handle); 175 m_listenerManager.Activate(itemID, handle);
@@ -182,7 +182,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
182 /// </summary> 182 /// </summary>
183 /// <param name="itemID">UUID of the script engine</param> 183 /// <param name="itemID">UUID of the script engine</param>
184 /// <param name="handle">handle returned by Listen()</param> 184 /// <param name="handle">handle returned by Listen()</param>
185 public void ListenRemove(LLUUID itemID, int handle) 185 public void ListenRemove(UUID itemID, int handle)
186 { 186 {
187 m_listenerManager.Remove(itemID, handle); 187 m_listenerManager.Remove(itemID, handle);
188 } 188 }
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
192 /// (script engine) 192 /// (script engine)
193 /// </summary> 193 /// </summary>
194 /// <param name="itemID">UUID of the script engine</param> 194 /// <param name="itemID">UUID of the script engine</param>
195 public void DeleteListener(LLUUID itemID) 195 public void DeleteListener(UUID itemID)
196 { 196 {
197 m_listenerManager.DeleteListener(itemID); 197 m_listenerManager.DeleteListener(itemID);
198 } 198 }
@@ -210,11 +210,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
210 /// <param name="name">name of sender (object or avatar)</param> 210 /// <param name="name">name of sender (object or avatar)</param>
211 /// <param name="id">key of sender (object or avatar)</param> 211 /// <param name="id">key of sender (object or avatar)</param>
212 /// <param name="msg">msg to sent</param> 212 /// <param name="msg">msg to sent</param>
213 public void DeliverMessage(ChatTypeEnum type, int channel, string name, LLUUID id, string msg) 213 public void DeliverMessage(ChatTypeEnum type, int channel, string name, UUID id, string msg)
214 { 214 {
215 SceneObjectPart source = null; 215 SceneObjectPart source = null;
216 ScenePresence avatar = null; 216 ScenePresence avatar = null;
217 LLVector3 position; 217 Vector3 position;
218 218
219 source = m_scene.GetSceneObjectPart(id); 219 source = m_scene.GetSceneObjectPart(id);
220 if (source != null) 220 if (source != null)
@@ -231,7 +231,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
231 // Determine which listen event filters match the given set of arguments, this results 231 // Determine which listen event filters match the given set of arguments, this results
232 // in a limited set of listeners, each belonging a host. If the host is in range, add them 232 // in a limited set of listeners, each belonging a host. If the host is in range, add them
233 // to the pending queue. 233 // to the pending queue.
234 foreach (ListenerInfo li in m_listenerManager.GetListeners(LLUUID.Zero, channel, name, id, msg)) 234 foreach (ListenerInfo li in m_listenerManager.GetListeners(UUID.Zero, channel, name, id, msg))
235 { 235 {
236 // Dont process if this message is from yourself! 236 // Dont process if this message is from yourself!
237 if (li.GetHostID().Equals(id)) 237 if (li.GetHostID().Equals(id))
@@ -331,12 +331,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
331 e.Message); 331 e.Message);
332 } 332 }
333 333
334 public Object[] GetSerializationData(LLUUID itemID) 334 public Object[] GetSerializationData(UUID itemID)
335 { 335 {
336 return m_listenerManager.GetSerializationData(itemID); 336 return m_listenerManager.GetSerializationData(itemID);
337 } 337 }
338 338
339 public void CreateFromData(uint localID, LLUUID itemID, LLUUID hostID, 339 public void CreateFromData(uint localID, UUID itemID, UUID hostID,
340 Object[] data) 340 Object[] data)
341 { 341 {
342 m_listenerManager.AddFromData(localID, itemID, hostID, data); 342 m_listenerManager.AddFromData(localID, itemID, hostID, data);
@@ -357,7 +357,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
357 m_curlisteners = 0; 357 m_curlisteners = 0;
358 } 358 }
359 359
360 public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, LLUUID id, string msg) 360 public int AddListener(uint localID, UUID itemID, UUID hostID, int channel, string name, UUID id, string msg)
361 { 361 {
362 // do we already have a match on this particular filter event? 362 // do we already have a match on this particular filter event?
363 List<ListenerInfo> coll = GetListeners(itemID, channel, name, id, msg); 363 List<ListenerInfo> coll = GetListeners(itemID, channel, name, id, msg);
@@ -395,7 +395,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
395 return -1; 395 return -1;
396 } 396 }
397 397
398 public void Remove(LLUUID itemID, int handle) 398 public void Remove(UUID itemID, int handle)
399 { 399 {
400 lock (m_listeners) 400 lock (m_listeners)
401 { 401 {
@@ -419,7 +419,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
419 } 419 }
420 } 420 }
421 421
422 public void DeleteListener(LLUUID itemID) 422 public void DeleteListener(UUID itemID)
423 { 423 {
424 List<int> emptyChannels = new List<int>(); 424 List<int> emptyChannels = new List<int>();
425 List<ListenerInfo> removedListeners = new List<ListenerInfo>(); 425 List<ListenerInfo> removedListeners = new List<ListenerInfo>();
@@ -455,7 +455,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
455 } 455 }
456 } 456 }
457 457
458 public void Activate(LLUUID itemID, int handle) 458 public void Activate(UUID itemID, int handle)
459 { 459 {
460 lock (m_listeners) 460 lock (m_listeners)
461 { 461 {
@@ -474,7 +474,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
474 } 474 }
475 } 475 }
476 476
477 public void Dectivate(LLUUID itemID, int handle) 477 public void Dectivate(UUID itemID, int handle)
478 { 478 {
479 lock (m_listeners) 479 lock (m_listeners)
480 { 480 {
@@ -494,7 +494,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
494 } 494 }
495 495
496 // non-locked access, since its always called in the context of the lock 496 // non-locked access, since its always called in the context of the lock
497 private int GetNewHandle(LLUUID itemID) 497 private int GetNewHandle(UUID itemID)
498 { 498 {
499 List<int> handles = new List<int>(); 499 List<int> handles = new List<int>();
500 500
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
521 // Theres probably a more clever and efficient way to 521 // Theres probably a more clever and efficient way to
522 // do this, maybe with regex. 522 // do this, maybe with regex.
523 // PM2008: Ha, one could even be smart and define a specialized Enumerator. 523 // PM2008: Ha, one could even be smart and define a specialized Enumerator.
524 public List<ListenerInfo> GetListeners(LLUUID itemID, int channel, string name, LLUUID id, string msg) 524 public List<ListenerInfo> GetListeners(UUID itemID, int channel, string name, UUID id, string msg)
525 { 525 {
526 List<ListenerInfo> collection = new List<ListenerInfo>(); 526 List<ListenerInfo> collection = new List<ListenerInfo>();
527 527
@@ -539,7 +539,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
539 { 539 {
540 continue; 540 continue;
541 } 541 }
542 if (!itemID.Equals(LLUUID.Zero) && !li.GetItemID().Equals(itemID)) 542 if (!itemID.Equals(UUID.Zero) && !li.GetItemID().Equals(itemID))
543 { 543 {
544 continue; 544 continue;
545 } 545 }
@@ -547,7 +547,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
547 { 547 {
548 continue; 548 continue;
549 } 549 }
550 if (!li.GetID().Equals(LLUUID.Zero) && !li.GetID().Equals(id)) 550 if (!li.GetID().Equals(UUID.Zero) && !li.GetID().Equals(id))
551 { 551 {
552 continue; 552 continue;
553 } 553 }
@@ -561,7 +561,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
561 return collection; 561 return collection;
562 } 562 }
563 563
564 public Object[] GetSerializationData(LLUUID itemID) 564 public Object[] GetSerializationData(UUID itemID)
565 { 565 {
566 List<Object> data = new List<Object>(); 566 List<Object> data = new List<Object>();
567 567
@@ -576,7 +576,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
576 return (Object[])data.ToArray(); 576 return (Object[])data.ToArray();
577 } 577 }
578 578
579 public void AddFromData(uint localID, LLUUID itemID, LLUUID hostID, 579 public void AddFromData(uint localID, UUID itemID, UUID hostID,
580 Object[] data) 580 Object[] data)
581 { 581 {
582 int idx = 0; 582 int idx = 0;
@@ -603,25 +603,25 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
603 private bool m_active; // Listener is active or not 603 private bool m_active; // Listener is active or not
604 private int m_handle; // Assigned handle of this listener 604 private int m_handle; // Assigned handle of this listener
605 private uint m_localID; // Local ID from script engine 605 private uint m_localID; // Local ID from script engine
606 private LLUUID m_itemID; // ID of the host script engine 606 private UUID m_itemID; // ID of the host script engine
607 private LLUUID m_hostID; // ID of the host/scene part 607 private UUID m_hostID; // ID of the host/scene part
608 private int m_channel; // Channel 608 private int m_channel; // Channel
609 private LLUUID m_id; // ID to filter messages from 609 private UUID m_id; // ID to filter messages from
610 private string m_name; // Object name to filter messages from 610 private string m_name; // Object name to filter messages from
611 private string m_message; // The message 611 private string m_message; // The message
612 612
613 public ListenerInfo(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message) 613 public ListenerInfo(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name, UUID id, string message)
614 { 614 {
615 Initialise(handle, localID, ItemID, hostID, channel, name, id, message); 615 Initialise(handle, localID, ItemID, hostID, channel, name, id, message);
616 } 616 }
617 617
618 public ListenerInfo(ListenerInfo li, string name, LLUUID id, string message) 618 public ListenerInfo(ListenerInfo li, string name, UUID id, string message)
619 { 619 {
620 Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message); 620 Initialise(li.m_handle, li.m_localID, li.m_itemID, li.m_hostID, li.m_channel, name, id, message);
621 } 621 }
622 622
623 private void Initialise(int handle, uint localID, LLUUID ItemID, LLUUID hostID, int channel, string name, 623 private void Initialise(int handle, uint localID, UUID ItemID, UUID hostID, int channel, string name,
624 LLUUID id, string message) 624 UUID id, string message)
625 { 625 {
626 m_active = true; 626 m_active = true;
627 m_handle = handle; 627 m_handle = handle;
@@ -648,22 +648,22 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
648 return data; 648 return data;
649 } 649 }
650 650
651 public static ListenerInfo FromData(uint localID, LLUUID ItemID, LLUUID hostID, Object[] data) 651 public static ListenerInfo FromData(uint localID, UUID ItemID, UUID hostID, Object[] data)
652 { 652 {
653 ListenerInfo linfo = new ListenerInfo((int)data[1], localID, 653 ListenerInfo linfo = new ListenerInfo((int)data[1], localID,
654 ItemID, hostID, (int)data[2], (string)data[3], 654 ItemID, hostID, (int)data[2], (string)data[3],
655 (LLUUID)data[4], (string)data[5]); 655 (UUID)data[4], (string)data[5]);
656 linfo.m_active=(bool)data[0]; 656 linfo.m_active=(bool)data[0];
657 657
658 return linfo; 658 return linfo;
659 } 659 }
660 660
661 public LLUUID GetItemID() 661 public UUID GetItemID()
662 { 662 {
663 return m_itemID; 663 return m_itemID;
664 } 664 }
665 665
666 public LLUUID GetHostID() 666 public UUID GetHostID()
667 { 667 {
668 return m_hostID; 668 return m_hostID;
669 } 669 }
@@ -708,7 +708,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
708 m_active = true; 708 m_active = true;
709 } 709 }
710 710
711 public LLUUID GetID() 711 public UUID GetID()
712 { 712 {
713 return m_id; 713 return m_id;
714 } 714 }
diff --git a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
index bde90bc..85aa344 100644
--- a/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
+++ b/OpenSim/Region/Environment/Modules/Scripting/XMLRPC/XMLRPCModule.cs
@@ -31,7 +31,7 @@ using System.Collections.Generic;
31using System.Net; 31using System.Net;
32using System.Reflection; 32using System.Reflection;
33using System.Threading; 33using System.Threading;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using Nini.Config; 36using Nini.Config;
37using Nwc.XmlRpc; 37using Nwc.XmlRpc;
@@ -82,12 +82,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
82 private string m_name = "XMLRPCModule"; 82 private string m_name = "XMLRPCModule";
83 83
84 // <channel id, RPCChannelInfo> 84 // <channel id, RPCChannelInfo>
85 private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; 85 private Dictionary<UUID, RPCChannelInfo> m_openChannels;
86 private Dictionary<LLUUID, SendRemoteDataRequest> m_pendingSRDResponses; 86 private Dictionary<UUID, SendRemoteDataRequest> m_pendingSRDResponses;
87 private int m_remoteDataPort = 0; 87 private int m_remoteDataPort = 0;
88 88
89 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPending; 89 private Dictionary<UUID, RPCRequestInfo> m_rpcPending;
90 private Dictionary<LLUUID, RPCRequestInfo> m_rpcPendingResponses; 90 private Dictionary<UUID, RPCRequestInfo> m_rpcPendingResponses;
91 private List<Scene> m_scenes = new List<Scene>(); 91 private List<Scene> m_scenes = new List<Scene>();
92 private int RemoteReplyScriptTimeout = 9000; 92 private int RemoteReplyScriptTimeout = 9000;
93 private int RemoteReplyScriptWait = 300; 93 private int RemoteReplyScriptWait = 300;
@@ -102,10 +102,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
102 // get called only one time (or we lose any open channels) 102 // get called only one time (or we lose any open channels)
103 if (null == m_openChannels) 103 if (null == m_openChannels)
104 { 104 {
105 m_openChannels = new Dictionary<LLUUID, RPCChannelInfo>(); 105 m_openChannels = new Dictionary<UUID, RPCChannelInfo>();
106 m_rpcPending = new Dictionary<LLUUID, RPCRequestInfo>(); 106 m_rpcPending = new Dictionary<UUID, RPCRequestInfo>();
107 m_rpcPendingResponses = new Dictionary<LLUUID, RPCRequestInfo>(); 107 m_rpcPendingResponses = new Dictionary<UUID, RPCRequestInfo>();
108 m_pendingSRDResponses = new Dictionary<LLUUID, SendRemoteDataRequest>(); 108 m_pendingSRDResponses = new Dictionary<UUID, SendRemoteDataRequest>();
109 109
110 try 110 try
111 { 111 {
@@ -164,11 +164,11 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
164 /********************************************** 164 /**********************************************
165 * OpenXMLRPCChannel 165 * OpenXMLRPCChannel
166 * 166 *
167 * Generate a LLUUID channel key and add it and 167 * Generate a UUID channel key and add it and
168 * the prim id to dictionary <channelUUID, primUUID> 168 * the prim id to dictionary <channelUUID, primUUID>
169 * 169 *
170 * A custom channel key can be proposed. 170 * A custom channel key can be proposed.
171 * Otherwise, passing LLUUID.Zero will generate 171 * Otherwise, passing UUID.Zero will generate
172 * and return a random channel 172 * and return a random channel
173 * 173 *
174 * First check if there is a channel assigned for 174 * First check if there is a channel assigned for
@@ -179,9 +179,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
179 * 179 *
180 * ********************************************/ 180 * ********************************************/
181 181
182 public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID, LLUUID channelID) 182 public UUID OpenXMLRPCChannel(uint localID, UUID itemID, UUID channelID)
183 { 183 {
184 LLUUID newChannel = LLUUID.Zero; 184 UUID newChannel = UUID.Zero;
185 185
186 // This should no longer happen, but the check is reasonable anyway 186 // This should no longer happen, but the check is reasonable anyway
187 if (null == m_openChannels) 187 if (null == m_openChannels)
@@ -201,9 +201,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
201 } 201 }
202 } 202 }
203 203
204 if (newChannel == LLUUID.Zero) 204 if (newChannel == UUID.Zero)
205 { 205 {
206 newChannel = (channelID == LLUUID.Zero) ? LLUUID.Random() : channelID; 206 newChannel = (channelID == UUID.Zero) ? UUID.Random() : channelID;
207 RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, newChannel); 207 RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, newChannel);
208 lock (XMLRPCListLock) 208 lock (XMLRPCListLock)
209 { 209 {
@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
216 216
217 // Delete channels based on itemID 217 // Delete channels based on itemID
218 // for when a script is deleted 218 // for when a script is deleted
219 public void DeleteChannels(LLUUID itemID) 219 public void DeleteChannels(UUID itemID)
220 { 220 {
221 if (m_openChannels != null) 221 if (m_openChannels != null)
222 { 222 {
@@ -234,7 +234,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
234 234
235 IEnumerator tmpEnumerator = tmp.GetEnumerator(); 235 IEnumerator tmpEnumerator = tmp.GetEnumerator();
236 while (tmpEnumerator.MoveNext()) 236 while (tmpEnumerator.MoveNext())
237 m_openChannels.Remove((LLUUID) tmpEnumerator.Current); 237 m_openChannels.Remove((UUID) tmpEnumerator.Current);
238 } 238 }
239 } 239 }
240 } 240 }
@@ -248,12 +248,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
248 248
249 public void RemoteDataReply(string channel, string message_id, string sdata, int idata) 249 public void RemoteDataReply(string channel, string message_id, string sdata, int idata)
250 { 250 {
251 LLUUID message_key = new LLUUID(message_id); 251 UUID message_key = new UUID(message_id);
252 LLUUID channel_key = new LLUUID(channel); 252 UUID channel_key = new UUID(channel);
253 253
254 RPCRequestInfo rpcInfo = null; 254 RPCRequestInfo rpcInfo = null;
255 255
256 if (message_key == LLUUID.Zero) 256 if (message_key == UUID.Zero)
257 { 257 {
258 foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values) 258 foreach (RPCRequestInfo oneRpcInfo in m_rpcPendingResponses.Values)
259 if (oneRpcInfo.GetChannelKey() == channel_key) 259 if (oneRpcInfo.GetChannelKey() == channel_key)
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
284 * 284 *
285 *********************************************/ 285 *********************************************/
286 286
287 public void CloseXMLRPCChannel(LLUUID channelKey) 287 public void CloseXMLRPCChannel(UUID channelKey)
288 { 288 {
289 if (m_openChannels.ContainsKey(channelKey)) 289 if (m_openChannels.ContainsKey(channelKey))
290 m_openChannels.Remove(channelKey); 290 m_openChannels.Remove(channelKey);
@@ -308,7 +308,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
308 { 308 {
309 lock (XMLRPCListLock) 309 lock (XMLRPCListLock)
310 { 310 {
311 foreach (LLUUID luid in m_rpcPending.Keys) 311 foreach (UUID luid in m_rpcPending.Keys)
312 { 312 {
313 RPCRequestInfo tmpReq; 313 RPCRequestInfo tmpReq;
314 314
@@ -322,7 +322,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
322 return null; 322 return null;
323 } 323 }
324 324
325 public void RemoveCompletedRequest(LLUUID id) 325 public void RemoveCompletedRequest(UUID id)
326 { 326 {
327 lock (XMLRPCListLock) 327 lock (XMLRPCListLock)
328 { 328 {
@@ -339,7 +339,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
339 } 339 }
340 } 340 }
341 341
342 public LLUUID SendRemoteData(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) 342 public UUID SendRemoteData(uint localID, UUID itemID, string channel, string dest, int idata, string sdata)
343 { 343 {
344 SendRemoteDataRequest req = new SendRemoteDataRequest( 344 SendRemoteDataRequest req = new SendRemoteDataRequest(
345 localID, itemID, channel, dest, idata, sdata 345 localID, itemID, channel, dest, idata, sdata
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
354 { 354 {
355 lock (XMLRPCListLock) 355 lock (XMLRPCListLock)
356 { 356 {
357 foreach (LLUUID luid in m_pendingSRDResponses.Keys) 357 foreach (UUID luid in m_pendingSRDResponses.Keys)
358 { 358 {
359 SendRemoteDataRequest tmpReq; 359 SendRemoteDataRequest tmpReq;
360 360
@@ -369,7 +369,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
369 return null; 369 return null;
370 } 370 }
371 371
372 public void RemoveCompletedSRDRequest(LLUUID id) 372 public void RemoveCompletedSRDRequest(UUID id)
373 { 373 {
374 lock (XMLRPCListLock) 374 lock (XMLRPCListLock)
375 { 375 {
@@ -381,7 +381,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
381 } 381 }
382 } 382 }
383 383
384 public void CancelSRDRequests(LLUUID itemID) 384 public void CancelSRDRequests(UUID itemID)
385 { 385 {
386 if (m_pendingSRDResponses != null) 386 if (m_pendingSRDResponses != null)
387 { 387 {
@@ -408,7 +408,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
408 408
409 if (GoodXML) 409 if (GoodXML)
410 { 410 {
411 LLUUID channel = new LLUUID((string) requestData["Channel"]); 411 UUID channel = new UUID((string) requestData["Channel"]);
412 RPCChannelInfo rpcChanInfo; 412 RPCChannelInfo rpcChanInfo;
413 if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) 413 if (m_openChannels.TryGetValue(channel, out rpcChanInfo))
414 { 414 {
@@ -462,24 +462,24 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
462 462
463 public class RPCRequestInfo 463 public class RPCRequestInfo
464 { 464 {
465 private LLUUID m_ChannelKey; 465 private UUID m_ChannelKey;
466 private string m_IntVal; 466 private string m_IntVal;
467 private LLUUID m_ItemID; 467 private UUID m_ItemID;
468 private uint m_localID; 468 private uint m_localID;
469 private LLUUID m_MessageID; 469 private UUID m_MessageID;
470 private bool m_processed; 470 private bool m_processed;
471 private int m_respInt; 471 private int m_respInt;
472 private string m_respStr; 472 private string m_respStr;
473 private string m_StrVal; 473 private string m_StrVal;
474 474
475 public RPCRequestInfo(uint localID, LLUUID itemID, LLUUID channelKey, string strVal, string intVal) 475 public RPCRequestInfo(uint localID, UUID itemID, UUID channelKey, string strVal, string intVal)
476 { 476 {
477 m_localID = localID; 477 m_localID = localID;
478 m_StrVal = strVal; 478 m_StrVal = strVal;
479 m_IntVal = intVal; 479 m_IntVal = intVal;
480 m_ItemID = itemID; 480 m_ItemID = itemID;
481 m_ChannelKey = channelKey; 481 m_ChannelKey = channelKey;
482 m_MessageID = LLUUID.Random(); 482 m_MessageID = UUID.Random();
483 m_processed = false; 483 m_processed = false;
484 m_respStr = String.Empty; 484 m_respStr = String.Empty;
485 m_respInt = 0; 485 m_respInt = 0;
@@ -490,7 +490,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
490 return m_processed; 490 return m_processed;
491 } 491 }
492 492
493 public LLUUID GetChannelKey() 493 public UUID GetChannelKey()
494 { 494 {
495 return m_ChannelKey; 495 return m_ChannelKey;
496 } 496 }
@@ -525,7 +525,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
525 return m_localID; 525 return m_localID;
526 } 526 }
527 527
528 public LLUUID GetItemID() 528 public UUID GetItemID()
529 { 529 {
530 return m_ItemID; 530 return m_ItemID;
531 } 531 }
@@ -540,7 +540,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
540 return int.Parse(m_IntVal); 540 return int.Parse(m_IntVal);
541 } 541 }
542 542
543 public LLUUID GetMessageID() 543 public UUID GetMessageID()
544 { 544 {
545 return m_MessageID; 545 return m_MessageID;
546 } 546 }
@@ -548,23 +548,23 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
548 548
549 public class RPCChannelInfo 549 public class RPCChannelInfo
550 { 550 {
551 private LLUUID m_ChannelKey; 551 private UUID m_ChannelKey;
552 private LLUUID m_itemID; 552 private UUID m_itemID;
553 private uint m_localID; 553 private uint m_localID;
554 554
555 public RPCChannelInfo(uint localID, LLUUID itemID, LLUUID channelID) 555 public RPCChannelInfo(uint localID, UUID itemID, UUID channelID)
556 { 556 {
557 m_ChannelKey = channelID; 557 m_ChannelKey = channelID;
558 m_localID = localID; 558 m_localID = localID;
559 m_itemID = itemID; 559 m_itemID = itemID;
560 } 560 }
561 561
562 public LLUUID GetItemID() 562 public UUID GetItemID()
563 { 563 {
564 return m_itemID; 564 return m_itemID;
565 } 565 }
566 566
567 public LLUUID GetChannelID() 567 public UUID GetChannelID()
568 { 568 {
569 return m_ChannelKey; 569 return m_ChannelKey;
570 } 570 }
@@ -583,15 +583,15 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
583 public bool finished; 583 public bool finished;
584 private Thread httpThread; 584 private Thread httpThread;
585 public int idata; 585 public int idata;
586 public LLUUID m_itemID; 586 public UUID m_itemID;
587 public uint m_localID; 587 public uint m_localID;
588 public LLUUID reqID; 588 public UUID reqID;
589 public XmlRpcRequest request; 589 public XmlRpcRequest request;
590 public int response_idata; 590 public int response_idata;
591 public string response_sdata; 591 public string response_sdata;
592 public string sdata; 592 public string sdata;
593 593
594 public SendRemoteDataRequest(uint localID, LLUUID itemID, string channel, string dest, int idata, string sdata) 594 public SendRemoteDataRequest(uint localID, UUID itemID, string channel, string dest, int idata, string sdata)
595 { 595 {
596 this.channel = channel; 596 this.channel = channel;
597 destURL = dest; 597 destURL = dest;
@@ -600,10 +600,10 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
600 m_itemID = itemID; 600 m_itemID = itemID;
601 m_localID = localID; 601 m_localID = localID;
602 602
603 reqID = LLUUID.Random(); 603 reqID = UUID.Random();
604 } 604 }
605 605
606 public LLUUID process() 606 public UUID process()
607 { 607 {
608 httpThread = new Thread(SendRequest); 608 httpThread = new Thread(SendRequest);
609 httpThread.Name = "HttpRequestThread"; 609 httpThread.Name = "HttpRequestThread";
@@ -625,12 +625,12 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
625 { 625 {
626 Hashtable param = new Hashtable(); 626 Hashtable param = new Hashtable();
627 627
628 // Check if channel is an LLUUID 628 // Check if channel is an UUID
629 // if not, use as method name 629 // if not, use as method name
630 LLUUID parseUID; 630 UUID parseUID;
631 string mName = "llRemoteData"; 631 string mName = "llRemoteData";
632 if ((channel != null) && (channel != "")) 632 if ((channel != null) && (channel != ""))
633 if (!LLUUID.TryParse(channel, out parseUID)) 633 if (!UUID.TryParse(channel, out parseUID))
634 mName = channel; 634 mName = channel;
635 else 635 else
636 param["Channel"] = channel; 636 param["Channel"] = channel;
@@ -698,7 +698,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
698 } 698 }
699 } 699 }
700 700
701 public LLUUID GetReqID() 701 public UUID GetReqID()
702 { 702 {
703 return reqID; 703 return reqID;
704 } 704 }
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;