From 01b1f2029a0338b31a525d85d660a9416ea0a99d Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Tue, 28 May 2019 20:56:45 +0300 Subject: [PATCH] Trigger onWalkOn for teleport tiles after teleport --- .../runnables/teleport/TeleportActionFive.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java b/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java index a073b23a..f8abd365 100644 --- a/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java +++ b/src/main/java/com/eu/habbo/threading/runnables/teleport/TeleportActionFive.java @@ -2,9 +2,11 @@ package com.eu.habbo.threading.runnables.teleport; import com.eu.habbo.Emulator; import com.eu.habbo.habbohotel.gameclients.GameClient; +import com.eu.habbo.habbohotel.items.interactions.InteractionTeleportTile; 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.Habbo; import com.eu.habbo.habbohotel.users.HabboItem; import com.eu.habbo.threading.runnables.HabboItemNewState; import com.eu.habbo.threading.runnables.RoomUnitWalkToLocation; @@ -54,5 +56,15 @@ class TeleportActionFive implements Runnable { this.room.updateItem(this.currentTeleport); Emulator.getThreading().run(new HabboItemNewState(this.currentTeleport, this.room, "0"), 1000); + + HabboItem teleportTile = this.room.getTopItemAt(unit.getX(), unit.getY()); + + if (teleportTile != null && teleportTile instanceof InteractionTeleportTile && teleportTile != this.currentTeleport) { + try { + teleportTile.onWalkOn(unit, this.room, new Object[]{}); + } catch (Exception e) { + e.printStackTrace(); + } + } } }