aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLAssetData.cs8
-rw-r--r--OpenSim/Data/MSSQL/MSSQLEstateData.cs26
-rw-r--r--OpenSim/Data/MSSQL/MSSQLGridData.cs14
-rw-r--r--OpenSim/Data/MSSQL/MSSQLInventoryData.cs48
-rw-r--r--OpenSim/Data/MSSQL/MSSQLManager.cs38
-rw-r--r--OpenSim/Data/MSSQL/MSSQLRegionData.cs144
-rw-r--r--OpenSim/Data/MSSQL/MSSQLUserData.cs116
7 files changed, 197 insertions, 197 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLAssetData.cs b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
index e10e3aa..ed1c91b 100644
--- a/OpenSim/Data/MSSQL/MSSQLAssetData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLAssetData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
@@ -84,7 +84,7 @@ namespace OpenSim.Data.MSSQL
84 /// </summary> 84 /// </summary>
85 /// <param name="assetID">the asset UUID</param> 85 /// <param name="assetID">the asset UUID</param>
86 /// <returns></returns> 86 /// <returns></returns>
87 override public AssetBase FetchAsset(LLUUID assetID) 87 override public AssetBase FetchAsset(UUID assetID)
88 { 88 {
89 Dictionary<string, string> param = new Dictionary<string, string>(); 89 Dictionary<string, string> param = new Dictionary<string, string>();
90 param["id"] = assetID.ToString(); 90 param["id"] = assetID.ToString();
@@ -102,7 +102,7 @@ namespace OpenSim.Data.MSSQL
102 /// <param name="asset">the asset</param> 102 /// <param name="asset">the asset</param>
103 override public void CreateAsset(AssetBase asset) 103 override public void CreateAsset(AssetBase asset)
104 { 104 {
105 if (ExistsAsset((LLUUID) asset.FullID)) 105 if (ExistsAsset((UUID) asset.FullID))
106 { 106 {
107 return; 107 return;
108 } 108 }
@@ -181,7 +181,7 @@ namespace OpenSim.Data.MSSQL
181 /// </summary> 181 /// </summary>
182 /// <param name="uuid"></param> 182 /// <param name="uuid"></param>
183 /// <returns>true if exist.</returns> 183 /// <returns>true if exist.</returns>
184 override public bool ExistsAsset(LLUUID uuid) 184 override public bool ExistsAsset(UUID uuid)
185 { 185 {
186 if (FetchAsset(uuid) != null) 186 if (FetchAsset(uuid) != null)
187 { 187 {
diff --git a/OpenSim/Data/MSSQL/MSSQLEstateData.cs b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
index 74eecd8..b42c67f 100644
--- a/OpenSim/Data/MSSQL/MSSQLEstateData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLEstateData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36using OpenSim.Region.Environment.Interfaces; 36using OpenSim.Region.Environment.Interfaces;
@@ -102,7 +102,7 @@ namespace OpenSim.Data.MSSQL
102 /// </summary> 102 /// </summary>
103 /// <param name="regionID">region ID.</param> 103 /// <param name="regionID">region ID.</param>
104 /// <returns></returns> 104 /// <returns></returns>
105 public EstateSettings LoadEstateSettings(LLUUID regionID) 105 public EstateSettings LoadEstateSettings(UUID regionID)
106 { 106 {
107 EstateSettings es = new EstateSettings(); 107 EstateSettings es = new EstateSettings();
108 108
@@ -128,10 +128,10 @@ namespace OpenSim.Data.MSSQL
128 else 128 else
129 _FieldMap[name].SetValue(es, false); 129 _FieldMap[name].SetValue(es, false);
130 } 130 }
131 else if (_FieldMap[name].GetValue(es) is LLUUID) 131 else if (_FieldMap[name].GetValue(es) is UUID)
132 { 132 {
133 LLUUID uuid; 133 UUID uuid;
134 LLUUID.TryParse(reader[name].ToString(), out uuid); 134 UUID.TryParse(reader[name].ToString(), out uuid);
135 135
136 _FieldMap[name].SetValue(es, uuid); 136 _FieldMap[name].SetValue(es, uuid);
137 } 137 }
@@ -333,8 +333,8 @@ namespace OpenSim.Data.MSSQL
333 { 333 {
334 EstateBan eb = new EstateBan(); 334 EstateBan eb = new EstateBan();
335 335
336 LLUUID uuid; 336 UUID uuid;
337 LLUUID.TryParse(reader["bannedUUID"].ToString(), out uuid); 337 UUID.TryParse(reader["bannedUUID"].ToString(), out uuid);
338 338
339 eb.bannedUUID = uuid; 339 eb.bannedUUID = uuid;
340 eb.bannedIP = "0.0.0.0"; 340 eb.bannedIP = "0.0.0.0";
@@ -345,9 +345,9 @@ namespace OpenSim.Data.MSSQL
345 } 345 }
346 } 346 }
347 347
348 private LLUUID[] LoadUUIDList(uint estateID, string table) 348 private UUID[] LoadUUIDList(uint estateID, string table)
349 { 349 {
350 List<LLUUID> uuids = new List<LLUUID>(); 350 List<UUID> uuids = new List<UUID>();
351 351
352 string sql = string.Format("select uuid from {0} where EstateID = @EstateID", table); 352 string sql = string.Format("select uuid from {0} where EstateID = @EstateID", table);
353 353
@@ -361,8 +361,8 @@ namespace OpenSim.Data.MSSQL
361 { 361 {
362 // EstateBan eb = new EstateBan(); 362 // EstateBan eb = new EstateBan();
363 363
364 LLUUID uuid; 364 UUID uuid;
365 LLUUID.TryParse(reader["uuid"].ToString(), out uuid); 365 UUID.TryParse(reader["uuid"].ToString(), out uuid);
366 366
367 uuids.Add(uuid); 367 uuids.Add(uuid);
368 } 368 }
@@ -399,7 +399,7 @@ namespace OpenSim.Data.MSSQL
399 } 399 }
400 } 400 }
401 401
402 private void SaveUUIDList(uint estateID, string table, LLUUID[] data) 402 private void SaveUUIDList(uint estateID, string table, UUID[] data)
403 { 403 {
404 //Delete first 404 //Delete first
405 string sql = string.Format("delete from {0} where EstateID = @EstateID", table); 405 string sql = string.Format("delete from {0} where EstateID = @EstateID", table);
@@ -416,7 +416,7 @@ namespace OpenSim.Data.MSSQL
416 416
417 bool createParamOnce = true; 417 bool createParamOnce = true;
418 418
419 foreach (LLUUID uuid in data) 419 foreach (UUID uuid in data)
420 { 420 {
421 if (createParamOnce) 421 if (createParamOnce)
422 { 422 {
diff --git a/OpenSim/Data/MSSQL/MSSQLGridData.cs b/OpenSim/Data/MSSQL/MSSQLGridData.cs
index 423d4aa..47edc4b 100644
--- a/OpenSim/Data/MSSQL/MSSQLGridData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLGridData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.Reflection; 31using System.Reflection;
32using System.Security.Cryptography; 32using System.Security.Cryptography;
33using System.Text; 33using System.Text;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37 37
@@ -176,7 +176,7 @@ namespace OpenSim.Data.MSSQL
176 /// </summary> 176 /// </summary>
177 /// <param name="uuid">The region UUID</param> 177 /// <param name="uuid">The region UUID</param>
178 /// <returns>The sim profile</returns> 178 /// <returns>The sim profile</returns>
179 override public RegionProfileData GetProfileByLLUUID(LLUUID uuid) 179 override public RegionProfileData GetProfileByUUID(UUID uuid)
180 { 180 {
181 Dictionary<string, string> param = new Dictionary<string, string>(); 181 Dictionary<string, string> param = new Dictionary<string, string>();
182 param["uuid"] = uuid.ToString(); 182 param["uuid"] = uuid.ToString();
@@ -284,7 +284,7 @@ namespace OpenSim.Data.MSSQL
284 284
285 parameters["regionHandle"] = profile.regionHandle.ToString(); 285 parameters["regionHandle"] = profile.regionHandle.ToString();
286 parameters["regionName"] = profile.regionName; 286 parameters["regionName"] = profile.regionName;
287 parameters["uuid"] = profile.UUID.ToString(); 287 parameters["uuid"] = profile.ToString();
288 parameters["regionRecvKey"] = profile.regionRecvKey; 288 parameters["regionRecvKey"] = profile.regionRecvKey;
289 parameters["regionSecret"] = profile.regionSecret; 289 parameters["regionSecret"] = profile.regionSecret;
290 parameters["regionSendKey"] = profile.regionSendKey; 290 parameters["regionSendKey"] = profile.regionSendKey;
@@ -352,7 +352,7 @@ namespace OpenSim.Data.MSSQL
352 352
353 parameters["regionHandle"] = profile.regionHandle.ToString(); 353 parameters["regionHandle"] = profile.regionHandle.ToString();
354 parameters["regionName"] = profile.regionName; 354 parameters["regionName"] = profile.regionName;
355 parameters["uuid"] = profile.UUID.ToString(); 355 parameters["uuid"] = profile.ToString();
356 parameters["regionRecvKey"] = profile.regionRecvKey; 356 parameters["regionRecvKey"] = profile.regionRecvKey;
357 parameters["regionSecret"] = profile.regionSecret; 357 parameters["regionSecret"] = profile.regionSecret;
358 parameters["regionSendKey"] = profile.regionSendKey; 358 parameters["regionSendKey"] = profile.regionSendKey;
@@ -403,14 +403,14 @@ namespace OpenSim.Data.MSSQL
403 /// <param name="handle">The attempted regionHandle of the challenger</param> 403 /// <param name="handle">The attempted regionHandle of the challenger</param>
404 /// <param name="authkey">The secret</param> 404 /// <param name="authkey">The secret</param>
405 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns> 405 /// <returns>Whether the secret and regionhandle match the database entry for UUID</returns>
406 override public bool AuthenticateSim(LLUUID uuid, ulong handle, string authkey) 406 override public bool AuthenticateSim(UUID uuid, ulong handle, string authkey)
407 { 407 {
408 bool throwHissyFit = false; // Should be true by 1.0 408 bool throwHissyFit = false; // Should be true by 1.0
409 409
410 if (throwHissyFit) 410 if (throwHissyFit)
411 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential."); 411 throw new Exception("CRYPTOWEAK AUTHENTICATE: Refusing to authenticate due to replay potential.");
412 412
413 RegionProfileData data = GetProfileByLLUUID(uuid); 413 RegionProfileData data = GetProfileByUUID(uuid);
414 414
415 return (handle == data.regionHandle && authkey == data.regionSecret); 415 return (handle == data.regionHandle && authkey == data.regionSecret);
416 } 416 }
@@ -424,7 +424,7 @@ namespace OpenSim.Data.MSSQL
424 /// <param name="authhash"></param> 424 /// <param name="authhash"></param>
425 /// <param name="challenge"></param> 425 /// <param name="challenge"></param>
426 /// <returns></returns> 426 /// <returns></returns>
427 public bool AuthenticateSim(LLUUID uuid, ulong handle, string authhash, string challenge) 427 public bool AuthenticateSim(UUID uuid, ulong handle, string authhash, string challenge)
428 { 428 {
429 // SHA512Managed HashProvider = new SHA512Managed(); 429 // SHA512Managed HashProvider = new SHA512Managed();
430 // Encoding TextProvider = new UTF8Encoding(); 430 // Encoding TextProvider = new UTF8Encoding();
diff --git a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
index 9e60b16..e7df7c1 100644
--- a/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLInventoryData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
@@ -167,7 +167,7 @@ namespace OpenSim.Data.MSSQL
167 /// </summary> 167 /// </summary>
168 /// <param name="folderID">The folder to search</param> 168 /// <param name="folderID">The folder to search</param>
169 /// <returns>A list containing inventory items</returns> 169 /// <returns>A list containing inventory items</returns>
170 public List<InventoryItemBase> getInventoryInFolder(LLUUID folderID) 170 public List<InventoryItemBase> getInventoryInFolder(UUID folderID)
171 { 171 {
172 try 172 try
173 { 173 {
@@ -201,13 +201,13 @@ namespace OpenSim.Data.MSSQL
201 /// </summary> 201 /// </summary>
202 /// <param name="user">The user whos inventory is to be searched</param> 202 /// <param name="user">The user whos inventory is to be searched</param>
203 /// <returns>A list of folder objects</returns> 203 /// <returns>A list of folder objects</returns>
204 public List<InventoryFolderBase> getUserRootFolders(LLUUID user) 204 public List<InventoryFolderBase> getUserRootFolders(UUID user)
205 { 205 {
206 try 206 try
207 { 207 {
208 Dictionary<string, string> param = new Dictionary<string, string>(); 208 Dictionary<string, string> param = new Dictionary<string, string>();
209 param["uuid"] = user.ToString(); 209 param["uuid"] = user.ToString();
210 param["zero"] = LLUUID.Zero.ToString(); 210 param["zero"] = UUID.Zero.ToString();
211 211
212 using (IDbCommand result = 212 using (IDbCommand result =
213 database.Query( 213 database.Query(
@@ -235,13 +235,13 @@ namespace OpenSim.Data.MSSQL
235 /// </summary> 235 /// </summary>
236 /// <param name="user">the User UUID</param> 236 /// <param name="user">the User UUID</param>
237 /// <returns></returns> 237 /// <returns></returns>
238 public InventoryFolderBase getUserRootFolder(LLUUID user) 238 public InventoryFolderBase getUserRootFolder(UUID user)
239 { 239 {
240 try 240 try
241 { 241 {
242 Dictionary<string, string> param = new Dictionary<string, string>(); 242 Dictionary<string, string> param = new Dictionary<string, string>();
243 param["uuid"] = user.ToString(); 243 param["uuid"] = user.ToString();
244 param["zero"] = LLUUID.Zero.ToString(); 244 param["zero"] = UUID.Zero.ToString();
245 245
246 using (IDbCommand result = 246 using (IDbCommand result =
247 database.Query( 247 database.Query(
@@ -281,7 +281,7 @@ namespace OpenSim.Data.MSSQL
281 /// </summary> 281 /// </summary>
282 /// <param name="parentID">The folder to search</param> 282 /// <param name="parentID">The folder to search</param>
283 /// <returns>A list of inventory folders</returns> 283 /// <returns>A list of inventory folders</returns>
284 public List<InventoryFolderBase> getInventoryFolders(LLUUID parentID) 284 public List<InventoryFolderBase> getInventoryFolders(UUID parentID)
285 { 285 {
286 try 286 try
287 { 287 {
@@ -318,23 +318,23 @@ namespace OpenSim.Data.MSSQL
318 { 318 {
319 InventoryItemBase item = new InventoryItemBase(); 319 InventoryItemBase item = new InventoryItemBase();
320 320
321 item.ID = new LLUUID((string) reader["inventoryID"]); 321 item.ID = new UUID((string) reader["inventoryID"]);
322 item.AssetID = new LLUUID((string) reader["assetID"]); 322 item.AssetID = new UUID((string) reader["assetID"]);
323 item.AssetType = (int) reader["assetType"]; 323 item.AssetType = (int) reader["assetType"];
324 item.Folder = new LLUUID((string) reader["parentFolderID"]); 324 item.Folder = new UUID((string) reader["parentFolderID"]);
325 item.Owner = new LLUUID((string) reader["avatarID"]); 325 item.Owner = new UUID((string) reader["avatarID"]);
326 item.Name = (string) reader["inventoryName"]; 326 item.Name = (string) reader["inventoryName"];
327 item.Description = (string) reader["inventoryDescription"]; 327 item.Description = (string) reader["inventoryDescription"];
328 item.NextPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryNextPermissions"]); 328 item.NextPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryNextPermissions"]);
329 item.CurrentPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryCurrentPermissions"]); 329 item.CurrentPermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryCurrentPermissions"]);
330 item.InvType = (int) reader["invType"]; 330 item.InvType = (int) reader["invType"];
331 item.Creator = new LLUUID((string) reader["creatorID"]); 331 item.Creator = new UUID((string) reader["creatorID"]);
332 item.BasePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryBasePermissions"]); 332 item.BasePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryBasePermissions"]);
333 item.EveryOnePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryEveryOnePermissions"]); 333 item.EveryOnePermissions = ConvertInt32BitFieldToUint32((int)reader["inventoryEveryOnePermissions"]);
334 item.SalePrice = (int) reader["salePrice"]; 334 item.SalePrice = (int) reader["salePrice"];
335 item.SaleType = Convert.ToByte(reader["saleType"]); 335 item.SaleType = Convert.ToByte(reader["saleType"]);
336 item.CreationDate = (int) reader["creationDate"]; 336 item.CreationDate = (int) reader["creationDate"];
337 item.GroupID = new LLUUID(reader["groupID"].ToString()); 337 item.GroupID = new UUID(reader["groupID"].ToString());
338 item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); 338 item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]);
339 item.Flags = ConvertInt32BitFieldToUint32((int)reader["flags"]); 339 item.Flags = ConvertInt32BitFieldToUint32((int)reader["flags"]);
340 340
@@ -353,7 +353,7 @@ namespace OpenSim.Data.MSSQL
353 /// </summary> 353 /// </summary>
354 /// <param name="item">The item to return</param> 354 /// <param name="item">The item to return</param>
355 /// <returns>An inventory item</returns> 355 /// <returns>An inventory item</returns>
356 public InventoryItemBase getInventoryItem(LLUUID itemID) 356 public InventoryItemBase getInventoryItem(UUID itemID)
357 { 357 {
358 try 358 try
359 { 359 {
@@ -389,9 +389,9 @@ namespace OpenSim.Data.MSSQL
389 try 389 try
390 { 390 {
391 InventoryFolderBase folder = new InventoryFolderBase(); 391 InventoryFolderBase folder = new InventoryFolderBase();
392 folder.Owner = new LLUUID((string) reader["agentID"]); 392 folder.Owner = new UUID((string) reader["agentID"]);
393 folder.ParentID = new LLUUID((string) reader["parentFolderID"]); 393 folder.ParentID = new UUID((string) reader["parentFolderID"]);
394 folder.ID = new LLUUID((string) reader["folderID"]); 394 folder.ID = new UUID((string) reader["folderID"]);
395 folder.Name = (string) reader["folderName"]; 395 folder.Name = (string) reader["folderName"];
396 folder.Type = (short) reader["type"]; 396 folder.Type = (short) reader["type"];
397 folder.Version = Convert.ToUInt16(reader["version"]); 397 folder.Version = Convert.ToUInt16(reader["version"]);
@@ -410,7 +410,7 @@ namespace OpenSim.Data.MSSQL
410 /// </summary> 410 /// </summary>
411 /// <param name="folder">The folder to return</param> 411 /// <param name="folder">The folder to return</param>
412 /// <returns>A folder class</returns> 412 /// <returns>A folder class</returns>
413 public InventoryFolderBase getInventoryFolder(LLUUID folderID) 413 public InventoryFolderBase getInventoryFolder(UUID folderID)
414 { 414 {
415 try 415 try
416 { 416 {
@@ -556,7 +556,7 @@ namespace OpenSim.Data.MSSQL
556 /// Delete an item in inventory database 556 /// Delete an item in inventory database
557 /// </summary> 557 /// </summary>
558 /// <param name="item">the item UUID</param> 558 /// <param name="item">the item UUID</param>
559 public void deleteInventoryItem(LLUUID itemID) 559 public void deleteInventoryItem(UUID itemID)
560 { 560 {
561 try 561 try
562 { 562 {
@@ -679,7 +679,7 @@ namespace OpenSim.Data.MSSQL
679 /// </summary> 679 /// </summary>
680 /// <param name="folders">list where folders will be appended</param> 680 /// <param name="folders">list where folders will be appended</param>
681 /// <param name="parentID">ID of parent</param> 681 /// <param name="parentID">ID of parent</param>
682 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, LLUUID parentID) 682 protected void getInventoryFolders(ref List<InventoryFolderBase> folders, UUID parentID)
683 { 683 {
684 List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID); 684 List<InventoryFolderBase> subfolderList = getInventoryFolders(parentID);
685 685
@@ -688,7 +688,7 @@ namespace OpenSim.Data.MSSQL
688 } 688 }
689 689
690 // See IInventoryDataPlugin 690 // See IInventoryDataPlugin
691 public List<InventoryFolderBase> getFolderHierarchy(LLUUID parentID) 691 public List<InventoryFolderBase> getFolderHierarchy(UUID parentID)
692 { 692 {
693 List<InventoryFolderBase> folders = new List<InventoryFolderBase>(); 693 List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
694 getInventoryFolders(ref folders, parentID); 694 getInventoryFolders(ref folders, parentID);
@@ -703,7 +703,7 @@ namespace OpenSim.Data.MSSQL
703 /// Delete a folder in inventory databasae 703 /// Delete a folder in inventory databasae
704 /// </summary> 704 /// </summary>
705 /// <param name="folderID">the folder UUID</param> 705 /// <param name="folderID">the folder UUID</param>
706 protected void deleteOneFolder(LLUUID folderID) 706 protected void deleteOneFolder(UUID folderID)
707 { 707 {
708 try 708 try
709 { 709 {
@@ -725,7 +725,7 @@ namespace OpenSim.Data.MSSQL
725 /// Delete an item in inventory database 725 /// Delete an item in inventory database
726 /// </summary> 726 /// </summary>
727 /// <param name="folderID">the item ID</param> 727 /// <param name="folderID">the item ID</param>
728 protected void deleteItemsInFolder(LLUUID folderID) 728 protected void deleteItemsInFolder(UUID folderID)
729 { 729 {
730 try 730 try
731 { 731 {
@@ -749,7 +749,7 @@ namespace OpenSim.Data.MSSQL
749 /// Delete an inventory folder 749 /// Delete an inventory folder
750 /// </summary> 750 /// </summary>
751 /// <param name="folderId">Id of folder to delete</param> 751 /// <param name="folderId">Id of folder to delete</param>
752 public void deleteInventoryFolder(LLUUID folderID) 752 public void deleteInventoryFolder(UUID folderID)
753 { 753 {
754 // lock (database) 754 // lock (database)
755 { 755 {
diff --git a/OpenSim/Data/MSSQL/MSSQLManager.cs b/OpenSim/Data/MSSQL/MSSQLManager.cs
index 535cf33..abbcddf 100644
--- a/OpenSim/Data/MSSQL/MSSQLManager.cs
+++ b/OpenSim/Data/MSSQL/MSSQLManager.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37 37
@@ -220,7 +220,7 @@ namespace OpenSim.Data.MSSQL
220 { 220 {
221 return SqlDbType.Bit; 221 return SqlDbType.Bit;
222 } 222 }
223 if (type == typeof(LLUUID)) 223 if (type == typeof(UUID))
224 { 224 {
225 return SqlDbType.VarChar; 225 return SqlDbType.VarChar;
226 } 226 }
@@ -244,7 +244,7 @@ namespace OpenSim.Data.MSSQL
244 { 244 {
245 Type valueType = value.GetType(); 245 Type valueType = value.GetType();
246 246
247 if (valueType == typeof(LLUUID)) 247 if (valueType == typeof(UUID))
248 { 248 {
249 return value.ToString(); 249 return value.ToString();
250 } 250 }
@@ -335,7 +335,7 @@ namespace OpenSim.Data.MSSQL
335 // Region Main 335 // Region Main
336 regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]); 336 regionprofile.regionHandle = Convert.ToUInt64(reader["regionHandle"]);
337 regionprofile.regionName = (string)reader["regionName"]; 337 regionprofile.regionName = (string)reader["regionName"];
338 regionprofile.UUID = new LLUUID((string)reader["uuid"]); 338 regionprofile.UUID = new UUID((string)reader["uuid"]);
339 339
340 // Secrets 340 // Secrets
341 regionprofile.regionRecvKey = (string)reader["regionRecvKey"]; 341 regionprofile.regionRecvKey = (string)reader["regionRecvKey"];
@@ -372,16 +372,16 @@ namespace OpenSim.Data.MSSQL
372 regionprofile.regionUserURI = (string)reader["regionUserURI"]; 372 regionprofile.regionUserURI = (string)reader["regionUserURI"];
373 regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"]; 373 regionprofile.regionUserRecvKey = (string)reader["regionUserRecvKey"];
374 regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"]; 374 regionprofile.regionUserSendKey = (string)reader["regionUserSendKey"];
375 regionprofile.owner_uuid = new LLUUID((string) reader["owner_uuid"]); 375 regionprofile.owner_uuid = new UUID((string) reader["owner_uuid"]);
376 // World Map Addition 376 // World Map Addition
377 string tempRegionMap = reader["regionMapTexture"].ToString(); 377 string tempRegionMap = reader["regionMapTexture"].ToString();
378 if (tempRegionMap != String.Empty) 378 if (tempRegionMap != String.Empty)
379 { 379 {
380 regionprofile.regionMapTextureID = new LLUUID(tempRegionMap); 380 regionprofile.regionMapTextureID = new UUID(tempRegionMap);
381 } 381 }
382 else 382 else
383 { 383 {
384 regionprofile.regionMapTextureID = new LLUUID(); 384 regionprofile.regionMapTextureID = new UUID();
385 } 385 }
386 } 386 }
387 else 387 else
@@ -403,7 +403,7 @@ namespace OpenSim.Data.MSSQL
403 403
404 if (reader.Read()) 404 if (reader.Read())
405 { 405 {
406 retval.ID = new LLUUID((string)reader["UUID"]); 406 retval.ID = new UUID((string)reader["UUID"]);
407 retval.FirstName = (string)reader["username"]; 407 retval.FirstName = (string)reader["username"];
408 retval.SurName = (string)reader["lastname"]; 408 retval.SurName = (string)reader["lastname"];
409 409
@@ -411,11 +411,11 @@ namespace OpenSim.Data.MSSQL
411 retval.PasswordSalt = (string)reader["passwordSalt"]; 411 retval.PasswordSalt = (string)reader["passwordSalt"];
412 412
413 retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString()); 413 retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
414 retval.HomeLocation = new LLVector3( 414 retval.HomeLocation = new Vector3(
415 Convert.ToSingle(reader["homeLocationX"].ToString()), 415 Convert.ToSingle(reader["homeLocationX"].ToString()),
416 Convert.ToSingle(reader["homeLocationY"].ToString()), 416 Convert.ToSingle(reader["homeLocationY"].ToString()),
417 Convert.ToSingle(reader["homeLocationZ"].ToString())); 417 Convert.ToSingle(reader["homeLocationZ"].ToString()));
418 retval.HomeLookAt = new LLVector3( 418 retval.HomeLookAt = new Vector3(
419 Convert.ToSingle(reader["homeLookAtX"].ToString()), 419 Convert.ToSingle(reader["homeLookAtX"].ToString()),
420 Convert.ToSingle(reader["homeLookAtY"].ToString()), 420 Convert.ToSingle(reader["homeLookAtY"].ToString()),
421 Convert.ToSingle(reader["homeLookAtZ"].ToString())); 421 Convert.ToSingle(reader["homeLookAtZ"].ToString()));
@@ -432,9 +432,9 @@ namespace OpenSim.Data.MSSQL
432 retval.AboutText = (string)reader["profileAboutText"]; 432 retval.AboutText = (string)reader["profileAboutText"];
433 retval.FirstLifeAboutText = (string)reader["profileFirstText"]; 433 retval.FirstLifeAboutText = (string)reader["profileFirstText"];
434 434
435 retval.Image = new LLUUID((string)reader["profileImage"]); 435 retval.Image = new UUID((string)reader["profileImage"]);
436 retval.FirstLifeImage = new LLUUID((string)reader["profileFirstImage"]); 436 retval.FirstLifeImage = new UUID((string)reader["profileFirstImage"]);
437 retval.WebLoginKey = new LLUUID((string)reader["webLoginKey"]); 437 retval.WebLoginKey = new UUID((string)reader["webLoginKey"]);
438 } 438 }
439 else 439 else
440 { 440 {
@@ -455,9 +455,9 @@ namespace OpenSim.Data.MSSQL
455 if (reader.Read()) 455 if (reader.Read())
456 { 456 {
457 // Agent IDs 457 // Agent IDs
458 retval.ProfileID = new LLUUID((string)reader["UUID"]); 458 retval.ProfileID = new UUID((string)reader["UUID"]);
459 retval.SessionID = new LLUUID((string)reader["sessionID"]); 459 retval.SessionID = new UUID((string)reader["sessionID"]);
460 retval.SecureSessionID = new LLUUID((string)reader["secureSessionID"]); 460 retval.SecureSessionID = new UUID((string)reader["secureSessionID"]);
461 461
462 // Agent Who? 462 // Agent Who?
463 retval.AgentIP = (string)reader["agentIP"]; 463 retval.AgentIP = (string)reader["agentIP"];
@@ -471,8 +471,8 @@ namespace OpenSim.Data.MSSQL
471 // Current position 471 // Current position
472 retval.Region = (string)reader["currentRegion"]; 472 retval.Region = (string)reader["currentRegion"];
473 retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString()); 473 retval.Handle = Convert.ToUInt64(reader["currentHandle"].ToString());
474 LLVector3 tmp_v; 474 Vector3 tmp_v;
475 LLVector3.TryParse((string)reader["currentPos"], out tmp_v); 475 Vector3.TryParse((string)reader["currentPos"], out tmp_v);
476 retval.Position = tmp_v; 476 retval.Position = tmp_v;
477 477
478 } 478 }
@@ -497,7 +497,7 @@ namespace OpenSim.Data.MSSQL
497 asset = new AssetBase(); 497 asset = new AssetBase();
498 asset.Data = (byte[])reader["data"]; 498 asset.Data = (byte[])reader["data"];
499 asset.Description = (string)reader["description"]; 499 asset.Description = (string)reader["description"];
500 asset.FullID = new LLUUID((string)reader["id"]); 500 asset.FullID = new UUID((string)reader["id"]);
501 asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false; 501 asset.Local = Convert.ToBoolean(reader["local"]); // ((sbyte)reader["local"]) != 0 ? true : false;
502 asset.Name = (string)reader["name"]; 502 asset.Name = (string)reader["name"];
503 asset.Type = Convert.ToSByte(reader["assetType"]); 503 asset.Type = Convert.ToSByte(reader["assetType"]);
diff --git a/OpenSim/Data/MSSQL/MSSQLRegionData.cs b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
index 46aa6c9..d267e41 100644
--- a/OpenSim/Data/MSSQL/MSSQLRegionData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLRegionData.cs
@@ -31,7 +31,7 @@ using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.IO; 32using System.IO;
33using System.Reflection; 33using System.Reflection;
34using libsecondlife; 34using OpenMetaverse;
35using log4net; 35using log4net;
36using OpenSim.Framework; 36using OpenSim.Framework;
37using OpenSim.Region.Environment.Interfaces; 37using OpenSim.Region.Environment.Interfaces;
@@ -174,12 +174,12 @@ namespace OpenSim.Data.MSSQL
174 /// </summary> 174 /// </summary>
175 /// <param name="regionUUID">The region UUID.</param> 175 /// <param name="regionUUID">The region UUID.</param>
176 /// <returns></returns> 176 /// <returns></returns>
177 public List<SceneObjectGroup> LoadObjects(LLUUID regionUUID) 177 public List<SceneObjectGroup> LoadObjects(UUID regionUUID)
178 { 178 {
179 Dictionary<LLUUID, SceneObjectGroup> createdObjects = new Dictionary<LLUUID, SceneObjectGroup>(); 179 Dictionary<UUID, SceneObjectGroup> createdObjects = new Dictionary<UUID, SceneObjectGroup>();
180 180
181 //Retrieve all values of current region 181 //Retrieve all values of current region
182 RetrievePrimsDataForRegion(regionUUID, LLUUID.Zero, ""); 182 RetrievePrimsDataForRegion(regionUUID, UUID.Zero, "");
183 183
184 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); 184 List<SceneObjectGroup> retvals = new List<SceneObjectGroup>();
185 185
@@ -235,7 +235,7 @@ namespace OpenSim.Data.MSSQL
235 "No shape found for prim in storage, so setting default box shape"); 235 "No shape found for prim in storage, so setting default box shape");
236 prim.Shape = PrimitiveBaseShape.Default; 236 prim.Shape = PrimitiveBaseShape.Default;
237 } 237 }
238 createdObjects[new LLUUID(objID)].AddPart(prim); 238 createdObjects[new UUID(objID)].AddPart(prim);
239 } 239 }
240 240
241 LoadItems(prim); 241 LoadItems(prim);
@@ -292,7 +292,7 @@ namespace OpenSim.Data.MSSQL
292// } 292// }
293// else 293// else
294// { 294// {
295// createdObjects[new LLUUID(objID)].AddPart(prim); 295// createdObjects[new UUID(objID)].AddPart(prim);
296// } 296// }
297// } 297// }
298// } 298// }
@@ -307,7 +307,7 @@ namespace OpenSim.Data.MSSQL
307// { 307// {
308// while (readerShapes.Read()) 308// while (readerShapes.Read())
309// { 309// {
310// LLUUID UUID = new LLUUID((string) readerShapes["UUID"]); 310// UUID UUID = new UUID((string) readerShapes["UUID"]);
311// 311//
312// foreach (SceneObjectGroup objectGroup in createdObjects.Values) 312// foreach (SceneObjectGroup objectGroup in createdObjects.Values)
313// { 313// {
@@ -324,7 +324,7 @@ namespace OpenSim.Data.MSSQL
324 #endregion 324 #endregion
325 } 325 }
326 326
327 public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) 327 public void StoreObject(SceneObjectGroup obj, UUID regionUUID)
328 { 328 {
329 //Retrieve all values of current region, and current scene/or prims 329 //Retrieve all values of current region, and current scene/or prims
330 //Build primID's, we use IN so I can select all prims from objgroup 330 //Build primID's, we use IN so I can select all prims from objgroup
@@ -341,9 +341,9 @@ namespace OpenSim.Data.MSSQL
341 341
342 foreach (SceneObjectPart prim in obj.Children.Values) 342 foreach (SceneObjectPart prim in obj.Children.Values)
343 { 343 {
344 if ((prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Physics) == 0 344 if ((prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Physics) == 0
345 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.Temporary) == 0 345 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.Temporary) == 0
346 && (prim.GetEffectiveObjectFlags() & (uint)LLObject.ObjectFlags.TemporaryOnRez) == 0) 346 && (prim.GetEffectiveObjectFlags() & (uint)PrimFlags.TemporaryOnRez) == 0)
347 { 347 {
348 lock (_PrimsDataSet) 348 lock (_PrimsDataSet)
349 { 349 {
@@ -391,7 +391,7 @@ namespace OpenSim.Data.MSSQL
391 /// </summary> 391 /// </summary>
392 /// <param name="objectID">id of scenegroup</param> 392 /// <param name="objectID">id of scenegroup</param>
393 /// <param name="regionUUID">regionUUID (is this used anyway</param> 393 /// <param name="regionUUID">regionUUID (is this used anyway</param>
394 public void RemoveObject(LLUUID objectID, LLUUID regionUUID) 394 public void RemoveObject(UUID objectID, UUID regionUUID)
395 { 395 {
396 _Log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", objectID, regionUUID); 396 _Log.InfoFormat("[REGION DB]: Removing obj: {0} from region: {1}", objectID, regionUUID);
397 397
@@ -418,7 +418,7 @@ namespace OpenSim.Data.MSSQL
418 /// </summary> 418 /// </summary>
419 /// <param name="primID"></param> 419 /// <param name="primID"></param>
420 /// <param name="items"></param> 420 /// <param name="items"></param>
421 public void StorePrimInventory(LLUUID primID, ICollection<TaskInventoryItem> items) 421 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
422 { 422 {
423 _Log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID); 423 _Log.InfoFormat("[REGION DB]: Persisting Prim Inventory with prim ID {0}", primID);
424 424
@@ -456,7 +456,7 @@ namespace OpenSim.Data.MSSQL
456 /// </summary> 456 /// </summary>
457 /// <param name="regionID">regionID.</param> 457 /// <param name="regionID">regionID.</param>
458 /// <returns></returns> 458 /// <returns></returns>
459 public double[,] LoadTerrain(LLUUID regionID) 459 public double[,] LoadTerrain(UUID regionID)
460 { 460 {
461 double[,] terrain = new double[256, 256]; 461 double[,] terrain = new double[256, 256];
462 terrain.Initialize(); 462 terrain.Initialize();
@@ -501,7 +501,7 @@ namespace OpenSim.Data.MSSQL
501 /// </summary> 501 /// </summary>
502 /// <param name="terrain">terrain map data.</param> 502 /// <param name="terrain">terrain map data.</param>
503 /// <param name="regionID">regionID.</param> 503 /// <param name="regionID">regionID.</param>
504 public void StoreTerrain(double[,] terrain, LLUUID regionID) 504 public void StoreTerrain(double[,] terrain, UUID regionID)
505 { 505 {
506 int revision = Util.UnixTimeSinceEpoch(); 506 int revision = Util.UnixTimeSinceEpoch();
507 507
@@ -532,7 +532,7 @@ namespace OpenSim.Data.MSSQL
532 /// </summary> 532 /// </summary>
533 /// <param name="regionUUID">The region UUID.</param> 533 /// <param name="regionUUID">The region UUID.</param>
534 /// <returns></returns> 534 /// <returns></returns>
535 public List<LandData> LoadLandObjects(LLUUID regionUUID) 535 public List<LandData> LoadLandObjects(UUID regionUUID)
536 { 536 {
537 List<LandData> landDataForRegion = new List<LandData>(); 537 List<LandData> landDataForRegion = new List<LandData>();
538 538
@@ -617,7 +617,7 @@ VALUES
617 /// Removes a land object from DB. 617 /// Removes a land object from DB.
618 /// </summary> 618 /// </summary>
619 /// <param name="globalID">UUID of landobject</param> 619 /// <param name="globalID">UUID of landobject</param>
620 public void RemoveLandObject(LLUUID globalID) 620 public void RemoveLandObject(UUID globalID)
621 { 621 {
622 using (AutoClosingSqlCommand cmd = _Database.Query("delete from land where UUID=@UUID")) 622 using (AutoClosingSqlCommand cmd = _Database.Query("delete from land where UUID=@UUID"))
623 { 623 {
@@ -637,7 +637,7 @@ VALUES
637 /// </summary> 637 /// </summary>
638 /// <param name="regionUUID">The region UUID.</param> 638 /// <param name="regionUUID">The region UUID.</param>
639 /// <returns></returns> 639 /// <returns></returns>
640 public RegionSettings LoadRegionSettings(LLUUID regionUUID) 640 public RegionSettings LoadRegionSettings(UUID regionUUID)
641 { 641 {
642 string sql = "select * from regionsettings where regionUUID = @regionUUID"; 642 string sql = "select * from regionsettings where regionUUID = @regionUUID";
643 RegionSettings regionSettings; 643 RegionSettings regionSettings;
@@ -801,7 +801,7 @@ VALUES
801 //TODO change this is some more generic code so we doesnt have to change it every time a new field is added? 801 //TODO change this is some more generic code so we doesnt have to change it every time a new field is added?
802 RegionSettings newSettings = new RegionSettings(); 802 RegionSettings newSettings = new RegionSettings();
803 803
804 newSettings.RegionUUID = new LLUUID((string)row["regionUUID"]); 804 newSettings.RegionUUID = new UUID((string)row["regionUUID"]);
805 newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]); 805 newSettings.BlockTerraform = Convert.ToBoolean(row["block_terraform"]);
806 newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]); 806 newSettings.AllowDamage = Convert.ToBoolean(row["allow_damage"]);
807 newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]); 807 newSettings.BlockFly = Convert.ToBoolean(row["block_fly"]);
@@ -815,10 +815,10 @@ VALUES
815 newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]); 815 newSettings.DisableScripts = Convert.ToBoolean(row["disable_scripts"]);
816 newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]); 816 newSettings.DisableCollisions = Convert.ToBoolean(row["disable_collisions"]);
817 newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]); 817 newSettings.DisablePhysics = Convert.ToBoolean(row["disable_physics"]);
818 newSettings.TerrainTexture1 = new LLUUID((String)row["terrain_texture_1"]); 818 newSettings.TerrainTexture1 = new UUID((String)row["terrain_texture_1"]);
819 newSettings.TerrainTexture2 = new LLUUID((String)row["terrain_texture_2"]); 819 newSettings.TerrainTexture2 = new UUID((String)row["terrain_texture_2"]);
820 newSettings.TerrainTexture3 = new LLUUID((String)row["terrain_texture_3"]); 820 newSettings.TerrainTexture3 = new UUID((String)row["terrain_texture_3"]);
821 newSettings.TerrainTexture4 = new LLUUID((String)row["terrain_texture_4"]); 821 newSettings.TerrainTexture4 = new UUID((String)row["terrain_texture_4"]);
822 newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]); 822 newSettings.Elevation1NW = Convert.ToDouble(row["elevation_1_nw"]);
823 newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]); 823 newSettings.Elevation2NW = Convert.ToDouble(row["elevation_2_nw"]);
824 newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]); 824 newSettings.Elevation1NE = Convert.ToDouble(row["elevation_1_ne"]);
@@ -834,7 +834,7 @@ VALUES
834 newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]); 834 newSettings.Sandbox = Convert.ToBoolean(row["sandbox"]);
835 newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]); 835 newSettings.FixedSun = Convert.ToBoolean(row["fixed_sun"]);
836 newSettings.SunPosition = Convert.ToDouble(row["sun_position"]); 836 newSettings.SunPosition = Convert.ToDouble(row["sun_position"]);
837 newSettings.Covenant = new LLUUID((String)row["covenant"]); 837 newSettings.Covenant = new UUID((String)row["covenant"]);
838 838
839 return newSettings; 839 return newSettings;
840 } 840 }
@@ -848,7 +848,7 @@ VALUES
848 { 848 {
849 LandData newData = new LandData(); 849 LandData newData = new LandData();
850 850
851 newData.GlobalID = new LLUUID((String)row["UUID"]); 851 newData.GlobalID = new UUID((String)row["UUID"]);
852 newData.LocalID = Convert.ToInt32(row["LocalLandID"]); 852 newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
853 853
854 // Bitmap is a byte[512] 854 // Bitmap is a byte[512]
@@ -864,41 +864,41 @@ VALUES
864 //Enum libsecondlife.Parcel.ParcelCategory 864 //Enum libsecondlife.Parcel.ParcelCategory
865 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]); 865 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
866 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]); 866 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
867 newData.GroupID = new LLUUID((String)row["GroupUUID"]); 867 newData.GroupID = new UUID((String)row["GroupUUID"]);
868 newData.SalePrice = Convert.ToInt32(row["SalePrice"]); 868 newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
869 newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); 869 newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
870 //Enum. libsecondlife.Parcel.ParcelStatus 870 //Enum. libsecondlife.Parcel.ParcelStatus
871 newData.Flags = Convert.ToUInt32(row["LandFlags"]); 871 newData.Flags = Convert.ToUInt32(row["LandFlags"]);
872 newData.LandingType = Convert.ToByte(row["LandingType"]); 872 newData.LandingType = Convert.ToByte(row["LandingType"]);
873 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); 873 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
874 newData.MediaID = new LLUUID((String)row["MediaTextureUUID"]); 874 newData.MediaID = new UUID((String)row["MediaTextureUUID"]);
875 newData.MediaURL = (String)row["MediaURL"]; 875 newData.MediaURL = (String)row["MediaURL"];
876 newData.MusicURL = (String)row["MusicURL"]; 876 newData.MusicURL = (String)row["MusicURL"];
877 newData.PassHours = Convert.ToSingle(row["PassHours"]); 877 newData.PassHours = Convert.ToSingle(row["PassHours"]);
878 newData.PassPrice = Convert.ToInt32(row["PassPrice"]); 878 newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
879 879
880 LLUUID authedbuyer; 880 UUID authedbuyer;
881 LLUUID snapshotID; 881 UUID snapshotID;
882 882
883 if (LLUUID.TryParse((string)row["AuthBuyerID"], out authedbuyer)) 883 if (UUID.TryParse((string)row["AuthBuyerID"], out authedbuyer))
884 newData.AuthBuyerID = authedbuyer; 884 newData.AuthBuyerID = authedbuyer;
885 885
886 if (LLUUID.TryParse((string)row["SnapshotUUID"], out snapshotID)) 886 if (UUID.TryParse((string)row["SnapshotUUID"], out snapshotID))
887 newData.SnapshotID = snapshotID; 887 newData.SnapshotID = snapshotID;
888 888
889 try 889 try
890 { 890 {
891 newData.UserLocation = 891 newData.UserLocation =
892 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 892 new Vector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
893 Convert.ToSingle(row["UserLocationZ"])); 893 Convert.ToSingle(row["UserLocationZ"]));
894 newData.UserLookAt = 894 newData.UserLookAt =
895 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 895 new Vector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
896 Convert.ToSingle(row["UserLookAtZ"])); 896 Convert.ToSingle(row["UserLookAtZ"]));
897 } 897 }
898 catch (InvalidCastException) 898 catch (InvalidCastException)
899 { 899 {
900 newData.UserLocation = LLVector3.Zero; 900 newData.UserLocation = Vector3.Zero;
901 newData.UserLookAt = LLVector3.Zero; 901 newData.UserLookAt = Vector3.Zero;
902 _Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name); 902 _Log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
903 } 903 }
904 904
@@ -915,7 +915,7 @@ VALUES
915 private static ParcelManager.ParcelAccessEntry buildLandAccessData(IDataRecord row) 915 private static ParcelManager.ParcelAccessEntry buildLandAccessData(IDataRecord row)
916 { 916 {
917 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry(); 917 ParcelManager.ParcelAccessEntry entry = new ParcelManager.ParcelAccessEntry();
918 entry.AgentID = new LLUUID((string)row["AccessUUID"]); 918 entry.AgentID = new UUID((string)row["AccessUUID"]);
919 entry.Flags = (ParcelManager.AccessList)Convert.ToInt32(row["Flags"]); 919 entry.Flags = (ParcelManager.AccessList)Convert.ToInt32(row["Flags"]);
920 entry.Time = new DateTime(); 920 entry.Time = new DateTime();
921 return entry; 921 return entry;
@@ -930,7 +930,7 @@ VALUES
930 { 930 {
931 SceneObjectPart prim = new SceneObjectPart(); 931 SceneObjectPart prim = new SceneObjectPart();
932 932
933 prim.UUID = new LLUUID((String)row["UUID"]); 933 prim.UUID = new UUID((String)row["UUID"]);
934 // explicit conversion of integers is required, which sort 934 // explicit conversion of integers is required, which sort
935 // of sucks. No idea if there is a shortcut here or not. 935 // of sucks. No idea if there is a shortcut here or not.
936 prim.ParentID = Convert.ToUInt32(row["ParentID"]); 936 prim.ParentID = Convert.ToUInt32(row["ParentID"]);
@@ -943,54 +943,54 @@ VALUES
943 prim.TouchName = (String)row["TouchName"]; 943 prim.TouchName = (String)row["TouchName"];
944 // permissions 944 // permissions
945 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]); 945 prim.ObjectFlags = Convert.ToUInt32(row["ObjectFlags"]);
946 prim.CreatorID = new LLUUID((String)row["CreatorID"]); 946 prim.CreatorID = new UUID((String)row["CreatorID"]);
947 prim.OwnerID = new LLUUID((String)row["OwnerID"]); 947 prim.OwnerID = new UUID((String)row["OwnerID"]);
948 prim.GroupID = new LLUUID((String)row["GroupID"]); 948 prim.GroupID = new UUID((String)row["GroupID"]);
949 prim.LastOwnerID = new LLUUID((String)row["LastOwnerID"]); 949 prim.LastOwnerID = new UUID((String)row["LastOwnerID"]);
950 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]); 950 prim.OwnerMask = Convert.ToUInt32(row["OwnerMask"]);
951 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]); 951 prim.NextOwnerMask = Convert.ToUInt32(row["NextOwnerMask"]);
952 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]); 952 prim.GroupMask = Convert.ToUInt32(row["GroupMask"]);
953 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]); 953 prim.EveryoneMask = Convert.ToUInt32(row["EveryoneMask"]);
954 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]); 954 prim.BaseMask = Convert.ToUInt32(row["BaseMask"]);
955 // vectors 955 // vectors
956 prim.OffsetPosition = new LLVector3( 956 prim.OffsetPosition = new Vector3(
957 Convert.ToSingle(row["PositionX"]), 957 Convert.ToSingle(row["PositionX"]),
958 Convert.ToSingle(row["PositionY"]), 958 Convert.ToSingle(row["PositionY"]),
959 Convert.ToSingle(row["PositionZ"]) 959 Convert.ToSingle(row["PositionZ"])
960 ); 960 );
961 prim.GroupPosition = new LLVector3( 961 prim.GroupPosition = new Vector3(
962 Convert.ToSingle(row["GroupPositionX"]), 962 Convert.ToSingle(row["GroupPositionX"]),
963 Convert.ToSingle(row["GroupPositionY"]), 963 Convert.ToSingle(row["GroupPositionY"]),
964 Convert.ToSingle(row["GroupPositionZ"]) 964 Convert.ToSingle(row["GroupPositionZ"])
965 ); 965 );
966 prim.Velocity = new LLVector3( 966 prim.Velocity = new Vector3(
967 Convert.ToSingle(row["VelocityX"]), 967 Convert.ToSingle(row["VelocityX"]),
968 Convert.ToSingle(row["VelocityY"]), 968 Convert.ToSingle(row["VelocityY"]),
969 Convert.ToSingle(row["VelocityZ"]) 969 Convert.ToSingle(row["VelocityZ"])
970 ); 970 );
971 prim.AngularVelocity = new LLVector3( 971 prim.AngularVelocity = new Vector3(
972 Convert.ToSingle(row["AngularVelocityX"]), 972 Convert.ToSingle(row["AngularVelocityX"]),
973 Convert.ToSingle(row["AngularVelocityY"]), 973 Convert.ToSingle(row["AngularVelocityY"]),
974 Convert.ToSingle(row["AngularVelocityZ"]) 974 Convert.ToSingle(row["AngularVelocityZ"])
975 ); 975 );
976 prim.Acceleration = new LLVector3( 976 prim.Acceleration = new Vector3(
977 Convert.ToSingle(row["AccelerationX"]), 977 Convert.ToSingle(row["AccelerationX"]),
978 Convert.ToSingle(row["AccelerationY"]), 978 Convert.ToSingle(row["AccelerationY"]),
979 Convert.ToSingle(row["AccelerationZ"]) 979 Convert.ToSingle(row["AccelerationZ"])
980 ); 980 );
981 // quaternions 981 // quaternions
982 prim.RotationOffset = new LLQuaternion( 982 prim.RotationOffset = new Quaternion(
983 Convert.ToSingle(row["RotationX"]), 983 Convert.ToSingle(row["RotationX"]),
984 Convert.ToSingle(row["RotationY"]), 984 Convert.ToSingle(row["RotationY"]),
985 Convert.ToSingle(row["RotationZ"]), 985 Convert.ToSingle(row["RotationZ"]),
986 Convert.ToSingle(row["RotationW"]) 986 Convert.ToSingle(row["RotationW"])
987 ); 987 );
988 prim.SitTargetPositionLL = new LLVector3( 988 prim.SitTargetPositionLL = new Vector3(
989 Convert.ToSingle(row["SitTargetOffsetX"]), 989 Convert.ToSingle(row["SitTargetOffsetX"]),
990 Convert.ToSingle(row["SitTargetOffsetY"]), 990 Convert.ToSingle(row["SitTargetOffsetY"]),
991 Convert.ToSingle(row["SitTargetOffsetZ"]) 991 Convert.ToSingle(row["SitTargetOffsetZ"])
992 ); 992 );
993 prim.SitTargetOrientationLL = new LLQuaternion( 993 prim.SitTargetOrientationLL = new Quaternion(
994 Convert.ToSingle(row["SitTargetOrientX"]), 994 Convert.ToSingle(row["SitTargetOrientX"]),
995 Convert.ToSingle(row["SitTargetOrientY"]), 995 Convert.ToSingle(row["SitTargetOrientY"]),
996 Convert.ToSingle(row["SitTargetOrientZ"]), 996 Convert.ToSingle(row["SitTargetOrientZ"]),
@@ -1003,14 +1003,14 @@ VALUES
1003 prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]); 1003 prim.PayPrice[3] = Convert.ToInt32(row["PayButton3"]);
1004 prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]); 1004 prim.PayPrice[4] = Convert.ToInt32(row["PayButton4"]);
1005 1005
1006 prim.Sound = new LLUUID(row["LoopedSound"].ToString()); 1006 prim.Sound = new UUID(row["LoopedSound"].ToString());
1007 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]); 1007 prim.SoundGain = Convert.ToSingle(row["LoopedSoundGain"]);
1008 prim.SoundFlags = 1; // If it's persisted at all, it's looped 1008 prim.SoundFlags = 1; // If it's persisted at all, it's looped
1009 1009
1010 if (row["TextureAnimation"] != null && row["TextureAnimation"] != DBNull.Value) 1010 if (row["TextureAnimation"] != null && row["TextureAnimation"] != DBNull.Value)
1011 prim.TextureAnimation = (Byte[])row["TextureAnimation"]; 1011 prim.TextureAnimation = (Byte[])row["TextureAnimation"];
1012 1012
1013 prim.RotationalVelocity = new LLVector3( 1013 prim.RotationalVelocity = new Vector3(
1014 Convert.ToSingle(row["OmegaX"]), 1014 Convert.ToSingle(row["OmegaX"]),
1015 Convert.ToSingle(row["OmegaY"]), 1015 Convert.ToSingle(row["OmegaY"]),
1016 Convert.ToSingle(row["OmegaZ"]) 1016 Convert.ToSingle(row["OmegaZ"])
@@ -1019,13 +1019,13 @@ VALUES
1019 // TODO: Rotation 1019 // TODO: Rotation
1020 // OmegaX, OmegaY, OmegaZ 1020 // OmegaX, OmegaY, OmegaZ
1021 1021
1022 prim.SetCameraEyeOffset(new LLVector3( 1022 prim.SetCameraEyeOffset(new Vector3(
1023 Convert.ToSingle(row["CameraEyeOffsetX"]), 1023 Convert.ToSingle(row["CameraEyeOffsetX"]),
1024 Convert.ToSingle(row["CameraEyeOffsetY"]), 1024 Convert.ToSingle(row["CameraEyeOffsetY"]),
1025 Convert.ToSingle(row["CameraEyeOffsetZ"]) 1025 Convert.ToSingle(row["CameraEyeOffsetZ"])
1026 )); 1026 ));
1027 1027
1028 prim.SetCameraAtOffset(new LLVector3( 1028 prim.SetCameraAtOffset(new Vector3(
1029 Convert.ToSingle(row["CameraAtOffsetX"]), 1029 Convert.ToSingle(row["CameraAtOffsetX"]),
1030 Convert.ToSingle(row["CameraAtOffsetY"]), 1030 Convert.ToSingle(row["CameraAtOffsetY"]),
1031 Convert.ToSingle(row["CameraAtOffsetZ"]) 1031 Convert.ToSingle(row["CameraAtOffsetZ"])
@@ -1056,7 +1056,7 @@ VALUES
1056 private static PrimitiveBaseShape buildShape(DataRow row) 1056 private static PrimitiveBaseShape buildShape(DataRow row)
1057 { 1057 {
1058 PrimitiveBaseShape s = new PrimitiveBaseShape(); 1058 PrimitiveBaseShape s = new PrimitiveBaseShape();
1059 s.Scale = new LLVector3( 1059 s.Scale = new Vector3(
1060 Convert.ToSingle(row["ScaleX"]), 1060 Convert.ToSingle(row["ScaleX"]),
1061 Convert.ToSingle(row["ScaleY"]), 1061 Convert.ToSingle(row["ScaleY"]),
1062 Convert.ToSingle(row["ScaleZ"]) 1062 Convert.ToSingle(row["ScaleZ"])
@@ -1108,10 +1108,10 @@ VALUES
1108 { 1108 {
1109 TaskInventoryItem taskItem = new TaskInventoryItem(); 1109 TaskInventoryItem taskItem = new TaskInventoryItem();
1110 1110
1111 taskItem.ItemID = new LLUUID((String)row["itemID"]); 1111 taskItem.ItemID = new UUID((String)row["itemID"]);
1112 taskItem.ParentPartID = new LLUUID((String)row["primID"]); 1112 taskItem.ParentPartID = new UUID((String)row["primID"]);
1113 taskItem.AssetID = new LLUUID((String)row["assetID"]); 1113 taskItem.AssetID = new UUID((String)row["assetID"]);
1114 taskItem.ParentID = new LLUUID((String)row["parentFolderID"]); 1114 taskItem.ParentID = new UUID((String)row["parentFolderID"]);
1115 1115
1116 taskItem.InvType = Convert.ToInt32(row["invType"]); 1116 taskItem.InvType = Convert.ToInt32(row["invType"]);
1117 taskItem.Type = Convert.ToInt32(row["assetType"]); 1117 taskItem.Type = Convert.ToInt32(row["assetType"]);
@@ -1119,10 +1119,10 @@ VALUES
1119 taskItem.Name = (String)row["name"]; 1119 taskItem.Name = (String)row["name"];
1120 taskItem.Description = (String)row["description"]; 1120 taskItem.Description = (String)row["description"];
1121 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]); 1121 taskItem.CreationDate = Convert.ToUInt32(row["creationDate"]);
1122 taskItem.CreatorID = new LLUUID((String)row["creatorID"]); 1122 taskItem.CreatorID = new UUID((String)row["creatorID"]);
1123 taskItem.OwnerID = new LLUUID((String)row["ownerID"]); 1123 taskItem.OwnerID = new UUID((String)row["ownerID"]);
1124 taskItem.LastOwnerID = new LLUUID((String)row["lastOwnerID"]); 1124 taskItem.LastOwnerID = new UUID((String)row["lastOwnerID"]);
1125 taskItem.GroupID = new LLUUID((String)row["groupID"]); 1125 taskItem.GroupID = new UUID((String)row["groupID"]);
1126 1126
1127 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]); 1127 taskItem.NextPermissions = Convert.ToUInt32(row["nextPermissions"]);
1128 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]); 1128 taskItem.CurrentPermissions = Convert.ToUInt32(row["currentPermissions"]);
@@ -1225,7 +1225,7 @@ VALUES
1225 /// <param name="land">land parameters.</param> 1225 /// <param name="land">land parameters.</param>
1226 /// <param name="regionUUID">region UUID.</param> 1226 /// <param name="regionUUID">region UUID.</param>
1227 /// <returns></returns> 1227 /// <returns></returns>
1228 private SqlParameter[] CreateLandParameters(LandData land, LLUUID regionUUID) 1228 private SqlParameter[] CreateLandParameters(LandData land, UUID regionUUID)
1229 { 1229 {
1230 SqlParameter[] parameters = new SqlParameter[32]; 1230 SqlParameter[] parameters = new SqlParameter[32];
1231 1231
@@ -1274,7 +1274,7 @@ VALUES
1274 /// <param name="parcelAccessEntry">parcel access entry.</param> 1274 /// <param name="parcelAccessEntry">parcel access entry.</param>
1275 /// <param name="parcelID">parcel ID.</param> 1275 /// <param name="parcelID">parcel ID.</param>
1276 /// <returns></returns> 1276 /// <returns></returns>
1277 private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, LLUUID parcelID) 1277 private SqlParameter[] CreateLandAccessParameters(ParcelManager.ParcelAccessEntry parcelAccessEntry, UUID parcelID)
1278 { 1278 {
1279 SqlParameter[] parameters = new SqlParameter[3]; 1279 SqlParameter[] parameters = new SqlParameter[3];
1280 1280
@@ -1292,7 +1292,7 @@ VALUES
1292 /// <param name="prim">prim data.</param> 1292 /// <param name="prim">prim data.</param>
1293 /// <param name="sceneGroupID">scenegroup ID.</param> 1293 /// <param name="sceneGroupID">scenegroup ID.</param>
1294 /// <param name="regionUUID">regionUUID.</param> 1294 /// <param name="regionUUID">regionUUID.</param>
1295 private static void fillPrimRow(DataRow row, SceneObjectPart prim, LLUUID sceneGroupID, LLUUID regionUUID) 1295 private static void fillPrimRow(DataRow row, SceneObjectPart prim, UUID sceneGroupID, UUID regionUUID)
1296 { 1296 {
1297 row["UUID"] = prim.UUID.ToString(); 1297 row["UUID"] = prim.UUID.ToString();
1298 row["RegionUUID"] = regionUUID.ToString(); 1298 row["RegionUUID"] = regionUUID.ToString();
@@ -1340,12 +1340,12 @@ VALUES
1340 row["RotationW"] = prim.RotationOffset.W; 1340 row["RotationW"] = prim.RotationOffset.W;
1341 1341
1342 // Sit target 1342 // Sit target
1343 LLVector3 sitTargetPos = prim.SitTargetPositionLL; 1343 Vector3 sitTargetPos = prim.SitTargetPositionLL;
1344 row["SitTargetOffsetX"] = sitTargetPos.X; 1344 row["SitTargetOffsetX"] = sitTargetPos.X;
1345 row["SitTargetOffsetY"] = sitTargetPos.Y; 1345 row["SitTargetOffsetY"] = sitTargetPos.Y;
1346 row["SitTargetOffsetZ"] = sitTargetPos.Z; 1346 row["SitTargetOffsetZ"] = sitTargetPos.Z;
1347 1347
1348 LLQuaternion sitTargetOrient = prim.SitTargetOrientationLL; 1348 Quaternion sitTargetOrient = prim.SitTargetOrientationLL;
1349 row["SitTargetOrientW"] = sitTargetOrient.W; 1349 row["SitTargetOrientW"] = sitTargetOrient.W;
1350 row["SitTargetOrientX"] = sitTargetOrient.X; 1350 row["SitTargetOrientX"] = sitTargetOrient.X;
1351 row["SitTargetOrientY"] = sitTargetOrient.Y; 1351 row["SitTargetOrientY"] = sitTargetOrient.Y;
@@ -1364,7 +1364,7 @@ VALUES
1364 } 1364 }
1365 else 1365 else
1366 { 1366 {
1367 row["LoopedSound"] = LLUUID.Zero; 1367 row["LoopedSound"] = UUID.Zero;
1368 row["LoopedSoundGain"] = 0.0f; 1368 row["LoopedSoundGain"] = 0.0f;
1369 } 1369 }
1370 1370
@@ -1446,13 +1446,13 @@ VALUES
1446 1446
1447 #endregion 1447 #endregion
1448 1448
1449 private void RetrievePrimsDataForRegion(LLUUID regionUUID, LLUUID sceneGroupID, string primID) 1449 private void RetrievePrimsDataForRegion(UUID regionUUID, UUID sceneGroupID, string primID)
1450 { 1450 {
1451 using (SqlConnection connection = _Database.DatabaseConnection()) 1451 using (SqlConnection connection = _Database.DatabaseConnection())
1452 { 1452 {
1453 _PrimDataAdapter.SelectCommand.Connection = connection; 1453 _PrimDataAdapter.SelectCommand.Connection = connection;
1454 _PrimDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); 1454 _PrimDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
1455 if (sceneGroupID != LLUUID.Zero) 1455 if (sceneGroupID != UUID.Zero)
1456 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); 1456 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
1457 else 1457 else
1458 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; 1458 _PrimDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
@@ -1462,7 +1462,7 @@ VALUES
1462 1462
1463 _ShapeDataAdapter.SelectCommand.Connection = connection; 1463 _ShapeDataAdapter.SelectCommand.Connection = connection;
1464 _ShapeDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); 1464 _ShapeDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
1465 if (sceneGroupID != LLUUID.Zero) 1465 if (sceneGroupID != UUID.Zero)
1466 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); 1466 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
1467 else 1467 else
1468 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; 1468 _ShapeDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
@@ -1472,7 +1472,7 @@ VALUES
1472 1472
1473 _ItemsDataAdapter.SelectCommand.Connection = connection; 1473 _ItemsDataAdapter.SelectCommand.Connection = connection;
1474 _ItemsDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString(); 1474 _ItemsDataAdapter.SelectCommand.Parameters["@RegionUUID"].Value = regionUUID.ToString();
1475 if (sceneGroupID != LLUUID.Zero) 1475 if (sceneGroupID != UUID.Zero)
1476 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString(); 1476 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = sceneGroupID.ToString();
1477 else 1477 else
1478 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%"; 1478 _ItemsDataAdapter.SelectCommand.Parameters["@SceneGroupID"].Value = "%";
diff --git a/OpenSim/Data/MSSQL/MSSQLUserData.cs b/OpenSim/Data/MSSQL/MSSQLUserData.cs
index cfe5f50..9118012 100644
--- a/OpenSim/Data/MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Data/MSSQL/MSSQLUserData.cs
@@ -30,7 +30,7 @@ using System.Collections.Generic;
30using System.Data; 30using System.Data;
31using System.Data.SqlClient; 31using System.Data.SqlClient;
32using System.Reflection; 32using System.Reflection;
33using libsecondlife; 33using OpenMetaverse;
34using log4net; 34using log4net;
35using OpenSim.Framework; 35using OpenSim.Framework;
36 36
@@ -183,13 +183,13 @@ namespace OpenSim.Data.MSSQL
183 /// <param name="friendlistowner">UUID of the friendlist owner</param> 183 /// <param name="friendlistowner">UUID of the friendlist owner</param>
184 /// <param name="friend">Friend's UUID</param> 184 /// <param name="friend">Friend's UUID</param>
185 /// <param name="perms">Permission flag</param> 185 /// <param name="perms">Permission flag</param>
186 override public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) 186 override public void AddNewUserFriend(UUID friendlistowner, UUID friend, uint perms)
187 { 187 {
188 int dtvalue = Util.UnixTimeSinceEpoch(); 188 int dtvalue = Util.UnixTimeSinceEpoch();
189 189
190 Dictionary<string, string> param = new Dictionary<string, string>(); 190 Dictionary<string, string> param = new Dictionary<string, string>();
191 param["@ownerID"] = friendlistowner.UUID.ToString(); 191 param["@ownerID"] = friendlistowner.ToString();
192 param["@friendID"] = friend.UUID.ToString(); 192 param["@friendID"] = friend.ToString();
193 param["@friendPerms"] = perms.ToString(); 193 param["@friendPerms"] = perms.ToString();
194 param["@datetimestamp"] = dtvalue.ToString(); 194 param["@datetimestamp"] = dtvalue.ToString();
195 195
@@ -229,11 +229,11 @@ namespace OpenSim.Data.MSSQL
229 /// </summary> 229 /// </summary>
230 /// <param name="friendlistowner">UUID of the friendlist owner</param> 230 /// <param name="friendlistowner">UUID of the friendlist owner</param>
231 /// <param name="friend">UUID of the not-so-friendly user to remove from the list</param> 231 /// <param name="friend">UUID of the not-so-friendly user to remove from the list</param>
232 override public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 232 override public void RemoveUserFriend(UUID friendlistowner, UUID friend)
233 { 233 {
234 Dictionary<string, string> param = new Dictionary<string, string>(); 234 Dictionary<string, string> param = new Dictionary<string, string>();
235 param["@ownerID"] = friendlistowner.UUID.ToString(); 235 param["@ownerID"] = friendlistowner.ToString();
236 param["@friendID"] = friend.UUID.ToString(); 236 param["@friendID"] = friend.ToString();
237 237
238 238
239 try 239 try
@@ -267,11 +267,11 @@ namespace OpenSim.Data.MSSQL
267 /// <param name="friendlistowner">UUID of the friendlist owner</param> 267 /// <param name="friendlistowner">UUID of the friendlist owner</param>
268 /// <param name="friend">UUID of the friend</param> 268 /// <param name="friend">UUID of the friend</param>
269 /// <param name="perms">new permission flag</param> 269 /// <param name="perms">new permission flag</param>
270 override public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 270 override public void UpdateUserFriendPerms(UUID friendlistowner, UUID friend, uint perms)
271 { 271 {
272 Dictionary<string, string> param = new Dictionary<string, string>(); 272 Dictionary<string, string> param = new Dictionary<string, string>();
273 param["@ownerID"] = friendlistowner.UUID.ToString(); 273 param["@ownerID"] = friendlistowner.ToString();
274 param["@friendID"] = friend.UUID.ToString(); 274 param["@friendID"] = friend.ToString();
275 param["@friendPerms"] = perms.ToString(); 275 param["@friendPerms"] = perms.ToString();
276 276
277 277
@@ -298,12 +298,12 @@ namespace OpenSim.Data.MSSQL
298 /// </summary> 298 /// </summary>
299 /// <param name="friendlistowner">UUID of the friendlist owner</param> 299 /// <param name="friendlistowner">UUID of the friendlist owner</param>
300 /// <returns>Friendlist list</returns> 300 /// <returns>Friendlist list</returns>
301 override public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 301 override public List<FriendListItem> GetUserFriendList(UUID friendlistowner)
302 { 302 {
303 List<FriendListItem> Lfli = new List<FriendListItem>(); 303 List<FriendListItem> Lfli = new List<FriendListItem>();
304 304
305 Dictionary<string, string> param = new Dictionary<string, string>(); 305 Dictionary<string, string> param = new Dictionary<string, string>();
306 param["@ownerID"] = friendlistowner.UUID.ToString(); 306 param["@ownerID"] = friendlistowner.ToString();
307 307
308 try 308 try
309 { 309 {
@@ -318,8 +318,8 @@ namespace OpenSim.Data.MSSQL
318 while (reader.Read()) 318 while (reader.Read())
319 { 319 {
320 FriendListItem fli = new FriendListItem(); 320 FriendListItem fli = new FriendListItem();
321 fli.FriendListOwner = new LLUUID((string)reader["ownerID"]); 321 fli.FriendListOwner = new UUID((string)reader["ownerID"]);
322 fli.Friend = new LLUUID((string)reader["friendID"]); 322 fli.Friend = new UUID((string)reader["friendID"]);
323 fli.FriendPerms = (uint)Convert.ToInt32(reader["friendPerms"]); 323 fli.FriendPerms = (uint)Convert.ToInt32(reader["friendPerms"]);
324 324
325 // This is not a real column in the database table, it's a joined column from the opposite record 325 // This is not a real column in the database table, it's a joined column from the opposite record
@@ -345,7 +345,7 @@ namespace OpenSim.Data.MSSQL
345 /// <param name="avatarid">avatar uuid</param> 345 /// <param name="avatarid">avatar uuid</param>
346 /// <param name="regionuuid">region uuid</param> 346 /// <param name="regionuuid">region uuid</param>
347 /// <param name="regionhandle">region handle</param> 347 /// <param name="regionhandle">region handle</param>
348 override public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid, ulong regionhandle) 348 override public void UpdateUserCurrentRegion(UUID avatarid, UUID regionuuid, ulong regionhandle)
349 { 349 {
350 //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); 350 //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
351 } 351 }
@@ -356,7 +356,7 @@ namespace OpenSim.Data.MSSQL
356 /// <param name="queryID"></param> 356 /// <param name="queryID"></param>
357 /// <param name="query"></param> 357 /// <param name="query"></param>
358 /// <returns></returns> 358 /// <returns></returns>
359 override public List<AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 359 override public List<AvatarPickerAvatar> GeneratePickerResults(UUID queryID, string query)
360 { 360 {
361 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>(); 361 List<AvatarPickerAvatar> returnlist = new List<AvatarPickerAvatar>();
362 string[] querysplit; 362 string[] querysplit;
@@ -375,7 +375,7 @@ namespace OpenSim.Data.MSSQL
375 while (reader.Read()) 375 while (reader.Read())
376 { 376 {
377 AvatarPickerAvatar user = new AvatarPickerAvatar(); 377 AvatarPickerAvatar user = new AvatarPickerAvatar();
378 user.AvatarID = new LLUUID((string)reader["UUID"]); 378 user.AvatarID = new UUID((string)reader["UUID"]);
379 user.firstName = (string)reader["username"]; 379 user.firstName = (string)reader["username"];
380 user.lastName = (string)reader["lastname"]; 380 user.lastName = (string)reader["lastname"];
381 returnlist.Add(user); 381 returnlist.Add(user);
@@ -400,7 +400,7 @@ namespace OpenSim.Data.MSSQL
400 while (reader.Read()) 400 while (reader.Read())
401 { 401 {
402 AvatarPickerAvatar user = new AvatarPickerAvatar(); 402 AvatarPickerAvatar user = new AvatarPickerAvatar();
403 user.AvatarID = new LLUUID((string)reader["UUID"]); 403 user.AvatarID = new UUID((string)reader["UUID"]);
404 user.firstName = (string)reader["username"]; 404 user.firstName = (string)reader["username"];
405 user.lastName = (string)reader["lastname"]; 405 user.lastName = (string)reader["lastname"];
406 returnlist.Add(user); 406 returnlist.Add(user);
@@ -420,7 +420,7 @@ namespace OpenSim.Data.MSSQL
420 /// </summary> 420 /// </summary>
421 /// <param name="uuid"></param> 421 /// <param name="uuid"></param>
422 /// <returns></returns> 422 /// <returns></returns>
423 override public UserProfileData GetUserByUUID(LLUUID uuid) 423 override public UserProfileData GetUserByUUID(UUID uuid)
424 { 424 {
425 try 425 try
426 { 426 {
@@ -467,7 +467,7 @@ namespace OpenSim.Data.MSSQL
467 /// </summary> 467 /// </summary>
468 /// <param name="uuid">The accounts UUID</param> 468 /// <param name="uuid">The accounts UUID</param>
469 /// <returns>The users session</returns> 469 /// <returns>The users session</returns>
470 override public UserAgentData GetAgentByUUID(LLUUID uuid) 470 override public UserAgentData GetAgentByUUID(UUID uuid)
471 { 471 {
472 try 472 try
473 { 473 {
@@ -493,7 +493,7 @@ namespace OpenSim.Data.MSSQL
493 /// <param name="AgentID">The agent UUID</param> 493 /// <param name="AgentID">The agent UUID</param>
494 /// <param name="WebLoginKey">the WebLogin Key</param> 494 /// <param name="WebLoginKey">the WebLogin Key</param>
495 /// <remarks>unused ?</remarks> 495 /// <remarks>unused ?</remarks>
496 override public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) 496 override public void StoreWebLoginKey(UUID AgentID, UUID WebLoginKey)
497 { 497 {
498 UserProfileData user = GetUserByUUID(AgentID); 498 UserProfileData user = GetUserByUUID(AgentID);
499 user.WebLoginKey = WebLoginKey; 499 user.WebLoginKey = WebLoginKey;
@@ -549,12 +549,12 @@ namespace OpenSim.Data.MSSQL
549 /// <param name="profileImage">UUID for profile image</param> 549 /// <param name="profileImage">UUID for profile image</param>
550 /// <param name="firstImage">UUID for firstlife image</param> 550 /// <param name="firstImage">UUID for firstlife image</param>
551 /// <returns>Success?</returns> 551 /// <returns>Success?</returns>
552 private bool InsertUserRow(LLUUID uuid, string username, string lastname, string passwordHash, 552 private bool InsertUserRow(UUID uuid, string username, string lastname, string passwordHash,
553 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ, 553 string passwordSalt, UInt64 homeRegion, float homeLocX, float homeLocY, float homeLocZ,
554 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, 554 float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin,
555 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, 555 string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask,
556 string aboutText, string firstText, 556 string aboutText, string firstText,
557 LLUUID profileImage, LLUUID firstImage, LLUUID webLoginKey) 557 UUID profileImage, UUID firstImage, UUID webLoginKey)
558 { 558 {
559 string sql = "INSERT INTO "+m_usersTableName; 559 string sql = "INSERT INTO "+m_usersTableName;
560 sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], "; 560 sql += " ([UUID], [username], [lastname], [passwordHash], [passwordSalt], [homeRegion], ";
@@ -594,7 +594,7 @@ namespace OpenSim.Data.MSSQL
594 parameters["profileFirstText"] = firstText; 594 parameters["profileFirstText"] = firstText;
595 parameters["profileImage"] = profileImage.ToString(); 595 parameters["profileImage"] = profileImage.ToString();
596 parameters["profileFirstImage"] = firstImage.ToString(); 596 parameters["profileFirstImage"] = firstImage.ToString();
597 parameters["webLoginKey"] = LLUUID.Random().ToString(); 597 parameters["webLoginKey"] = UUID.Random().ToString();
598 598
599 599
600 try 600 try
@@ -683,7 +683,7 @@ namespace OpenSim.Data.MSSQL
683 SqlParameter param21 = new SqlParameter("@profileImage", user.Image.ToString()); 683 SqlParameter param21 = new SqlParameter("@profileImage", user.Image.ToString());
684 SqlParameter param22 = new SqlParameter("@profileFirstImage", user.FirstLifeImage.ToString()); 684 SqlParameter param22 = new SqlParameter("@profileFirstImage", user.FirstLifeImage.ToString());
685 SqlParameter param23 = new SqlParameter("@keyUUUID", user.ID.ToString()); 685 SqlParameter param23 = new SqlParameter("@keyUUUID", user.ID.ToString());
686 SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.UUID.ToString()); 686 SqlParameter param24 = new SqlParameter("@webLoginKey", user.WebLoginKey.ToString());
687 command.Parameters.Add(param1); 687 command.Parameters.Add(param1);
688 command.Parameters.Add(param2); 688 command.Parameters.Add(param2);
689 command.Parameters.Add(param3); 689 command.Parameters.Add(param3);
@@ -728,7 +728,7 @@ namespace OpenSim.Data.MSSQL
728 /// <param name="to">The receivers account ID</param> 728 /// <param name="to">The receivers account ID</param>
729 /// <param name="amount">The amount to transfer</param> 729 /// <param name="amount">The amount to transfer</param>
730 /// <returns>false</returns> 730 /// <returns>false</returns>
731 override public bool MoneyTransferRequest(LLUUID from, LLUUID to, uint amount) 731 override public bool MoneyTransferRequest(UUID from, UUID to, uint amount)
732 { 732 {
733 return false; 733 return false;
734 } 734 }
@@ -741,14 +741,14 @@ namespace OpenSim.Data.MSSQL
741 /// <param name="to">The receivers account ID</param> 741 /// <param name="to">The receivers account ID</param>
742 /// <param name="item">The item to transfer</param> 742 /// <param name="item">The item to transfer</param>
743 /// <returns>false</returns> 743 /// <returns>false</returns>
744 override public bool InventoryTransferRequest(LLUUID from, LLUUID to, LLUUID item) 744 override public bool InventoryTransferRequest(UUID from, UUID to, UUID item)
745 { 745 {
746 return false; 746 return false;
747 } 747 }
748 748
749 /// Appearance 749 /// Appearance
750 /// TODO: stubs for now to get us to a compiling state gently 750 /// TODO: stubs for now to get us to a compiling state gently
751 override public AvatarAppearance GetUserAppearance(LLUUID user) 751 override public AvatarAppearance GetUserAppearance(UUID user)
752 { 752 {
753// return new AvatarAppearance(); 753// return new AvatarAppearance();
754 try 754 try
@@ -784,37 +784,37 @@ namespace OpenSim.Data.MSSQL
784 { 784 {
785 AvatarAppearance appearance = new AvatarAppearance(); 785 AvatarAppearance appearance = new AvatarAppearance();
786 786
787 appearance.Owner = new LLUUID((string)reader["owner"]); 787 appearance.Owner = new UUID((string)reader["owner"]);
788 appearance.Serial = Convert.ToInt32(reader["serial"]); 788 appearance.Serial = Convert.ToInt32(reader["serial"]);
789 appearance.VisualParams = (byte[])reader["visual_params"]; 789 appearance.VisualParams = (byte[])reader["visual_params"];
790 appearance.Texture = new LLObject.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length); 790 appearance.Texture = new Primitive.TextureEntry((byte[])reader["texture"], 0, ((byte[])reader["texture"]).Length);
791 appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]); 791 appearance.AvatarHeight = (float)Convert.ToDouble(reader["avatar_height"]);
792 appearance.BodyItem = new LLUUID((string)reader["body_item"]); 792 appearance.BodyItem = new UUID((string)reader["body_item"]);
793 appearance.BodyAsset = new LLUUID((string)reader["body_asset"]); 793 appearance.BodyAsset = new UUID((string)reader["body_asset"]);
794 appearance.SkinItem = new LLUUID((string)reader["skin_item"]); 794 appearance.SkinItem = new UUID((string)reader["skin_item"]);
795 appearance.SkinAsset = new LLUUID((string)reader["skin_asset"]); 795 appearance.SkinAsset = new UUID((string)reader["skin_asset"]);
796 appearance.HairItem = new LLUUID((string)reader["hair_item"]); 796 appearance.HairItem = new UUID((string)reader["hair_item"]);
797 appearance.HairAsset = new LLUUID((string)reader["hair_asset"]); 797 appearance.HairAsset = new UUID((string)reader["hair_asset"]);
798 appearance.EyesItem = new LLUUID((string)reader["eyes_item"]); 798 appearance.EyesItem = new UUID((string)reader["eyes_item"]);
799 appearance.EyesAsset = new LLUUID((string)reader["eyes_asset"]); 799 appearance.EyesAsset = new UUID((string)reader["eyes_asset"]);
800 appearance.ShirtItem = new LLUUID((string)reader["shirt_item"]); 800 appearance.ShirtItem = new UUID((string)reader["shirt_item"]);
801 appearance.ShirtAsset = new LLUUID((string)reader["shirt_asset"]); 801 appearance.ShirtAsset = new UUID((string)reader["shirt_asset"]);
802 appearance.PantsItem = new LLUUID((string)reader["pants_item"]); 802 appearance.PantsItem = new UUID((string)reader["pants_item"]);
803 appearance.PantsAsset = new LLUUID((string)reader["pants_asset"]); 803 appearance.PantsAsset = new UUID((string)reader["pants_asset"]);
804 appearance.ShoesItem = new LLUUID((string)reader["shoes_item"]); 804 appearance.ShoesItem = new UUID((string)reader["shoes_item"]);
805 appearance.ShoesAsset = new LLUUID((string)reader["shoes_asset"]); 805 appearance.ShoesAsset = new UUID((string)reader["shoes_asset"]);
806 appearance.SocksItem = new LLUUID((string)reader["socks_item"]); 806 appearance.SocksItem = new UUID((string)reader["socks_item"]);
807 appearance.SocksAsset = new LLUUID((string)reader["socks_asset"]); 807 appearance.SocksAsset = new UUID((string)reader["socks_asset"]);
808 appearance.JacketItem = new LLUUID((string)reader["jacket_item"]); 808 appearance.JacketItem = new UUID((string)reader["jacket_item"]);
809 appearance.JacketAsset = new LLUUID((string)reader["jacket_asset"]); 809 appearance.JacketAsset = new UUID((string)reader["jacket_asset"]);
810 appearance.GlovesItem = new LLUUID((string)reader["gloves_item"]); 810 appearance.GlovesItem = new UUID((string)reader["gloves_item"]);
811 appearance.GlovesAsset = new LLUUID((string)reader["gloves_asset"]); 811 appearance.GlovesAsset = new UUID((string)reader["gloves_asset"]);
812 appearance.UnderShirtItem = new LLUUID((string)reader["undershirt_item"]); 812 appearance.UnderShirtItem = new UUID((string)reader["undershirt_item"]);
813 appearance.UnderShirtAsset = new LLUUID((string)reader["undershirt_asset"]); 813 appearance.UnderShirtAsset = new UUID((string)reader["undershirt_asset"]);
814 appearance.UnderPantsItem = new LLUUID((string)reader["underpants_item"]); 814 appearance.UnderPantsItem = new UUID((string)reader["underpants_item"]);
815 appearance.UnderPantsAsset = new LLUUID((string)reader["underpants_asset"]); 815 appearance.UnderPantsAsset = new UUID((string)reader["underpants_asset"]);
816 appearance.SkirtItem = new LLUUID((string)reader["skirt_item"]); 816 appearance.SkirtItem = new UUID((string)reader["skirt_item"]);
817 appearance.SkirtAsset = new LLUUID((string)reader["skirt_asset"]); 817 appearance.SkirtAsset = new UUID((string)reader["skirt_asset"]);
818 818
819 return appearance; 819 return appearance;
820 } 820 }
@@ -831,7 +831,7 @@ namespace OpenSim.Data.MSSQL
831 /// </summary> 831 /// </summary>
832 /// <param name="user">the used UUID</param> 832 /// <param name="user">the used UUID</param>
833 /// <param name="appearance">the appearence</param> 833 /// <param name="appearance">the appearence</param>
834 override public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) 834 override public void UpdateUserAppearance(UUID user, AvatarAppearance appearance)
835 { 835 {
836 string sql = String.Empty; 836 string sql = String.Empty;
837 sql += "DELETE FROM avatarappearance WHERE owner=@owner "; 837 sql += "DELETE FROM avatarappearance WHERE owner=@owner ";
@@ -918,7 +918,7 @@ namespace OpenSim.Data.MSSQL
918 { 918 {
919 } 919 }
920 920
921 override public void ResetAttachments(LLUUID userID) 921 override public void ResetAttachments(UUID userID)
922 { 922 {
923 } 923 }
924 } 924 }