aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLSimulationData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLSimulationData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLSimulationData.cs41
1 files changed, 23 insertions, 18 deletions
diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs
index 96ecea6..b9228d1 100644
--- a/OpenSim/Data/MySQL/MySQLSimulationData.cs
+++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs
@@ -66,7 +66,7 @@ namespace OpenSim.Data.MySQL
66 Initialise(connectionString); 66 Initialise(connectionString);
67 } 67 }
68 68
69 public void Initialise(string connectionString) 69 public virtual void Initialise(string connectionString)
70 { 70 {
71 m_connectionString = connectionString; 71 m_connectionString = connectionString;
72 72
@@ -113,7 +113,7 @@ namespace OpenSim.Data.MySQL
113 113
114 public void Dispose() {} 114 public void Dispose() {}
115 115
116 public void StoreObject(SceneObjectGroup obj, UUID regionUUID) 116 public virtual void StoreObject(SceneObjectGroup obj, UUID regionUUID)
117 { 117 {
118 uint flags = obj.RootPart.GetEffectiveObjectFlags(); 118 uint flags = obj.RootPart.GetEffectiveObjectFlags();
119 119
@@ -241,7 +241,7 @@ namespace OpenSim.Data.MySQL
241 } 241 }
242 } 242 }
243 243
244 public void RemoveObject(UUID obj, UUID regionUUID) 244 public virtual void RemoveObject(UUID obj, UUID regionUUID)
245 { 245 {
246// m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID); 246// m_log.DebugFormat("[REGION DB]: Deleting scene object {0} from {1} in database", obj, regionUUID);
247 247
@@ -390,7 +390,7 @@ namespace OpenSim.Data.MySQL
390 } 390 }
391 } 391 }
392 392
393 public List<SceneObjectGroup> LoadObjects(UUID regionID) 393 public virtual List<SceneObjectGroup> LoadObjects(UUID regionID)
394 { 394 {
395 const int ROWS_PER_QUERY = 5000; 395 const int ROWS_PER_QUERY = 5000;
396 396
@@ -559,7 +559,7 @@ namespace OpenSim.Data.MySQL
559 } 559 }
560 } 560 }
561 561
562 public void StoreTerrain(double[,] ter, UUID regionID) 562 public virtual void StoreTerrain(double[,] ter, UUID regionID)
563 { 563 {
564 m_log.Info("[REGION DB]: Storing terrain"); 564 m_log.Info("[REGION DB]: Storing terrain");
565 565
@@ -588,7 +588,7 @@ namespace OpenSim.Data.MySQL
588 } 588 }
589 } 589 }
590 590
591 public double[,] LoadTerrain(UUID regionID) 591 public virtual double[,] LoadTerrain(UUID regionID)
592 { 592 {
593 double[,] terrain = null; 593 double[,] terrain = null;
594 594
@@ -638,7 +638,7 @@ namespace OpenSim.Data.MySQL
638 return terrain; 638 return terrain;
639 } 639 }
640 640
641 public void RemoveLandObject(UUID globalID) 641 public virtual void RemoveLandObject(UUID globalID)
642 { 642 {
643 lock (m_dbLock) 643 lock (m_dbLock)
644 { 644 {
@@ -657,7 +657,7 @@ namespace OpenSim.Data.MySQL
657 } 657 }
658 } 658 }
659 659
660 public void StoreLandObject(ILandObject parcel) 660 public virtual void StoreLandObject(ILandObject parcel)
661 { 661 {
662 lock (m_dbLock) 662 lock (m_dbLock)
663 { 663 {
@@ -714,7 +714,7 @@ namespace OpenSim.Data.MySQL
714 } 714 }
715 } 715 }
716 716
717 public RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID) 717 public virtual RegionLightShareData LoadRegionWindlightSettings(UUID regionUUID)
718 { 718 {
719 RegionLightShareData nWP = new RegionLightShareData(); 719 RegionLightShareData nWP = new RegionLightShareData();
720 nWP.OnSave += StoreRegionWindlightSettings; 720 nWP.OnSave += StoreRegionWindlightSettings;
@@ -736,7 +736,7 @@ namespace OpenSim.Data.MySQL
736 { 736 {
737 //No result, so store our default windlight profile and return it 737 //No result, so store our default windlight profile and return it
738 nWP.regionID = regionUUID; 738 nWP.regionID = regionUUID;
739 StoreRegionWindlightSettings(nWP); 739 // StoreRegionWindlightSettings(nWP);
740 return nWP; 740 return nWP;
741 } 741 }
742 else 742 else
@@ -811,7 +811,7 @@ namespace OpenSim.Data.MySQL
811 return nWP; 811 return nWP;
812 } 812 }
813 813
814 public RegionSettings LoadRegionSettings(UUID regionUUID) 814 public virtual RegionSettings LoadRegionSettings(UUID regionUUID)
815 { 815 {
816 RegionSettings rs = null; 816 RegionSettings rs = null;
817 817
@@ -849,7 +849,7 @@ namespace OpenSim.Data.MySQL
849 return rs; 849 return rs;
850 } 850 }
851 851
852 public void StoreRegionWindlightSettings(RegionLightShareData wl) 852 public virtual void StoreRegionWindlightSettings(RegionLightShareData wl)
853 { 853 {
854 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 854 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
855 { 855 {
@@ -952,7 +952,7 @@ namespace OpenSim.Data.MySQL
952 } 952 }
953 } 953 }
954 954
955 public void RemoveRegionWindlightSettings(UUID regionID) 955 public virtual void RemoveRegionWindlightSettings(UUID regionID)
956 { 956 {
957 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString)) 957 using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
958 { 958 {
@@ -967,7 +967,7 @@ namespace OpenSim.Data.MySQL
967 } 967 }
968 } 968 }
969 969
970 public void StoreRegionSettings(RegionSettings rs) 970 public virtual void StoreRegionSettings(RegionSettings rs)
971 { 971 {
972 lock (m_dbLock) 972 lock (m_dbLock)
973 { 973 {
@@ -994,7 +994,7 @@ namespace OpenSim.Data.MySQL
994 "use_estate_sun, fixed_sun, sun_position, " + 994 "use_estate_sun, fixed_sun, sun_position, " +
995 "covenant, Sandbox, sunvectorx, sunvectory, " + 995 "covenant, Sandbox, sunvectorx, sunvectory, " +
996 "sunvectorz, loaded_creation_datetime, " + 996 "sunvectorz, loaded_creation_datetime, " +
997 "loaded_creation_id, map_tile_ID) values (?RegionUUID, ?BlockTerraform, " + 997 "loaded_creation_id, map_tile_ID, block_search, casino) values (?RegionUUID, ?BlockTerraform, " +
998 "?BlockFly, ?AllowDamage, ?RestrictPushing, " + 998 "?BlockFly, ?AllowDamage, ?RestrictPushing, " +
999 "?AllowLandResell, ?AllowLandJoinDivide, " + 999 "?AllowLandResell, ?AllowLandJoinDivide, " +
1000 "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " + 1000 "?BlockShowInSearch, ?AgentLimit, ?ObjectBonus, " +
@@ -1009,7 +1009,7 @@ namespace OpenSim.Data.MySQL
1009 "?SunPosition, ?Covenant, ?Sandbox, " + 1009 "?SunPosition, ?Covenant, ?Sandbox, " +
1010 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + 1010 "?SunVectorX, ?SunVectorY, ?SunVectorZ, " +
1011 "?LoadedCreationDateTime, ?LoadedCreationID, " + 1011 "?LoadedCreationDateTime, ?LoadedCreationID, " +
1012 "?TerrainImageID)"; 1012 "?TerrainImageID, ?block_search, ?casino)";
1013 1013
1014 FillRegionSettingsCommand(cmd, rs); 1014 FillRegionSettingsCommand(cmd, rs);
1015 1015
@@ -1019,7 +1019,7 @@ namespace OpenSim.Data.MySQL
1019 } 1019 }
1020 } 1020 }
1021 1021
1022 public List<LandData> LoadLandObjects(UUID regionUUID) 1022 public virtual List<LandData> LoadLandObjects(UUID regionUUID)
1023 { 1023 {
1024 List<LandData> landData = new List<LandData>(); 1024 List<LandData> landData = new List<LandData>();
1025 1025
@@ -1298,6 +1298,9 @@ namespace OpenSim.Data.MySQL
1298 1298
1299 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); 1299 newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]);
1300 1300
1301 newSettings.GodBlockSearch = Convert.ToBoolean(row["block_search"]);
1302 newSettings.Casino = Convert.ToBoolean(row["casino"]);
1303
1301 return newSettings; 1304 return newSettings;
1302 } 1305 }
1303 1306
@@ -1627,6 +1630,8 @@ namespace OpenSim.Data.MySQL
1627 cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); 1630 cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime);
1628 cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); 1631 cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID);
1629 cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID); 1632 cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID);
1633 cmd.Parameters.AddWithValue("block_search", settings.GodBlockSearch);
1634 cmd.Parameters.AddWithValue("casino", settings.Casino);
1630 1635
1631 } 1636 }
1632 1637
@@ -1785,7 +1790,7 @@ namespace OpenSim.Data.MySQL
1785 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml()); 1790 cmd.Parameters.AddWithValue("Media", null == s.Media ? null : s.Media.ToXml());
1786 } 1791 }
1787 1792
1788 public void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items) 1793 public virtual void StorePrimInventory(UUID primID, ICollection<TaskInventoryItem> items)
1789 { 1794 {
1790 lock (m_dbLock) 1795 lock (m_dbLock)
1791 { 1796 {