diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index a1a08b1..aa9a104 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -283,5 +283,31 @@ namespace OpenSim.Data.MySQL | |||
283 | 283 | ||
284 | return false; | 284 | return false; |
285 | } | 285 | } |
286 | public List<RegionData> GetDefaultRegions(UUID scopeID) | ||
287 | { | ||
288 | string command = "select * from `"+m_Realm+"` where (flags & 1) <> 0"; | ||
289 | if (scopeID != UUID.Zero) | ||
290 | command += " and ScopeID = ?scopeID"; | ||
291 | |||
292 | MySqlCommand cmd = new MySqlCommand(command); | ||
293 | |||
294 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | ||
295 | |||
296 | return RunCommand(cmd); | ||
297 | } | ||
298 | |||
299 | public List<RegionData> GetFallbackRegions(UUID scopeID, int x, int y) | ||
300 | { | ||
301 | string command = "select * from `"+m_Realm+"` where (flags & 2) <> 0"; | ||
302 | if (scopeID != UUID.Zero) | ||
303 | command += " and ScopeID = ?scopeID"; | ||
304 | |||
305 | MySqlCommand cmd = new MySqlCommand(command); | ||
306 | |||
307 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | ||
308 | |||
309 | // TODO: distance-sort results | ||
310 | return RunCommand(cmd); | ||
311 | } | ||
286 | } | 312 | } |
287 | } | 313 | } |