Fix vending machine behaviour

This commit is contained in:
Alejandro 2020-01-28 16:09:59 +02:00
parent d3b8ee6b76
commit ccf47ea139

View File

@ -50,8 +50,8 @@ public class InteractionVendingMachine extends HabboItem {
if (tile != null) {
if (tile.equals(client.getHabbo().getRoomUnit().getCurrentLocation())) {
if (this.getExtradata().equals("0") || this.getExtradata().length() == 0) {
room.updateHabbo(client.getHabbo());
if (!client.getHabbo().getRoomUnit().hasStatus(RoomUnitStatus.SIT)) {
if (!client.getHabbo().getRoomUnit().hasStatus(RoomUnitStatus.SIT) && (!client.getHabbo().getRoomUnit().hasStatus(RoomUnitStatus.MOVE) || tile.equals(client.getHabbo().getRoomUnit().getGoal()))) {
room.updateHabbo(client.getHabbo());
client.getHabbo().getRoomUnit().setRotation(RoomUserRotation.values()[Rotation.Calculate(client.getHabbo().getRoomUnit().getX(), client.getHabbo().getRoomUnit().getY(), this.getX(), this.getY())]);
client.getHabbo().getRoomUnit().removeStatus(RoomUnitStatus.MOVE);
room.scheduledComposers.add(new RoomUserStatusComposer(client.getHabbo().getRoomUnit()).compose());