From 5d6e239c70afa77685cc9a9b3cd783d969d2f13a Mon Sep 17 00:00:00 2001 From: Remco Date: Mon, 15 Feb 2021 23:20:22 +0100 Subject: [PATCH] Renamed packet --- sqlupdates/3_0_BETA_1 to 3_0_0-RC-1.sql | 3 +++ .../incoming/handshake/SecureLoginEvent.java | 4 ++-- .../eu/habbo/messages/outgoing/Outgoing.java | 2 +- .../handshake/DebugConsoleComposer.java | 20 ------------------- .../EnableNotificationsComposer.java | 20 +++++++++++++++++++ 5 files changed, 26 insertions(+), 23 deletions(-) delete mode 100644 src/main/java/com/eu/habbo/messages/outgoing/handshake/DebugConsoleComposer.java create mode 100644 src/main/java/com/eu/habbo/messages/outgoing/handshake/EnableNotificationsComposer.java diff --git a/sqlupdates/3_0_BETA_1 to 3_0_0-RC-1.sql b/sqlupdates/3_0_BETA_1 to 3_0_0-RC-1.sql index dfb1f885..31e6474c 100644 --- a/sqlupdates/3_0_BETA_1 to 3_0_0-RC-1.sql +++ b/sqlupdates/3_0_BETA_1 to 3_0_0-RC-1.sql @@ -4,3 +4,6 @@ INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.roomname', INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.user_count', '%user_count%'); INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.owner', '%owner%'); INSERT INTO `emulator_texts` (`key`, `value`) VALUES ('wired.variable.item_count', '%item_count%'); + +-- Enable bubble alerts +INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('bubblealerts.enabled', '1'); diff --git a/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java b/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java index 3e13a26a..d59b455d 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/handshake/SecureLoginEvent.java @@ -19,7 +19,7 @@ import com.eu.habbo.messages.outgoing.gamecenter.GameCenterGameListComposer; import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer; import com.eu.habbo.messages.outgoing.generic.alerts.MessagesForYouComposer; import com.eu.habbo.messages.outgoing.habboway.nux.NewUserIdentityComposer; -import com.eu.habbo.messages.outgoing.handshake.DebugConsoleComposer; +import com.eu.habbo.messages.outgoing.handshake.EnableNotificationsComposer; import com.eu.habbo.messages.outgoing.handshake.SecureLoginOKComposer; import com.eu.habbo.messages.outgoing.handshake.AvailabilityStatusMessageComposer; import com.eu.habbo.messages.outgoing.handshake.PingComposer; @@ -122,7 +122,7 @@ public class SecureLoginEvent extends MessageHandler { messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose()); messages.add(new AvailabilityStatusMessageComposer(true, false, true).compose()); messages.add(new PingComposer().compose()); - messages.add(new DebugConsoleComposer(Emulator.debugging).compose()); + messages.add(new EnableNotificationsComposer(Emulator.getConfig().getBoolean("bubblealerts.enabled", true)).compose()); messages.add(new UserAchievementScoreComposer(this.client.getHabbo()).compose()); messages.add(new IsFirstLoginOfDayComposer(true).compose()); messages.add(new UnknownComposer5().compose()); diff --git a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java index fb84490b..e38663e7 100644 --- a/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java +++ b/src/main/java/com/eu/habbo/messages/outgoing/Outgoing.java @@ -116,7 +116,7 @@ public class Outgoing { public final static int CatalogModeComposer = 3828; // PRODUCTION-201611291003-338511768 public final static int ChangeNameUpdateComposer = 118; // PRODUCTION-201611291003-338511768 public final static int AddFloorItemComposer = 1534; // PRODUCTION-201611291003-338511768 - public final static int DebugConsoleComposer = 3284; // PRODUCTION-201611291003-338511768 + public final static int EnableNotificationsComposer = 3284; // PRODUCTION-201611291003-338511768 public final static int HallOfFameComposer = 3005; // PRODUCTION-201611291003-338511768 public final static int WiredSavedComposer = 1155; // PRODUCTION-201611291003-338511768 public final static int RoomPaintComposer = 2454; // PRODUCTION-201611291003-338511768 diff --git a/src/main/java/com/eu/habbo/messages/outgoing/handshake/DebugConsoleComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/handshake/DebugConsoleComposer.java deleted file mode 100644 index 4ea035af..00000000 --- a/src/main/java/com/eu/habbo/messages/outgoing/handshake/DebugConsoleComposer.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.eu.habbo.messages.outgoing.handshake; - -import com.eu.habbo.messages.ServerMessage; -import com.eu.habbo.messages.outgoing.MessageComposer; -import com.eu.habbo.messages.outgoing.Outgoing; - -public class DebugConsoleComposer extends MessageComposer { - private final boolean debugging; - - public DebugConsoleComposer(boolean debugging) { - this.debugging = debugging; - } - - @Override - protected ServerMessage composeInternal() { - this.response.init(Outgoing.DebugConsoleComposer); - this.response.appendBoolean(this.debugging); - return this.response; - } -} diff --git a/src/main/java/com/eu/habbo/messages/outgoing/handshake/EnableNotificationsComposer.java b/src/main/java/com/eu/habbo/messages/outgoing/handshake/EnableNotificationsComposer.java new file mode 100644 index 00000000..575cd174 --- /dev/null +++ b/src/main/java/com/eu/habbo/messages/outgoing/handshake/EnableNotificationsComposer.java @@ -0,0 +1,20 @@ +package com.eu.habbo.messages.outgoing.handshake; + +import com.eu.habbo.messages.ServerMessage; +import com.eu.habbo.messages.outgoing.MessageComposer; +import com.eu.habbo.messages.outgoing.Outgoing; + +public class EnableNotificationsComposer extends MessageComposer { + private final boolean enabled; + + public EnableNotificationsComposer(boolean enabled) { + this.enabled = enabled; + } + + @Override + protected ServerMessage composeInternal() { + this.response.init(Outgoing.EnableNotificationsComposer); + this.response.appendBoolean(this.enabled); + return this.response; + } +}