aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MSSQL
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MSSQL')
-rw-r--r--OpenSim/Data/MSSQL/MSSQLDataStore.cs132
1 files changed, 66 insertions, 66 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>