From cdbae76e84cafe879037b45fd6ff54a4b321c694 Mon Sep 17 00:00:00 2001 From: Mikkel Friis Date: Tue, 15 Sep 2020 17:22:35 +0200 Subject: [PATCH] Recycler value fix (critical) --- sqlupdates/2_4_0-RC-2 to 2_4_0-RC-3.sql | 2 ++ .../habbo/messages/incoming/catalog/recycler/RecycleEvent.java | 1 + 2 files changed, 3 insertions(+) create mode 100644 sqlupdates/2_4_0-RC-2 to 2_4_0-RC-3.sql diff --git a/sqlupdates/2_4_0-RC-2 to 2_4_0-RC-3.sql b/sqlupdates/2_4_0-RC-2 to 2_4_0-RC-3.sql new file mode 100644 index 00000000..78ce8842 --- /dev/null +++ b/sqlupdates/2_4_0-RC-2 to 2_4_0-RC-3.sql @@ -0,0 +1,2 @@ +-- Recycler value fix +INSERT INTO `emulator_settings` (`key`, `value`) VALUES ('recycler.value', '8'); \ No newline at end of file diff --git a/src/main/java/com/eu/habbo/messages/incoming/catalog/recycler/RecycleEvent.java b/src/main/java/com/eu/habbo/messages/incoming/catalog/recycler/RecycleEvent.java index a3c69775..05b6fc32 100644 --- a/src/main/java/com/eu/habbo/messages/incoming/catalog/recycler/RecycleEvent.java +++ b/src/main/java/com/eu/habbo/messages/incoming/catalog/recycler/RecycleEvent.java @@ -27,6 +27,7 @@ public class RecycleEvent extends MessageHandler { THashSet items = new THashSet<>(); int count = this.packet.readInt(); + if (count < Emulator.getConfig().getInt("recycler.value", 8)) return; for (int i = 0; i < count; i++) { HabboItem item = this.client.getHabbo().getInventory().getItemsComponent().getHabboItem(this.packet.readInt());