From 1b5517f677dcfcc83e7e9cafdedc08edcf858a4e Mon Sep 17 00:00:00 2001 From: Alejandro <25-alejandro@users.noreply.git.krews.org> Date: Fri, 24 Jan 2020 20:34:27 +0200 Subject: [PATCH] Clear dance when avatar idles (fixes #309) --- src/main/java/com/eu/habbo/habbohotel/rooms/Room.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java index ffe6e746..276e6d88 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -4160,6 +4160,11 @@ public class Room implements Comparable, ISerialize, Runnable { public void idle(Habbo habbo) { habbo.getRoomUnit().setIdle(); + + if (habbo.getRoomUnit().getDanceType() != DanceType.NONE) { + this.dance(habbo, DanceType.NONE); + } + this.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); WiredHandler.handle(WiredTriggerType.IDLES, habbo.getRoomUnit(), this, new Object[]{habbo}); }