Attempting to fix region detection

Attempting to fix /protect
This commit is contained in:
Lucas Nicodemus 2011-07-15 22:56:51 -06:00
parent 9cdbcdb92c
commit b98c84fa5b
4 changed files with 9 additions and 5 deletions

View file

@ -1373,10 +1373,10 @@ namespace TShockAPI
args.Player.SendMessage("Could not find specified region", Color.Red); args.Player.SendMessage("Could not find specified region", Color.Red);
} }
else else
args.Player.SendMessage("Invalid syntax! Proper syntax: /region protected [name] [true/false]", Color.Red); args.Player.SendMessage("Invalid syntax! Proper syntax: /region protect [name] [true/false]", Color.Red);
} }
else else
args.Player.SendMessage("Invalid syntax! Proper syntax: /region protected [name] [true/false]", Color.Red); args.Player.SendMessage("Invalid syntax! Proper syntax: /region protect [name] [true/false]", Color.Red);
break; break;
} }
case "delete": case "delete":

View file

@ -336,7 +336,7 @@ namespace TShockAPI.DB
public bool InArea(Rectangle point) public bool InArea(Rectangle point)
{ {
if (RegionArea.Intersects(point)) if (RegionArea.Contains(point.X, point.Y))
{ {
return true; return true;
} }

View file

@ -288,6 +288,10 @@ namespace TShockAPI
args.Player.SendTileSquare(x, y); args.Player.SendTileSquare(x, y);
return true; return true;
} }
if (TShock.Regions.InArea(x, y))
{
args.Player.SendMessage("Tick");
}
if (TShock.Config.DisableBuild) if (TShock.Config.DisableBuild)
{ {
if (!args.Player.Group.HasPermission("editspawn")) if (!args.Player.Group.HasPermission("editspawn"))

View file

@ -35,5 +35,5 @@ using System.Runtime.InteropServices;
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.3.4.0714")] [assembly: AssemblyVersion("2.3.4.0715")]
[assembly: AssemblyFileVersion("2.3.4.0714")] [assembly: AssemblyFileVersion("2.3.4.0715")]