added prefix to rest manager

added region method again
This commit is contained in:
Zack Piispanen 2012-06-23 14:40:06 -04:00
parent bdf56225b7
commit a259a02306
2 changed files with 16 additions and 1 deletions

View file

@ -283,6 +283,21 @@ namespace TShockAPI.DB
return regions;
}
public List<Region> InAreaRegion(int x, int y)
{
List<Region> regions = new List<Region>() { };
foreach (Region region in Regions)
{
if (x >= region.Area.Left && x <= region.Area.Right &&
y >= region.Area.Top && y <= region.Area.Bottom &&
region.DisableBuild)
{
regions.Add(region);
}
}
return regions;
}
public static List<string> ListIDs(string MergedIDs)
{
return MergedIDs.Split(new[] {','}, StringSplitOptions.RemoveEmptyEntries).ToList();