Make vending machines walkable if desired

This commit is contained in:
Alejandro 2020-06-07 16:03:38 +03:00
parent ab04c491fd
commit 9e5a00b052

View File

@ -18,7 +18,7 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.concurrent.ExecutionException;
public class InteractionVendingMachine extends HabboItem {
public class InteractionVendingMachine extends InteractionDefault {
public InteractionVendingMachine(ResultSet set, Item baseItem) throws SQLException {
super(set, baseItem);
this.setExtradata("0");
@ -29,16 +29,6 @@ public class InteractionVendingMachine extends HabboItem {
this.setExtradata("0");
}
@Override
public boolean canWalkOn(RoomUnit roomUnit, Room room, Object[] objects) {
return true;
}
@Override
public boolean isWalkable() {
return false;
}
@Override
public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
super.onClick(client, room, objects);
@ -122,21 +112,6 @@ public class InteractionVendingMachine extends HabboItem {
}
}
@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 {
}
@Override
public void run() {
super.run();
@ -149,15 +124,6 @@ public class InteractionVendingMachine extends HabboItem {
}
}
@Override
public void serializeExtradata(ServerMessage serverMessage) {
serverMessage.appendInt((this.isLimited() ? 256 : 0));
serverMessage.appendString(this.getExtradata());
super.serializeExtradata(serverMessage);
}
@Override
public boolean isUsable() {
return true;