From 5981046523bd44ff09dee6e293e40db45a540985 Mon Sep 17 00:00:00 2001 From: Snaiker Date: Sun, 10 Jan 2021 02:49:15 +0000 Subject: [PATCH] Fix issue 936 --- sqlupdates/2_4_0 to 3_0_BETA_1.sql | 2 ++ src/main/java/com/eu/habbo/habbohotel/rooms/Room.java | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sqlupdates/2_4_0 to 3_0_BETA_1.sql b/sqlupdates/2_4_0 to 3_0_BETA_1.sql index b8fc2d61..21f3064c 100644 --- a/sqlupdates/2_4_0 to 3_0_BETA_1.sql +++ b/sqlupdates/2_4_0 to 3_0_BETA_1.sql @@ -101,6 +101,8 @@ INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('commands.error.cmd_subscr INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('subscriptions.hc.payday.message', 'Woohoo HC Payday has arrived! You have received %amount% credits to your purse. Enjoy!'); +INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('hotel.roomuser.idle.not_dancing.ignore.wired_idle', '0'); + -- OPTIONAL HC MIGRATION -- INSERT INTO users_subscriptions SELECT NULL, user_id, 'HABBO_CLUB' as `subscription_type`, UNIX_TIMESTAMP() AS `timestamp_start`, (club_expire_timestamp - UNIX_TIMESTAMP()) AS `duration`, 1 AS `active` FROM users_settings WHERE club_expire_timestamp > UNIX_TIMESTAMP(); 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 d0704c82..512783f6 100644 --- a/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java +++ b/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java @@ -1205,8 +1205,11 @@ public class Room implements Comparable, ISerialize, Runnable { habbo.getRoomUnit().increaseIdleTimer(); if (habbo.getRoomUnit().isIdle()) { - this.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); - WiredHandler.handle(WiredTriggerType.IDLES, habbo.getRoomUnit(), this, new Object[]{habbo}); + boolean danceIsNone = (habbo.getRoomUnit().getDanceType() == DanceType.NONE); + if (danceIsNone) + this.sendComposer(new RoomUnitIdleComposer(habbo.getRoomUnit()).compose()); + if (danceIsNone && !Emulator.getConfig().getBoolean("hotel.roomuser.idle.not_dancing.ignore.wired_idle")) + WiredHandler.handle(WiredTriggerType.IDLES, habbo.getRoomUnit(), this, new Object[]{habbo}); } } else { habbo.getRoomUnit().increaseIdleTimer();