Fixed liquid removal exploit

This commit is contained in:
MarioE 2012-07-02 16:10:30 -04:00
parent 00db1b1b09
commit 50681d0d38

View file

@ -2126,11 +2126,6 @@ namespace TShockAPI
if (OnLiquidSet(tileX, tileY, liquid, lava))
return true;
//The liquid was picked up.
if (liquid == 0)
return false;
if (tileX < 0 || tileX >= Main.maxTilesX || tileY < 0 || tileY >= Main.maxTilesY)
return false;
@ -2151,7 +2146,8 @@ namespace TShockAPI
{
args.Player.TileLiquidThreshold++;
}
if (liquid != 0)
{
int bucket = 0;
if (args.TPlayer.inventory[args.TPlayer.selectedItem].type == 206)
{
@ -2176,6 +2172,7 @@ namespace TShockAPI
args.Player.Disable("Using banned water bucket without permissions.");
args.Player.SendTileSquare(tileX, tileY);
return true;
}
}
if (TShock.CheckTilePermission(args.Player, tileX, tileY))