diff options
author | Melanie | 2010-01-09 20:46:32 +0000 |
---|---|---|
committer | Melanie | 2010-01-09 20:46:32 +0000 |
commit | 28d6705358c2e383fb46c57f064de4dcff144e33 (patch) | |
tree | 9a95b712626d89ec8b957352a84b3c51f2b344ca /OpenSim/Data/MySQL/MySQLRegionData.cs | |
parent | Less refs to UserProfileCacheService. Compiles but likely doesn't run. (diff) | |
download | opensim-SC_OLD-28d6705358c2e383fb46c57f064de4dcff144e33.zip opensim-SC_OLD-28d6705358c2e383fb46c57f064de4dcff144e33.tar.gz opensim-SC_OLD-28d6705358c2e383fb46c57f064de4dcff144e33.tar.bz2 opensim-SC_OLD-28d6705358c2e383fb46c57f064de4dcff144e33.tar.xz |
Preliminary work on the new default region setting mechanism
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 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 | } |