Move TShock.CheckRangePermission to TSPlayer

TShock.CheckRangePermission is now TSPlayer.IsInRange, but the most
important thing is that this method returns the opposite of what the
original did, so all of the calls that would go to it are now inverted.
This commit is contained in:
Lucas Nicodemus 2017-12-21 20:32:07 -07:00
parent d4cb07379b
commit 09121368e4
5 changed files with 35 additions and 38 deletions

View file

@ -2578,7 +2578,7 @@ namespace TShockAPI
return true;
}
if (TShock.CheckRangePermission(args.Player, x, y))
if (!args.Player.IsInRange(x, y))
{
args.Player.SendData(PacketTypes.SignNew, "", id);
return true;
@ -2898,7 +2898,7 @@ namespace TShockAPI
if (args.Player.IsBouncerThrottled() ||
TShock.CheckTilePermission(args.Player, x, y, true) ||
TShock.CheckRangePermission(args.Player, x, y))
!args.Player.IsInRange(x, y))
{
args.Player.SendData(PacketTypes.PaintTile, "", x, y, Main.tile[x, y].color());
return true;
@ -2942,7 +2942,7 @@ namespace TShockAPI
if (args.Player.IsBouncerThrottled() ||
TShock.CheckTilePermission(args.Player, x, y, true) ||
TShock.CheckRangePermission(args.Player, x, y))
!args.Player.IsInRange(x, y))
{
args.Player.SendData(PacketTypes.PaintWall, "", x, y, Main.tile[x, y].wallColor());
return true;
@ -3293,7 +3293,7 @@ namespace TShockAPI
return true;
}
if (TShock.CheckRangePermission(args.Player, (int)position.X, (int)position.Y))
if (!args.Player.IsInRange((int)position.X, (int)position.Y))
{
return true;
}