diff options
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLRegionData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLRegionData.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Data/MySQL/MySQLRegionData.cs b/OpenSim/Data/MySQL/MySQLRegionData.cs index 46df421..12064a3 100644 --- a/OpenSim/Data/MySQL/MySQLRegionData.cs +++ b/OpenSim/Data/MySQL/MySQLRegionData.cs | |||
@@ -81,7 +81,30 @@ namespace OpenSim.Data.MySQL | |||
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
84 | public RegionData Get(int posX, int posY, UUID scopeID) | 84 | //BA MOD.... |
85 | public RegionData GetSpecific(string regionName, UUID scopeID) | ||
86 | { | ||
87 | string command = "select * from `" + m_Realm + "` where regionName = ?regionName"; | ||
88 | if (scopeID != UUID.Zero) | ||
89 | command += " and ScopeID = ?scopeID"; | ||
90 | |||
91 | //command += " order by regionName"; | ||
92 | |||
93 | using (MySqlCommand cmd = new MySqlCommand(command)) | ||
94 | { | ||
95 | cmd.Parameters.AddWithValue("?regionName", regionName); | ||
96 | cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString()); | ||
97 | |||
98 | List<RegionData> ret = RunCommand(cmd); | ||
99 | if (ret.Count == 0) | ||
100 | return null; | ||
101 | |||
102 | return ret[0]; | ||
103 | } | ||
104 | |||
105 | } | ||
106 | |||
107 | public RegionData Get(int posX, int posY, UUID scopeID) | ||
85 | { | 108 | { |
86 | /* fixed size regions | 109 | /* fixed size regions |
87 | string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; | 110 | string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY"; |