aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Data/MySQL/MySQLRegionData.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs')
-rw-r--r--OpenSim/Data/MySQL/MySQLRegionData.cs15
1 files changed, 8 insertions, 7 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index 46df421..9115e93 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -81,17 +81,15 @@ namespace OpenSim.Data.MySQL
81 } 81 }
82 } 82 }
83 83
84 public RegionData Get(int posX, int posY, UUID scopeID) 84 public RegionData GetSpecific(string regionName, UUID scopeID)
85 { 85 {
86/* fixed size regions 86 string command = "select * from `" + m_Realm + "` where regionName = ?regionName";
87 string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY";
88 if (scopeID != UUID.Zero) 87 if (scopeID != UUID.Zero)
89 command += " and ScopeID = ?scopeID"; 88 command += " and ScopeID = ?scopeID";
90 89
91 using (MySqlCommand cmd = new MySqlCommand(command)) 90 using (MySqlCommand cmd = new MySqlCommand(command))
92 { 91 {
93 cmd.Parameters.AddWithValue("?posX", posX.ToString()); 92 cmd.Parameters.AddWithValue("?regionName", regionName);
94 cmd.Parameters.AddWithValue("?posY", posY.ToString());
95 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); 93 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
96 94
97 List<RegionData> ret = RunCommand(cmd); 95 List<RegionData> ret = RunCommand(cmd);
@@ -100,8 +98,11 @@ namespace OpenSim.Data.MySQL
100 98
101 return ret[0]; 99 return ret[0];
102 } 100 }
103*/ 101
104 // extend database search for maximum region size area 102 }
103
104 public RegionData Get(int posX, int posY, UUID scopeID)
105 {
105 string command = "select * from `" + m_Realm + "` where locX between ?startX and ?endX and locY between ?startY and ?endY"; 106 string command = "select * from `" + m_Realm + "` where locX between ?startX and ?endX and locY between ?startY and ?endY";
106 if (scopeID != UUID.Zero) 107 if (scopeID != UUID.Zero)
107 command += " and ScopeID = ?scopeID"; 108 command += " and ScopeID = ?scopeID";