From c92b9ecea36e4d3253a6143cdf05f868b22f7a03 Mon Sep 17 00:00:00 2001 From: Swirny <140-Swirny@users.noreply.git.krews.org> Date: Sat, 16 May 2020 10:21:22 -0400 Subject: [PATCH 1/5] Added SQL file for 2.4.0 RC-2 --- sqlupdates/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 sqlupdates/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql diff --git a/sqlupdates/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql b/sqlupdates/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql new file mode 100644 index 00000000..e69de29b From 5ec38a5efe5ed2a5fa8f185de9d43b2ac240d103 Mon Sep 17 00:00:00 2001 From: Swirny <140-Swirny@users.noreply.git.krews.org> Date: Sat, 16 May 2020 10:21:45 -0400 Subject: [PATCH 2/5] Update 2.4.0 RC-1 to 2.4.0 RC-2.sql --- sqlupdates/{sqlupdates => }/2.4.0 RC-1 to 2.4.0 RC-2.sql | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sqlupdates/{sqlupdates => }/2.4.0 RC-1 to 2.4.0 RC-2.sql (100%) diff --git a/sqlupdates/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql b/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql similarity index 100% rename from sqlupdates/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql rename to sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql From c6df972265090a70947e0d7b00725c946754971f Mon Sep 17 00:00:00 2001 From: Swirny <140-Swirny@users.noreply.git.krews.org> Date: Sat, 16 May 2020 10:22:21 -0400 Subject: [PATCH 3/5] Update 2.4.0 RC-1 to 2.4.0 RC-2.sql --- ...{2.4.0 RC-1 to 2.4.0 RC-2.sql => 2_4_0 RC-1 to 2_4_0 RC-2.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename sqlupdates/{2.4.0 RC-1 to 2.4.0 RC-2.sql => 2_4_0 RC-1 to 2_4_0 RC-2.sql} (100%) diff --git a/sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql b/sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql similarity index 100% rename from sqlupdates/2.4.0 RC-1 to 2.4.0 RC-2.sql rename to sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql From 57d489b83b45cc1a39e3baffcb6ead6f12834c50 Mon Sep 17 00:00:00 2001 From: Swirny <140-Swirny@users.noreply.git.krews.org> Date: Sat, 16 May 2020 10:28:58 -0400 Subject: [PATCH 4/5] Update 2_4_0 RC-1 to 2_4_0 RC-2.sql --- sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql b/sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql index e69de29b..95f8436b 100644 --- a/sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql +++ b/sqlupdates/2_4_0 RC-1 to 2_4_0 RC-2.sql @@ -0,0 +1 @@ +/* SQLS HERE */ \ No newline at end of file From f9a76c8fc6b397cd5de297683d07df43877badc0 Mon Sep 17 00:00:00 2001 From: Swirny Date: Sun, 24 May 2020 11:27:56 +0200 Subject: [PATCH 5/5] Adjusted marketplace search --- .../eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java b/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java index f18ad446..4fd9f853 100644 --- a/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java +++ b/src/main/java/com/eu/habbo/habbohotel/catalog/marketplace/MarketPlace.java @@ -114,7 +114,7 @@ public class MarketPlace { public static List getOffers(int minPrice, int maxPrice, String search, int sort) { List offers = new ArrayList<>(10); - String query = "SELECT B.* FROM marketplace_items a INNER JOIN (SELECT b.item_id AS base_item_id, b.limited_data AS ltd_data, marketplace_items.*, AVG(price) as avg, MIN(marketplace_items.price) as minPrice, MAX(marketplace_items.price) as maxPrice, COUNT(*) as number, (SELECT COUNT(*) FROM marketplace_items c INNER JOIN items as items_b ON c.item_id = items_b.id WHERE state = 2 AND items_b.item_id = base_item_id AND DATE(from_unixtime(sold_timestamp)) = CURDATE()) as sold_count_today FROM marketplace_items INNER JOIN items b ON marketplace_items.item_id = b.id INNER JOIN items_base bi ON b.item_id = bi.id WHERE price = (SELECT MIN(e.price) FROM marketplace_items e, items d WHERE e.item_id = d.id AND d.item_id = b.item_id AND e.state = 1 AND e.timestamp > ? GROUP BY d.item_id) AND state = 1 AND timestamp > ?"; + String query = "SELECT B.* FROM marketplace_items a INNER JOIN (SELECT b.item_id AS base_item_id, b.limited_data AS ltd_data, marketplace_items.*, AVG(price) as avg, MIN(marketplace_items.price) as minPrice, MAX(marketplace_items.price) as maxPrice, COUNT(*) as number, (SELECT COUNT(*) FROM marketplace_items c INNER JOIN items as items_b ON c.item_id = items_b.id WHERE state = 2 AND items_b.item_id = base_item_id AND DATE(from_unixtime(sold_timestamp)) = CURDATE()) as sold_count_today FROM marketplace_items INNER JOIN items b ON marketplace_items.item_id = b.id INNER JOIN items_base bi ON b.item_id = bi.id INNER JOIN catalog_items ci ON items_base.id = ci.item_ids WHERE price = (SELECT MIN(e.price) FROM marketplace_items e, items d WHERE e.item_id = d.id AND d.item_id = b.item_id AND e.state = 1 AND e.timestamp > ? GROUP BY d.item_id) AND state = 1 AND timestamp > ?"; if (minPrice > 0) { query += " AND CEIL(price + (price / 100)) >= " + minPrice; } @@ -122,7 +122,7 @@ public class MarketPlace { query += " AND CEIL(price + (price / 100)) <= " + maxPrice; } if (search.length() > 0) { - query += " AND bi.public_name LIKE ?"; + query += " AND bi.public_name LIKE ? OR ci.catalog_name LIKE ?"; } query += " GROUP BY base_item_id, ltd_data"; @@ -160,6 +160,7 @@ public class MarketPlace { statement.setInt(2, Emulator.getIntUnixTimestamp() - 172800); if (search.length() > 0) statement.setString(3, "%" + search + "%"); + statement.setString(4, "%" + search + "%"); try (ResultSet set = statement.executeQuery()) { while (set.next()) {