diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLDataStore.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLDataStore.cs | 140 |
1 files changed, 70 insertions, 70 deletions
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> |