From 3695f4e7019a021959ec821ac37adcf011fc3644 Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Wed, 29 Apr 2020 20:40:56 +0100 Subject: [PATCH] Add homeroom config to make it work like how retros are used to. --- sqlupdates/2_3_1_TO_2_4_0-RC-1.sql | 4 +++- .../habbo/messages/incoming/users/RequestUserDataEvent.java | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/sqlupdates/2_3_1_TO_2_4_0-RC-1.sql b/sqlupdates/2_3_1_TO_2_4_0-RC-1.sql index 8727e26a..561df6ff 100644 --- a/sqlupdates/2_3_1_TO_2_4_0-RC-1.sql +++ b/sqlupdates/2_3_1_TO_2_4_0-RC-1.sql @@ -1,3 +1,5 @@ INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('hotel.room.stickies.max', '200'); -ALTER TABLE `users_settings` ADD COLUMN `last_purchase_timestamp` int(11) NOT NULL DEFAULT UNIX_TIMESTAMP(); \ No newline at end of file +ALTER TABLE `users_settings` ADD COLUMN `last_purchase_timestamp` int(11) NOT NULL DEFAULT UNIX_TIMESTAMP(); + +INSERT INTO `emulator_settings`(`key`, `value`) VALUES ('retro.style.homeroom', '1'); diff --git a/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java b/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java index 174f5ef1..01f1f1af 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/users/RequestUserDataEvent.java @@ -39,9 +39,9 @@ public class RequestUserDataEvent extends MessageHandler { messages.add(new UserDataComposer(this.client.getHabbo()).compose()); messages.add(new UserPerksComposer(this.client.getHabbo()).compose()); - if (!this.client.getHabbo().getHabboStats().nux && this.client.getHabbo().getHabboInfo().getHomeRoom() != 0) + if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && this.client.getHabbo().getHabboInfo().getHomeRoom() != 0) messages.add(new ForwardToRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom()).compose()); - else if (!this.client.getHabbo().getHabboStats().nux && RoomManager.HOME_ROOM_ID > 0) + else if (!this.client.getHabbo().getHabboStats().nux || Emulator.getConfig().getBoolean("retro.style.homeroom") && RoomManager.HOME_ROOM_ID > 0) messages.add(new ForwardToRoomComposer(RoomManager.HOME_ROOM_ID).compose()); messages.add(new MeMenuSettingsComposer(this.client.getHabbo()).compose());