From 854333a145fae3b171d624a800793d5c2ad0a524 Mon Sep 17 00:00:00 2001 From: Beny Date: Mon, 2 Nov 2020 02:32:27 +0100 Subject: [PATCH] Walk on/off now triggers on a wired furni (why was this even disabled?) Closes #886 --- .../items/interactions/InteractionWired.java | 21 +------------------ .../InteractionWiredCondition.java | 15 ------------- .../interactions/InteractionWiredEffect.java | 15 ------------- .../interactions/InteractionWiredTrigger.java | 15 ------------- .../eu/habbo/habbohotel/users/HabboItem.java | 4 ++-- 5 files changed, 3 insertions(+), 67 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java index a465367c..c19b1ec9 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWired.java @@ -15,7 +15,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -public abstract class InteractionWired extends HabboItem { +public abstract class InteractionWired extends InteractionDefault { private static final Logger LOGGER = LoggerFactory.getLogger(InteractionWired.class); private long cooldown; @@ -37,25 +37,6 @@ public abstract class InteractionWired extends HabboItem { public abstract void loadWiredData(ResultSet set, Room room) throws SQLException; - @Override - public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - super.onWalkOn(roomUnit, room, objects); - } - - @Override - public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - super.onWalkOff(roomUnit, room, objects); - } - - - @Override - public void serializeExtradata(ServerMessage serverMessage) { - serverMessage.appendInt((this.isLimited() ? 256 : 0)); - serverMessage.appendString(this.getExtradata()); - - super.serializeExtradata(serverMessage); - } - @Override public void run() { if (this.needsUpdate()) { diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredCondition.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredCondition.java index d8c7ed41..7bf21fe1 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredCondition.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredCondition.java @@ -41,21 +41,6 @@ public abstract class InteractionWiredCondition extends InteractionWired { } } - @Override - public void onWalk(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - - @Override - public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - - @Override - public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - public abstract WiredConditionType getType(); public abstract boolean saveData(ClientMessage packet); diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java index 373f1584..59da2b6f 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredEffect.java @@ -43,21 +43,6 @@ public abstract class InteractionWiredEffect extends InteractionWired { } } - @Override - public void onWalk(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - - @Override - public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - - @Override - public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - public abstract boolean saveData(ClientMessage packet, GameClient gameClient) throws WiredSaveException; public int getDelay() { diff --git a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredTrigger.java b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredTrigger.java index 30ed0565..c0bbaabb 100644 --- a/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredTrigger.java +++ b/src/main/java/com/eu/habbo/habbohotel/items/interactions/InteractionWiredTrigger.java @@ -42,21 +42,6 @@ public abstract class InteractionWiredTrigger extends InteractionWired { } } - @Override - public void onWalk(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - - @Override - public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - - @Override - public void onWalkOff(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - - } - public abstract WiredTriggerType getType(); public abstract boolean saveData(ClientMessage packet); diff --git a/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java b/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java index 54ddb0d6..31f98ca8 100644 --- a/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java +++ b/src/main/java/com/eu/habbo/habbohotel/users/HabboItem.java @@ -303,8 +303,8 @@ public abstract class HabboItem implements Runnable, IEventTriggers { @Override public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { - if (objects != null && objects.length >= 1 && objects[0] instanceof InteractionWired) - return; + /*if (objects != null && objects.length >= 1 && objects[0] instanceof InteractionWired) + return;*/ WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, roomUnit, room, new Object[]{this});