aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data
diff options
context:
space:
mode:
authorSean Dague2008-07-23 15:50:32 +0000
committerSean Dague2008-07-23 15:50:32 +0000
commit090159defc731fca252b2b3520364712760f0f4e (patch)
tree78fe9dde5a9902d67aa6d1690cf575d778d154f2 /OpenSim/Data
parentSend Animation data for other avatars to new users joining the region (tested... (diff)
downloadopensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.zip
opensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.tar.gz
opensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.tar.bz2
opensim-SC_OLD-090159defc731fca252b2b3520364712760f0f4e.tar.xz
refactored LandData to use properties, and cleaned up the naming on
the properties a bit to be more consistant with other objects (having things like .Name .Description, etc).
Diffstat (limited to 'OpenSim/Data')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLDataStore.cs132
-rw-r--r--OpenSim/Data/MySQL/MySQLDataStore.cs140
-rw-r--r--OpenSim/Data/SQLite/SQLiteRegionData.cs138
3 files changed, 205 insertions, 205 deletions
diff --git a/OpenSim/Data/MSSQL/MSSQLDataStore.cs b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
index 569268e..0ae879a 100644
--- a/OpenSim/Data/MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Data/MSSQL/MSSQLDataStore.cs
@@ -470,7 +470,7 @@ namespace OpenSim.Data.MSSQL
470 DataTable land = m_landTable; 470 DataTable land = m_landTable;
471 DataTable landaccesslist = m_landAccessListTable; 471 DataTable landaccesslist = m_landAccessListTable;
472 472
473 DataRow landRow = land.Rows.Find(parcel.landData.globalID.UUID); 473 DataRow landRow = land.Rows.Find(parcel.landData.GlobalID.UUID);
474 if (landRow == null) 474 if (landRow == null)
475 { 475 {
476 landRow = land.NewRow(); 476 landRow = land.NewRow();
@@ -486,14 +486,14 @@ namespace OpenSim.Data.MSSQL
486 SqlCommand cmd = 486 SqlCommand cmd =
487 new SqlCommand("delete from landaccesslist where LandUUID=@LandUUID", m_connection)) 487 new SqlCommand("delete from landaccesslist where LandUUID=@LandUUID", m_connection))
488 { 488 {
489 cmd.Parameters.Add(new SqlParameter("@LandUUID", parcel.landData.globalID.UUID)); 489 cmd.Parameters.Add(new SqlParameter("@LandUUID", parcel.landData.GlobalID.UUID));
490 cmd.ExecuteNonQuery(); 490 cmd.ExecuteNonQuery();
491 } 491 }
492 492
493 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList) 493 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList)
494 { 494 {
495 DataRow newAccessRow = landaccesslist.NewRow(); 495 DataRow newAccessRow = landaccesslist.NewRow();
496 fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); 496 fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID);
497 landaccesslist.Rows.Add(newAccessRow); 497 landaccesslist.Rows.Add(newAccessRow);
498 } 498 }
499 499
@@ -518,11 +518,11 @@ namespace OpenSim.Data.MSSQL
518 foreach (DataRow rawDataLand in rawDataForRegion) 518 foreach (DataRow rawDataLand in rawDataForRegion)
519 { 519 {
520 LandData newLand = buildLandData(rawDataLand); 520 LandData newLand = buildLandData(rawDataLand);
521 string accessListSearchExp = "LandUUID = '" + newLand.globalID.UUID + "'"; 521 string accessListSearchExp = "LandUUID = '" + newLand.GlobalID.UUID + "'";
522 DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); 522 DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
523 foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) 523 foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
524 { 524 {
525 newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess)); 525 newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
526 } 526 }
527 527
528 landDataForRegion.Add(newLand); 528 landDataForRegion.Add(newLand);
@@ -992,43 +992,43 @@ namespace OpenSim.Data.MSSQL
992 { 992 {
993 LandData newData = new LandData(); 993 LandData newData = new LandData();
994 994
995 newData.globalID = new LLUUID((String)row["UUID"]); 995 newData.GlobalID = new LLUUID((String)row["UUID"]);
996 newData.localID = Convert.ToInt32(row["LocalLandID"]); 996 newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
997 997
998 // Bitmap is a byte[512] 998 // Bitmap is a byte[512]
999 newData.landBitmapByteArray = (Byte[])row["Bitmap"]; 999 newData.Bitmap = (Byte[])row["Bitmap"];
1000 1000
1001 newData.landName = (String)row["Name"]; 1001 newData.Name = (String)row["Name"];
1002 newData.landDesc = (String)row["Description"]; 1002 newData.Description = (String)row["Description"];
1003 newData.ownerID = (String)row["OwnerUUID"]; 1003 newData.OwnerID = (String)row["OwnerUUID"];
1004 newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); 1004 newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
1005 newData.area = Convert.ToInt32(row["Area"]); 1005 newData.Area = Convert.ToInt32(row["Area"]);
1006 newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented 1006 newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
1007 newData.category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]); 1007 newData.Category = (Parcel.ParcelCategory)Convert.ToInt32(row["Category"]);
1008 //Enum libsecondlife.Parcel.ParcelCategory 1008 //Enum libsecondlife.Parcel.ParcelCategory
1009 newData.claimDate = Convert.ToInt32(row["ClaimDate"]); 1009 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
1010 newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]); 1010 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
1011 newData.groupID = new LLUUID((String)row["GroupUUID"]); 1011 newData.GroupID = new LLUUID((String)row["GroupUUID"]);
1012 newData.salePrice = Convert.ToInt32(row["SalePrice"]); 1012 newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
1013 newData.landStatus = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]); 1013 newData.Status = (Parcel.ParcelStatus)Convert.ToInt32(row["LandStatus"]);
1014 //Enum. libsecondlife.Parcel.ParcelStatus 1014 //Enum. libsecondlife.Parcel.ParcelStatus
1015 newData.landFlags = Convert.ToUInt32(row["LandFlags"]); 1015 newData.Flags = Convert.ToUInt32(row["LandFlags"]);
1016 newData.landingType = Convert.ToByte(row["LandingType"]); 1016 newData.LandingType = Convert.ToByte(row["LandingType"]);
1017 newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); 1017 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
1018 newData.mediaID = new LLUUID((String)row["MediaTextureUUID"]); 1018 newData.MediaID = new LLUUID((String)row["MediaTextureUUID"]);
1019 newData.mediaURL = (String)row["MediaURL"]; 1019 newData.MediaURL = (String)row["MediaURL"];
1020 newData.musicURL = (String)row["MusicURL"]; 1020 newData.MusicURL = (String)row["MusicURL"];
1021 newData.passHours = Convert.ToSingle(row["PassHours"]); 1021 newData.PassHours = Convert.ToSingle(row["PassHours"]);
1022 newData.passPrice = Convert.ToInt32(row["PassPrice"]); 1022 newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
1023 newData.snapshotID = (String)row["SnapshotUUID"]; 1023 newData.SnapshotID = (String)row["SnapshotUUID"];
1024 1024
1025 newData.userLocation = 1025 newData.UserLocation =
1026 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 1026 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
1027 Convert.ToSingle(row["UserLocationZ"])); 1027 Convert.ToSingle(row["UserLocationZ"]));
1028 newData.userLookAt = 1028 newData.UserLookAt =
1029 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 1029 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
1030 Convert.ToSingle(row["UserLookAtZ"])); 1030 Convert.ToSingle(row["UserLookAtZ"]));
1031 newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 1031 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
1032 1032
1033 return newData; 1033 return newData;
1034 } 1034 }
@@ -1186,40 +1186,40 @@ namespace OpenSim.Data.MSSQL
1186 /// <param name="regionUUID"></param> 1186 /// <param name="regionUUID"></param>
1187 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) 1187 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
1188 { 1188 {
1189 row["UUID"] = land.globalID.UUID; 1189 row["UUID"] = land.GlobalID.UUID;
1190 row["RegionUUID"] = regionUUID.UUID; 1190 row["RegionUUID"] = regionUUID.UUID;
1191 row["LocalLandID"] = land.localID; 1191 row["LocalLandID"] = land.LocalID;
1192 1192
1193 // Bitmap is a byte[512] 1193 // Bitmap is a byte[512]
1194 row["Bitmap"] = land.landBitmapByteArray; 1194 row["Bitmap"] = land.Bitmap;
1195 1195
1196 row["Name"] = land.landName; 1196 row["Name"] = land.Name;
1197 row["Description"] = land.landDesc; 1197 row["Description"] = land.Description;
1198 row["OwnerUUID"] = land.ownerID.UUID; 1198 row["OwnerUUID"] = land.OwnerID.UUID;
1199 row["IsGroupOwned"] = land.isGroupOwned; 1199 row["IsGroupOwned"] = land.IsGroupOwned;
1200 row["Area"] = land.area; 1200 row["Area"] = land.Area;
1201 row["AuctionID"] = land.auctionID; //Unemplemented 1201 row["AuctionID"] = land.AuctionID; //Unemplemented
1202 row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory 1202 row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
1203 row["ClaimDate"] = land.claimDate; 1203 row["ClaimDate"] = land.ClaimDate;
1204 row["ClaimPrice"] = land.claimPrice; 1204 row["ClaimPrice"] = land.ClaimPrice;
1205 row["GroupUUID"] = land.groupID.UUID; 1205 row["GroupUUID"] = land.GroupID.UUID;
1206 row["SalePrice"] = land.salePrice; 1206 row["SalePrice"] = land.SalePrice;
1207 row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus 1207 row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
1208 row["LandFlags"] = land.landFlags; 1208 row["LandFlags"] = land.Flags;
1209 row["LandingType"] = land.landingType; 1209 row["LandingType"] = land.LandingType;
1210 row["MediaAutoScale"] = land.mediaAutoScale; 1210 row["MediaAutoScale"] = land.MediaAutoScale;
1211 row["MediaTextureUUID"] = land.mediaID.UUID; 1211 row["MediaTextureUUID"] = land.MediaID.UUID;
1212 row["MediaURL"] = land.mediaURL; 1212 row["MediaURL"] = land.MediaURL;
1213 row["MusicURL"] = land.musicURL; 1213 row["MusicURL"] = land.MusicURL;
1214 row["PassHours"] = land.passHours; 1214 row["PassHours"] = land.PassHours;
1215 row["PassPrice"] = land.passPrice; 1215 row["PassPrice"] = land.PassPrice;
1216 row["SnapshotUUID"] = land.snapshotID.UUID; 1216 row["SnapshotUUID"] = land.SnapshotID.UUID;
1217 row["UserLocationX"] = land.userLocation.X; 1217 row["UserLocationX"] = land.UserLocation.X;
1218 row["UserLocationY"] = land.userLocation.Y; 1218 row["UserLocationY"] = land.UserLocation.Y;
1219 row["UserLocationZ"] = land.userLocation.Z; 1219 row["UserLocationZ"] = land.UserLocation.Z;
1220 row["UserLookAtX"] = land.userLookAt.X; 1220 row["UserLookAtX"] = land.UserLookAt.X;
1221 row["UserLookAtY"] = land.userLookAt.Y; 1221 row["UserLookAtY"] = land.UserLookAt.Y;
1222 row["UserLookAtZ"] = land.userLookAt.Z; 1222 row["UserLookAtZ"] = land.UserLookAt.Z;
1223 } 1223 }
1224 1224
1225 /// <summary> 1225 /// <summary>
diff --git a/OpenSim/Data/MySQL/MySQLDataStore.cs b/OpenSim/Data/MySQL/MySQLDataStore.cs
index 74f15cb..2ace4b1 100644
--- a/OpenSim/Data/MySQL/MySQLDataStore.cs
+++ b/OpenSim/Data/MySQL/MySQLDataStore.cs
@@ -692,7 +692,7 @@ namespace OpenSim.Data.MySQL
692 DataTable land = m_landTable; 692 DataTable land = m_landTable;
693 DataTable landaccesslist = m_landAccessListTable; 693 DataTable landaccesslist = m_landAccessListTable;
694 694
695 DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID)); 695 DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.GlobalID));
696 if (landRow == null) 696 if (landRow == null)
697 { 697 {
698 landRow = land.NewRow(); 698 landRow = land.NewRow();
@@ -708,14 +708,14 @@ namespace OpenSim.Data.MySQL
708 MySqlCommand cmd = 708 MySqlCommand cmd =
709 new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection)) 709 new MySqlCommand("delete from landaccesslist where LandUUID=?LandUUID", m_connection))
710 { 710 {
711 cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.globalID))); 711 cmd.Parameters.Add(new MySqlParameter("?LandUUID", Util.ToRawUuidString(parcel.landData.GlobalID)));
712 cmd.ExecuteNonQuery(); 712 cmd.ExecuteNonQuery();
713 } 713 }
714 714
715 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList) 715 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList)
716 { 716 {
717 DataRow newAccessRow = landaccesslist.NewRow(); 717 DataRow newAccessRow = landaccesslist.NewRow();
718 fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); 718 fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID);
719 landaccesslist.Rows.Add(newAccessRow); 719 landaccesslist.Rows.Add(newAccessRow);
720 } 720 }
721 721
@@ -787,11 +787,11 @@ namespace OpenSim.Data.MySQL
787 foreach (DataRow rawDataLand in rawDataForRegion) 787 foreach (DataRow rawDataLand in rawDataForRegion)
788 { 788 {
789 LandData newLand = buildLandData(rawDataLand); 789 LandData newLand = buildLandData(rawDataLand);
790 string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'"; 790 string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.GlobalID) + "'";
791 DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); 791 DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
792 foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) 792 foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
793 { 793 {
794 newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess)); 794 newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
795 } 795 }
796 796
797 landDataForRegion.Add(newLand); 797 landDataForRegion.Add(newLand);
@@ -1319,59 +1319,59 @@ namespace OpenSim.Data.MySQL
1319 { 1319 {
1320 LandData newData = new LandData(); 1320 LandData newData = new LandData();
1321 1321
1322 newData.globalID = new LLUUID((String) row["UUID"]); 1322 newData.GlobalID = new LLUUID((String) row["UUID"]);
1323 newData.localID = Convert.ToInt32(row["LocalLandID"]); 1323 newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
1324 1324
1325 // Bitmap is a byte[512] 1325 // Bitmap is a byte[512]
1326 newData.landBitmapByteArray = (Byte[]) row["Bitmap"]; 1326 newData.Bitmap = (Byte[]) row["Bitmap"];
1327 1327
1328 newData.landName = (String) row["Name"]; 1328 newData.Name = (String) row["Name"];
1329 newData.landDesc = (String) row["Description"]; 1329 newData.Description = (String) row["Description"];
1330 newData.ownerID = (String) row["OwnerUUID"]; 1330 newData.OwnerID = (String) row["OwnerUUID"];
1331 newData.isGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]); 1331 newData.IsGroupOwned = Convert.ToBoolean(row["IsGroupOwned"]);
1332 newData.area = Convert.ToInt32(row["Area"]); 1332 newData.Area = Convert.ToInt32(row["Area"]);
1333 newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented 1333 newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
1334 newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); 1334 newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
1335 //Enum libsecondlife.Parcel.ParcelCategory 1335 //Enum libsecondlife.Parcel.ParcelCategory
1336 newData.claimDate = Convert.ToInt32(row["ClaimDate"]); 1336 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
1337 newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]); 1337 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
1338 newData.groupID = new LLUUID((String) row["GroupUUID"]); 1338 newData.GroupID = new LLUUID((String) row["GroupUUID"]);
1339 newData.salePrice = Convert.ToInt32(row["SalePrice"]); 1339 newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
1340 newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); 1340 newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
1341 //Enum. libsecondlife.Parcel.ParcelStatus 1341 //Enum. libsecondlife.Parcel.ParcelStatus
1342 newData.landFlags = Convert.ToUInt32(row["LandFlags"]); 1342 newData.Flags = Convert.ToUInt32(row["LandFlags"]);
1343 newData.landingType = Convert.ToByte(row["LandingType"]); 1343 newData.LandingType = Convert.ToByte(row["LandingType"]);
1344 newData.mediaAutoScale = Convert.ToByte(row["MediaAutoScale"]); 1344 newData.MediaAutoScale = Convert.ToByte(row["MediaAutoScale"]);
1345 newData.mediaID = new LLUUID((String) row["MediaTextureUUID"]); 1345 newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]);
1346 newData.mediaURL = (String) row["MediaURL"]; 1346 newData.MediaURL = (String) row["MediaURL"];
1347 newData.musicURL = (String) row["MusicURL"]; 1347 newData.MusicURL = (String) row["MusicURL"];
1348 newData.passHours = Convert.ToSingle(row["PassHours"]); 1348 newData.PassHours = Convert.ToSingle(row["PassHours"]);
1349 newData.passPrice = Convert.ToInt32(row["PassPrice"]); 1349 newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
1350 LLUUID authedbuyer = LLUUID.Zero; 1350 LLUUID authedbuyer = LLUUID.Zero;
1351 LLUUID snapshotID = LLUUID.Zero; 1351 LLUUID snapshotID = LLUUID.Zero;
1352 1352
1353 Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer); 1353 Helpers.TryParse((string)row["AuthBuyerID"], out authedbuyer);
1354 Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID); 1354 Helpers.TryParse((string)row["SnapshotUUID"], out snapshotID);
1355 1355
1356 newData.authBuyerID = authedbuyer; 1356 newData.AuthBuyerID = authedbuyer;
1357 newData.snapshotID = snapshotID; 1357 newData.SnapshotID = snapshotID;
1358 try 1358 try
1359 { 1359 {
1360 newData.userLocation = 1360 newData.UserLocation =
1361 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 1361 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
1362 Convert.ToSingle(row["UserLocationZ"])); 1362 Convert.ToSingle(row["UserLocationZ"]));
1363 newData.userLookAt = 1363 newData.UserLookAt =
1364 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 1364 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
1365 Convert.ToSingle(row["UserLookAtZ"])); 1365 Convert.ToSingle(row["UserLookAtZ"]));
1366 } 1366 }
1367 catch (InvalidCastException) 1367 catch (InvalidCastException)
1368 { 1368 {
1369 newData.userLocation = LLVector3.Zero; 1369 newData.UserLocation = LLVector3.Zero;
1370 newData.userLookAt = LLVector3.Zero; 1370 newData.UserLookAt = LLVector3.Zero;
1371 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName); 1371 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
1372 } 1372 }
1373 1373
1374 newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 1374 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
1375 1375
1376 return newData; 1376 return newData;
1377 } 1377 }
@@ -1576,41 +1576,41 @@ namespace OpenSim.Data.MySQL
1576 /// <param name="regionUUID"></param> 1576 /// <param name="regionUUID"></param>
1577 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) 1577 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
1578 { 1578 {
1579 row["UUID"] = Util.ToRawUuidString(land.globalID); 1579 row["UUID"] = Util.ToRawUuidString(land.GlobalID);
1580 row["RegionUUID"] = Util.ToRawUuidString(regionUUID); 1580 row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
1581 row["LocalLandID"] = land.localID; 1581 row["LocalLandID"] = land.LocalID;
1582 1582
1583 // Bitmap is a byte[512] 1583 // Bitmap is a byte[512]
1584 row["Bitmap"] = land.landBitmapByteArray; 1584 row["Bitmap"] = land.Bitmap;
1585 1585
1586 row["Name"] = land.landName; 1586 row["Name"] = land.Name;
1587 row["Description"] = land.landDesc; 1587 row["Description"] = land.Description;
1588 row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID); 1588 row["OwnerUUID"] = Util.ToRawUuidString(land.OwnerID);
1589 row["IsGroupOwned"] = land.isGroupOwned; 1589 row["IsGroupOwned"] = land.IsGroupOwned;
1590 row["Area"] = land.area; 1590 row["Area"] = land.Area;
1591 row["AuctionID"] = land.auctionID; //Unemplemented 1591 row["AuctionID"] = land.AuctionID; //Unemplemented
1592 row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory 1592 row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
1593 row["ClaimDate"] = land.claimDate; 1593 row["ClaimDate"] = land.ClaimDate;
1594 row["ClaimPrice"] = land.claimPrice; 1594 row["ClaimPrice"] = land.ClaimPrice;
1595 row["GroupUUID"] = Util.ToRawUuidString(land.groupID); 1595 row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
1596 row["SalePrice"] = land.salePrice; 1596 row["SalePrice"] = land.SalePrice;
1597 row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus 1597 row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
1598 row["LandFlags"] = land.landFlags; 1598 row["LandFlags"] = land.Flags;
1599 row["LandingType"] = land.landingType; 1599 row["LandingType"] = land.LandingType;
1600 row["MediaAutoScale"] = land.mediaAutoScale; 1600 row["MediaAutoScale"] = land.MediaAutoScale;
1601 row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID); 1601 row["MediaTextureUUID"] = Util.ToRawUuidString(land.MediaID);
1602 row["MediaURL"] = land.mediaURL; 1602 row["MediaURL"] = land.MediaURL;
1603 row["MusicURL"] = land.musicURL; 1603 row["MusicURL"] = land.MusicURL;
1604 row["PassHours"] = land.passHours; 1604 row["PassHours"] = land.PassHours;
1605 row["PassPrice"] = land.passPrice; 1605 row["PassPrice"] = land.PassPrice;
1606 row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID); 1606 row["SnapshotUUID"] = Util.ToRawUuidString(land.SnapshotID);
1607 row["UserLocationX"] = land.userLocation.X; 1607 row["UserLocationX"] = land.UserLocation.X;
1608 row["UserLocationY"] = land.userLocation.Y; 1608 row["UserLocationY"] = land.UserLocation.Y;
1609 row["UserLocationZ"] = land.userLocation.Z; 1609 row["UserLocationZ"] = land.UserLocation.Z;
1610 row["UserLookAtX"] = land.userLookAt.X; 1610 row["UserLookAtX"] = land.UserLookAt.X;
1611 row["UserLookAtY"] = land.userLookAt.Y; 1611 row["UserLookAtY"] = land.UserLookAt.Y;
1612 row["UserLookAtZ"] = land.userLookAt.Z; 1612 row["UserLookAtZ"] = land.UserLookAt.Z;
1613 row["AuthBuyerID"] = land.authBuyerID; 1613 row["AuthBuyerID"] = land.AuthBuyerID;
1614 } 1614 }
1615 1615
1616 /// <summary> 1616 /// <summary>
diff --git a/OpenSim/Data/SQLite/SQLiteRegionData.cs b/OpenSim/Data/SQLite/SQLiteRegionData.cs
index 6e30060..0f9323b 100644
--- a/OpenSim/Data/SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Data/SQLite/SQLiteRegionData.cs
@@ -533,7 +533,7 @@ namespace OpenSim.Data.SQLite
533 DataTable land = ds.Tables["land"]; 533 DataTable land = ds.Tables["land"];
534 DataTable landaccesslist = ds.Tables["landaccesslist"]; 534 DataTable landaccesslist = ds.Tables["landaccesslist"];
535 535
536 DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.globalID)); 536 DataRow landRow = land.Rows.Find(Util.ToRawUuidString(parcel.landData.GlobalID));
537 if (landRow == null) 537 if (landRow == null)
538 { 538 {
539 landRow = land.NewRow(); 539 landRow = land.NewRow();
@@ -548,14 +548,14 @@ namespace OpenSim.Data.SQLite
548 // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around 548 // I know this caused someone issues before, but OpenSim is unusable if we leave this stuff around
549 using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn)) 549 using (SqliteCommand cmd = new SqliteCommand("delete from landaccesslist where LandUUID=:LandUUID", m_conn))
550 { 550 {
551 cmd.Parameters.Add(new SqliteParameter(":LandUUID", Util.ToRawUuidString(parcel.landData.globalID))); 551 cmd.Parameters.Add(new SqliteParameter(":LandUUID", Util.ToRawUuidString(parcel.landData.GlobalID)));
552 cmd.ExecuteNonQuery(); 552 cmd.ExecuteNonQuery();
553 } 553 }
554 554
555 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.parcelAccessList) 555 foreach (ParcelManager.ParcelAccessEntry entry in parcel.landData.ParcelAccessList)
556 { 556 {
557 DataRow newAccessRow = landaccesslist.NewRow(); 557 DataRow newAccessRow = landaccesslist.NewRow();
558 fillLandAccessRow(newAccessRow, entry, parcel.landData.globalID); 558 fillLandAccessRow(newAccessRow, entry, parcel.landData.GlobalID);
559 landaccesslist.Rows.Add(newAccessRow); 559 landaccesslist.Rows.Add(newAccessRow);
560 } 560 }
561 } 561 }
@@ -580,11 +580,11 @@ namespace OpenSim.Data.SQLite
580 foreach (DataRow rawDataLand in rawDataForRegion) 580 foreach (DataRow rawDataLand in rawDataForRegion)
581 { 581 {
582 LandData newLand = buildLandData(rawDataLand); 582 LandData newLand = buildLandData(rawDataLand);
583 string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.globalID) + "'"; 583 string accessListSearchExp = "LandUUID = '" + Util.ToRawUuidString(newLand.GlobalID) + "'";
584 DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp); 584 DataRow[] rawDataForLandAccessList = landaccesslist.Select(accessListSearchExp);
585 foreach (DataRow rawDataLandAccess in rawDataForLandAccessList) 585 foreach (DataRow rawDataLandAccess in rawDataForLandAccessList)
586 { 586 {
587 newLand.parcelAccessList.Add(buildLandAccessData(rawDataLandAccess)); 587 newLand.ParcelAccessList.Add(buildLandAccessData(rawDataLandAccess));
588 } 588 }
589 589
590 landDataForRegion.Add(newLand); 590 landDataForRegion.Add(newLand);
@@ -1033,53 +1033,53 @@ namespace OpenSim.Data.SQLite
1033 { 1033 {
1034 LandData newData = new LandData(); 1034 LandData newData = new LandData();
1035 1035
1036 newData.globalID = new LLUUID((String) row["UUID"]); 1036 newData.GlobalID = new LLUUID((String) row["UUID"]);
1037 newData.localID = Convert.ToInt32(row["LocalLandID"]); 1037 newData.LocalID = Convert.ToInt32(row["LocalLandID"]);
1038 1038
1039 // Bitmap is a byte[512] 1039 // Bitmap is a byte[512]
1040 newData.landBitmapByteArray = (Byte[]) row["Bitmap"]; 1040 newData.Bitmap = (Byte[]) row["Bitmap"];
1041 1041
1042 newData.landName = (String) row["Name"]; 1042 newData.Name = (String) row["Name"];
1043 newData.landDesc = (String) row["Desc"]; 1043 newData.Description = (String) row["Desc"];
1044 newData.ownerID = (String) row["OwnerUUID"]; 1044 newData.OwnerID = (String) row["OwnerUUID"];
1045 newData.isGroupOwned = (Boolean) row["IsGroupOwned"]; 1045 newData.IsGroupOwned = (Boolean) row["IsGroupOwned"];
1046 newData.area = Convert.ToInt32(row["Area"]); 1046 newData.Area = Convert.ToInt32(row["Area"]);
1047 newData.auctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented 1047 newData.AuctionID = Convert.ToUInt32(row["AuctionID"]); //Unemplemented
1048 newData.category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]); 1048 newData.Category = (Parcel.ParcelCategory) Convert.ToInt32(row["Category"]);
1049 //Enum libsecondlife.Parcel.ParcelCategory 1049 //Enum libsecondlife.Parcel.ParcelCategory
1050 newData.claimDate = Convert.ToInt32(row["ClaimDate"]); 1050 newData.ClaimDate = Convert.ToInt32(row["ClaimDate"]);
1051 newData.claimPrice = Convert.ToInt32(row["ClaimPrice"]); 1051 newData.ClaimPrice = Convert.ToInt32(row["ClaimPrice"]);
1052 newData.groupID = new LLUUID((String) row["GroupUUID"]); 1052 newData.GroupID = new LLUUID((String) row["GroupUUID"]);
1053 newData.salePrice = Convert.ToInt32(row["SalePrice"]); 1053 newData.SalePrice = Convert.ToInt32(row["SalePrice"]);
1054 newData.landStatus = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]); 1054 newData.Status = (Parcel.ParcelStatus) Convert.ToInt32(row["LandStatus"]);
1055 //Enum. libsecondlife.Parcel.ParcelStatus 1055 //Enum. libsecondlife.Parcel.ParcelStatus
1056 newData.landFlags = Convert.ToUInt32(row["LandFlags"]); 1056 newData.Flags = Convert.ToUInt32(row["LandFlags"]);
1057 newData.landingType = (Byte) row["LandingType"]; 1057 newData.LandingType = (Byte) row["LandingType"];
1058 newData.mediaAutoScale = (Byte) row["MediaAutoScale"]; 1058 newData.MediaAutoScale = (Byte) row["MediaAutoScale"];
1059 newData.mediaID = new LLUUID((String) row["MediaTextureUUID"]); 1059 newData.MediaID = new LLUUID((String) row["MediaTextureUUID"]);
1060 newData.mediaURL = (String) row["MediaURL"]; 1060 newData.MediaURL = (String) row["MediaURL"];
1061 newData.musicURL = (String) row["MusicURL"]; 1061 newData.MusicURL = (String) row["MusicURL"];
1062 newData.passHours = Convert.ToSingle(row["PassHours"]); 1062 newData.PassHours = Convert.ToSingle(row["PassHours"]);
1063 newData.passPrice = Convert.ToInt32(row["PassPrice"]); 1063 newData.PassPrice = Convert.ToInt32(row["PassPrice"]);
1064 newData.snapshotID = (String) row["SnapshotUUID"]; 1064 newData.SnapshotID = (String) row["SnapshotUUID"];
1065 try 1065 try
1066 { 1066 {
1067 1067
1068 newData.userLocation = 1068 newData.UserLocation =
1069 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]), 1069 new LLVector3(Convert.ToSingle(row["UserLocationX"]), Convert.ToSingle(row["UserLocationY"]),
1070 Convert.ToSingle(row["UserLocationZ"])); 1070 Convert.ToSingle(row["UserLocationZ"]));
1071 newData.userLookAt = 1071 newData.UserLookAt =
1072 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]), 1072 new LLVector3(Convert.ToSingle(row["UserLookAtX"]), Convert.ToSingle(row["UserLookAtY"]),
1073 Convert.ToSingle(row["UserLookAtZ"])); 1073 Convert.ToSingle(row["UserLookAtZ"]));
1074 1074
1075 } 1075 }
1076 catch (InvalidCastException) 1076 catch (InvalidCastException)
1077 { 1077 {
1078 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.landName); 1078 m_log.ErrorFormat("[PARCEL]: unable to get parcel telehub settings for {1}", newData.Name);
1079 newData.userLocation = LLVector3.Zero; 1079 newData.UserLocation = LLVector3.Zero;
1080 newData.userLookAt = LLVector3.Zero; 1080 newData.UserLookAt = LLVector3.Zero;
1081 } 1081 }
1082 newData.parcelAccessList = new List<ParcelManager.ParcelAccessEntry>(); 1082 newData.ParcelAccessList = new List<ParcelManager.ParcelAccessEntry>();
1083 LLUUID authBuyerID = LLUUID.Zero; 1083 LLUUID authBuyerID = LLUUID.Zero;
1084 1084
1085 try 1085 try
@@ -1270,41 +1270,41 @@ namespace OpenSim.Data.SQLite
1270 /// <param name="regionUUID"></param> 1270 /// <param name="regionUUID"></param>
1271 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID) 1271 private static void fillLandRow(DataRow row, LandData land, LLUUID regionUUID)
1272 { 1272 {
1273 row["UUID"] = Util.ToRawUuidString(land.globalID); 1273 row["UUID"] = Util.ToRawUuidString(land.GlobalID);
1274 row["RegionUUID"] = Util.ToRawUuidString(regionUUID); 1274 row["RegionUUID"] = Util.ToRawUuidString(regionUUID);
1275 row["LocalLandID"] = land.localID; 1275 row["LocalLandID"] = land.LocalID;
1276 1276
1277 // Bitmap is a byte[512] 1277 // Bitmap is a byte[512]
1278 row["Bitmap"] = land.landBitmapByteArray; 1278 row["Bitmap"] = land.Bitmap;
1279 1279
1280 row["Name"] = land.landName; 1280 row["Name"] = land.Name;
1281 row["Desc"] = land.landDesc; 1281 row["Desc"] = land.Description;
1282 row["OwnerUUID"] = Util.ToRawUuidString(land.ownerID); 1282 row["OwnerUUID"] = Util.ToRawUuidString(land.OwnerID);
1283 row["IsGroupOwned"] = land.isGroupOwned; 1283 row["IsGroupOwned"] = land.IsGroupOwned;
1284 row["Area"] = land.area; 1284 row["Area"] = land.Area;
1285 row["AuctionID"] = land.auctionID; //Unemplemented 1285 row["AuctionID"] = land.AuctionID; //Unemplemented
1286 row["Category"] = land.category; //Enum libsecondlife.Parcel.ParcelCategory 1286 row["Category"] = land.Category; //Enum libsecondlife.Parcel.ParcelCategory
1287 row["ClaimDate"] = land.claimDate; 1287 row["ClaimDate"] = land.ClaimDate;
1288 row["ClaimPrice"] = land.claimPrice; 1288 row["ClaimPrice"] = land.ClaimPrice;
1289 row["GroupUUID"] = Util.ToRawUuidString(land.groupID); 1289 row["GroupUUID"] = Util.ToRawUuidString(land.GroupID);
1290 row["SalePrice"] = land.salePrice; 1290 row["SalePrice"] = land.SalePrice;
1291 row["LandStatus"] = land.landStatus; //Enum. libsecondlife.Parcel.ParcelStatus 1291 row["LandStatus"] = land.Status; //Enum. libsecondlife.Parcel.ParcelStatus
1292 row["LandFlags"] = land.landFlags; 1292 row["LandFlags"] = land.Flags;
1293 row["LandingType"] = land.landingType; 1293 row["LandingType"] = land.LandingType;
1294 row["MediaAutoScale"] = land.mediaAutoScale; 1294 row["MediaAutoScale"] = land.MediaAutoScale;
1295 row["MediaTextureUUID"] = Util.ToRawUuidString(land.mediaID); 1295 row["MediaTextureUUID"] = Util.ToRawUuidString(land.MediaID);
1296 row["MediaURL"] = land.mediaURL; 1296 row["MediaURL"] = land.MediaURL;
1297 row["MusicURL"] = land.musicURL; 1297 row["MusicURL"] = land.MusicURL;
1298 row["PassHours"] = land.passHours; 1298 row["PassHours"] = land.PassHours;
1299 row["PassPrice"] = land.passPrice; 1299 row["PassPrice"] = land.PassPrice;
1300 row["SnapshotUUID"] = Util.ToRawUuidString(land.snapshotID); 1300 row["SnapshotUUID"] = Util.ToRawUuidString(land.SnapshotID);
1301 row["UserLocationX"] = land.userLocation.X; 1301 row["UserLocationX"] = land.UserLocation.X;
1302 row["UserLocationY"] = land.userLocation.Y; 1302 row["UserLocationY"] = land.UserLocation.Y;
1303 row["UserLocationZ"] = land.userLocation.Z; 1303 row["UserLocationZ"] = land.UserLocation.Z;
1304 row["UserLookAtX"] = land.userLookAt.X; 1304 row["UserLookAtX"] = land.UserLookAt.X;
1305 row["UserLookAtY"] = land.userLookAt.Y; 1305 row["UserLookAtY"] = land.UserLookAt.Y;
1306 row["UserLookAtZ"] = land.userLookAt.Z; 1306 row["UserLookAtZ"] = land.UserLookAt.Z;
1307 row["AuthbuyerID"] = Util.ToRawUuidString(land.authBuyerID); 1307 row["AuthbuyerID"] = Util.ToRawUuidString(land.AuthBuyerID);
1308 } 1308 }
1309 1309
1310 /// <summary> 1310 /// <summary>