From 7cba83e60a00b8653d8c7c62c8f542b74f88d56c Mon Sep 17 00:00:00 2001 From: Mikkel Friis Date: Thu, 17 Sep 2020 08:24:58 +0200 Subject: [PATCH] force walks on furni on one way gate #784 this fixes #784 --- .../items/interactions/InteractionOneWayGate.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionOneWayGate.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionOneWayGate.java index 844b042e..01257bea 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionOneWayGate.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionOneWayGate.java @@ -7,9 +7,14 @@ import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.RoomTile; import com.eu.habbo.habbohotel.rooms.RoomUnit; import com.eu.habbo.habbohotel.users.HabboItem; +import com.eu.habbo.habbohotel.wired.WiredHandler; +import com.eu.habbo.habbohotel.wired.WiredTriggerType; import com.eu.habbo.messages.ServerMessage; +import com.eu.habbo.messages.incoming.rooms.users.RoomUserWalkEvent; import com.eu.habbo.messages.outgoing.rooms.items.ItemIntStateComposer; import com.eu.habbo.threading.runnables.RoomUnitWalkToLocation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import java.sql.ResultSet; import java.sql.SQLException; @@ -17,6 +22,8 @@ import java.util.ArrayList; import java.util.List; public class InteractionOneWayGate extends HabboItem { + private static final Logger LOGGER = LoggerFactory.getLogger(InteractionOneWayGate.class); + private boolean walkable = false; public InteractionOneWayGate(ResultSet set, Item baseItem) throws SQLException { @@ -86,6 +93,8 @@ public class InteractionOneWayGate extends HabboItem { RoomTile tile = room.getLayout().getTileInFront(room.getLayout().getTile(this.getX(), this.getY()), this.getRotation() + 4); unit.setGoalLocation(tile); Emulator.getThreading().run(new RoomUnitWalkToLocation(unit, tile, room, onFail, onFail)); + + Emulator.getThreading().run(() -> WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, unit, room, new Object[]{this}), 500); }); onFail.add(() -> {