Attempt to fix the issue where, when logging into the grid, the user supplies a region name, but instead of going to the specific region, they are sent to a region "Like" the one specified.

Signed-off-by: Terry <terry@digiworldz.com>
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
This commit is contained in:
Terry
2019-11-12 11:02:10 -05:00
committed by UbitUmarov
parent eabf9a7c04
commit 2f79f463ea
10 changed files with 83 additions and 3 deletions

View File

@@ -71,6 +71,10 @@ namespace OpenSim.Data
{
RegionData Get(UUID regionID, UUID ScopeID);
List<RegionData> Get(string regionName, UUID ScopeID);
//BA MOD....
RegionData GetSpecific(string regionName, UUID ScopeID);
RegionData Get(int x, int y, UUID ScopeID);
List<RegionData> Get(int xStart, int yStart, int xEnd, int yEnd, UUID ScopeID);

View File

@@ -81,7 +81,30 @@ namespace OpenSim.Data.MySQL
}
}
public RegionData Get(int posX, int posY, UUID scopeID)
//BA MOD....
public RegionData GetSpecific(string regionName, UUID scopeID)
{
string command = "select * from `" + m_Realm + "` where regionName = ?regionName";
if (scopeID != UUID.Zero)
command += " and ScopeID = ?scopeID";
//command += " order by regionName";
using (MySqlCommand cmd = new MySqlCommand(command))
{
cmd.Parameters.AddWithValue("?regionName", regionName);
cmd.Parameters.AddWithValue("?scopeID", scopeID.ToString());
List<RegionData> ret = RunCommand(cmd);
if (ret.Count == 0)
return null;
return ret[0];
}
}
public RegionData Get(int posX, int posY, UUID scopeID)
{
/* fixed size regions
string command = "select * from `"+m_Realm+"` where locX = ?posX and locY = ?posY";

View File

@@ -166,7 +166,13 @@ namespace OpenSim.Data.Null
return null;
}
public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID)
//BA MOD...
public RegionData GetSpecific(string regionName, UUID ScopeID)
{
return null;
}
public List<RegionData> Get(int startX, int startY, int endX, int endY, UUID scopeID)
{
if (m_useStaticInstance && Instance != this)
return Instance.Get(startX, startY, endX, endY, scopeID);

View File

@@ -114,6 +114,12 @@ namespace OpenSim.Data.PGSQL
}
}
//BA MOD...
public RegionData GetSpecific(string regionName, UUID ScopeID)
{
return null;
}
public RegionData Get(int posX, int posY, UUID scopeID)
{
// extend database search for maximum region size area