diff options
author | Melanie | 2010-03-03 02:07:03 +0000 |
---|---|---|
committer | Melanie | 2010-03-03 02:07:03 +0000 |
commit | 028a87fe37002e7a0611f66babf1deee46c83804 (patch) | |
tree | 387aec499fd60c2012bed8148e6a2ddc847c3d95 /OpenSim/Data/MySQL/MySQLRegionData.cs | |
parent | Revert "test" (diff) | |
parent | Fixes Region.Framework tests. Although these tests don't fail, they need to b... (diff) | |
download | opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.zip opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.gz opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.bz2 opensim-SC-028a87fe37002e7a0611f66babf1deee46c83804.tar.xz |
Merge branch 'master' into careminster-presence-refactor
This brings careminster on the level of master. To be tested
Diffstat (limited to '')
-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 | } |