Match puzzlebox behaviour to Habbo

This commit is contained in:
Alejandro 2020-01-28 13:55:07 +02:00
parent 8c4a44e3e7
commit da2e78697b

View File

@ -24,9 +24,6 @@ public class InteractionPuzzleBox extends HabboItem {
@Override @Override
public void onClick(GameClient client, Room room, Object[] objects) throws Exception { public void onClick(GameClient client, Room room, Object[] objects) throws Exception {
if (client.getHabbo().getRoomUnit().hasStatus(RoomUnitStatus.MOVE))
return;
RoomTile boxLocation = room.getLayout().getTile(this.getX(), this.getY()); RoomTile boxLocation = room.getLayout().getTile(this.getX(), this.getY());
RoomUserRotation rotation = null; RoomUserRotation rotation = null;
@ -80,7 +77,11 @@ public class InteractionPuzzleBox extends HabboItem {
room.updateItem(this); room.updateItem(this);
room.scheduledComposers.add(new FloorItemOnRollerComposer(this, null, tile, 0, room).compose()); room.scheduledComposers.add(new FloorItemOnRollerComposer(this, null, tile, 0, room).compose());
room.scheduledTasks.add(() -> {
client.getHabbo().getRoomUnit().setGoalLocation(boxLocation);
room.scheduledTasks.add(() -> client.getHabbo().getRoomUnit().setGoalLocation(boxLocation)); room.scheduledTasks.add(() -> client.getHabbo().getRoomUnit().setGoalLocation(boxLocation));
});
this.needsUpdate(true); this.needsUpdate(true);
} }