Merge pull request #1282 from ProfessorXZ/icerod-fix

Fixed IceRod not placing ice blocks
This commit is contained in:
ProfessorXZ 2016-09-12 22:25:52 +02:00 committed by GitHub
commit 4d4679da3b

View file

@ -2048,21 +2048,14 @@ namespace TShockAPI
return true; return true;
} }
// If they aren't selecting the item which creates the correct tile or wall, they're hacking. // If they aren't selecting the item which creates the tile or wall, they're hacking.
if (editData != (action == EditAction.PlaceTile ? selectedItem.createTile : selectedItem.createWall)) if (editData != (action == EditAction.PlaceTile ? selectedItem.createTile : selectedItem.createWall))
{ {
args.Player.SendTileSquare(tileX, tileY, 4); if (selectedItem.netID == ItemID.IceRod && editData == TileID.MagicalIceBlock)
return true; {
return false;
} }
// If they aren't selecting the item which creates the tile or wall, they're hacking.
if ((editData != TileID.MagicalIceBlock
&& editData != TileID.Rope
&& editData != TileID.SilkRope
&& editData != TileID.VineRope
&& editData != TileID.WebRope)
&& editData != (action == EditAction.PlaceTile ? selectedItem.createTile : selectedItem.createWall))
{
args.Player.SendTileSquare(tileX, tileY, 4); args.Player.SendTileSquare(tileX, tileY, 4);
return true; return true;
} }