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.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs
index b0075e8..d045f61 100644
--- a/OpenSim/Data/MySQL/MySQLRegionData.cs
+++ b/OpenSim/Data/MySQL/MySQLRegionData.cs
@@ -274,5 +274,31 @@ namespace OpenSim.Data.MySQL
274 274
275 return false; 275 return false;
276 } 276 }
277 public List<RegionData> GetDefaultRegions(UUID scopeID)
278 {
279 string command = "select * from `"+m_Realm+"` where (flags & 1) <> 0";
280 if (scopeID != UUID.Zero)
281 command += " and ScopeID = ?scopeID";
282
283 MySqlCommand cmd = new MySqlCommand(command);
284
285 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
286
287 return RunCommand(cmd);
288 }
289
290 public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y)
291 {
292 string command = "select * from `"+m_Realm+"` where (flags & 2) <> 0";
293 if (scopeID != UUID.Zero)
294 command += " and ScopeID = ?scopeID";
295
296 MySqlCommand cmd = new MySqlCommand(command);
297
298 cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
299
300 // TODO: distance-sort results
301 return RunCommand(cmd);
302 }
277 } 303 }
278} 304}