Walk on/off now triggers on a wired furni (why was this even disabled?) Closes #886

This commit is contained in:
Beny 2020-11-02 02:32:27 +01:00
parent acef46e004
commit 854333a145
5 changed files with 3 additions and 67 deletions

View File

@ -15,7 +15,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; 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 static final Logger LOGGER = LoggerFactory.getLogger(InteractionWired.class);
private long cooldown; private long cooldown;
@ -37,25 +37,6 @@ public abstract class InteractionWired extends HabboItem {
public abstract void loadWiredData(ResultSet set, Room room) throws SQLException; 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 @Override
public void run() { public void run() {
if (this.needsUpdate()) { if (this.needsUpdate()) {

View File

@ -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 WiredConditionType getType();
public abstract boolean saveData(ClientMessage packet); public abstract boolean saveData(ClientMessage packet);

View File

@ -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 abstract boolean saveData(ClientMessage packet, GameClient gameClient) throws WiredSaveException;
public int getDelay() { public int getDelay() {

View File

@ -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 WiredTriggerType getType();
public abstract boolean saveData(ClientMessage packet); public abstract boolean saveData(ClientMessage packet);

View File

@ -303,8 +303,8 @@ public abstract class HabboItem implements Runnable, IEventTriggers {
@Override @Override
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception { public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception {
if (objects != null && objects.length >= 1 && objects[0] instanceof InteractionWired) /*if (objects != null && objects.length >= 1 && objects[0] instanceof InteractionWired)
return; return;*/
WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, roomUnit, room, new Object[]{this}); WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, roomUnit, room, new Object[]{this});