From 6a27d51261364189f42e401268ad0f627e1fbcf0 Mon Sep 17 00:00:00 2001 From: MarioE Date: Sun, 20 Oct 2013 13:16:23 -0400 Subject: [PATCH] Fix more exploits --- TShockAPI/GetDataHandlers.cs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index b0966122..9c71a0ca 100755 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2537,8 +2537,8 @@ namespace TShockAPI if (OnLiquidSet(tileX, tileY, amount, type)) return true; - if (tileX < 0 || tileX >= Main.maxTilesX || tileY < 0 || tileY >= Main.maxTilesY) - return false; + if (!TShock.Utils.TilePlacementValid(tileX, tileY) || (args.Player.Dead && TShock.Config.PreventDeadModification)) + return true; if (TShock.CheckIgnores(args.Player)) { @@ -2653,11 +2653,8 @@ namespace TShockAPI var tileY = args.Data.ReadInt32(); if (OnTileKill(tileX, tileY)) return true; - if (tileX < 0 || tileX >= Main.maxTilesX || tileY < 0 || tileY >= Main.maxTilesY) - return false; - - if (args.Player.Dead && TShock.Config.PreventDeadModification) - return true; + if (!TShock.Utils.TilePlacementValid(tileX, tileY) || (args.Player.Dead && TShock.Config.PreventDeadModification)) + return true; if (TShock.CheckIgnores(args.Player)) {