Copied and pasted old region checking code.

This commit is contained in:
Lucas Nicodemus 2011-07-16 02:01:48 -06:00
parent b98c84fa5b
commit 0e9624ace3

View file

@ -219,9 +219,11 @@ namespace TShockAPI.DB
public bool InArea(int x, int y)
{
for (int i = 0; i < Regions.Count; i++)
foreach(Region region in Regions)
{
if (Regions[i].InArea(new Rectangle(x, y, 0, 0)) && Regions[i].DisableBuild == 0)
if (x >= region.RegionArea.Left && x <= region.RegionArea.Right &&
y >= region.RegionArea.Top && y <= region.RegionArea.Bottom &&
region.DisableBuild == 1)
{
return true;
}