From f7957a82d0dc821544942dce34472a51e3d2f5be Mon Sep 17 00:00:00 2001 From: skeletor Date: Tue, 21 Jan 2020 15:22:53 -0500 Subject: [PATCH] [patch] Fixed move-and-rotate wired should not allow movement into allow-sit furni --- .../wired/effects/WiredEffectMoveRotateFurni.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java index caabe0e0..c261c851 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/wired/effects/WiredEffectMoveRotateFurni.java @@ -69,7 +69,6 @@ public class WiredEffectMoveRotateFurni extends InteractionWiredEffect { rotationToAdd = 6; } } - } int newRotation = ((item.getRotation() + rotationToAdd) % 8) % (item.getBaseItem().getWidth() > 1 || item.getBaseItem().getLength() > 1 ? 4 : 8); @@ -162,7 +161,7 @@ public class WiredEffectMoveRotateFurni extends InteractionWiredEffect { for (short y = (short) rectangle.y; y < rectangle.y + rectangle.getHeight(); y++) { RoomTile tile = layout.getTile(x, y); - if (tile == null || tile.state == RoomTileState.INVALID || !tile.getAllowStack()) { + if (tile == null || tile.state == RoomTileState.INVALID || tile.state == RoomTileState.BLOCKED || !tile.getAllowStack()) { validMove = false; break; } @@ -181,9 +180,13 @@ public class WiredEffectMoveRotateFurni extends InteractionWiredEffect { } HabboItem i = room.getTopItemAt(x, y, item); - if (i == null || i == item || i.getBaseItem().allowStack()) { - offset = Math.max(room.getStackHeight(newTile.x, newTile.y, false, item) - item.getZ(), offset); + if (i != null && !i.getBaseItem().allowStack()) { + validMove = false; + break; } + + offset = Math.max(room.getStackHeight(newTile.x, newTile.y, false, item) - item.getZ(), offset); + tilesToUpdate.add(tile); } }