From d409998e71671432aecea461eab431dd1640710b Mon Sep 17 00:00:00 2001 From: KrewsOrg Date: Mon, 29 Apr 2019 01:50:51 +0100 Subject: [PATCH] Marketplace Fix. Fixed up Params in Room Points Command. --- .../habbo/habbohotel/catalog/marketplace/MarketPlace.java | 2 +- .../com/eu/habbo/habbohotel/commands/RoomPointsCommand.java | 6 +++--- 2 files changed, 4 insertions(+), 4 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 711386ff..a53828a4 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 @@ -133,7 +133,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 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, d.limited_data) 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 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; diff --git a/src/main/java/com/eu/habbo/habbohotel/commands/RoomPointsCommand.java b/src/main/java/com/eu/habbo/habbohotel/commands/RoomPointsCommand.java index 6be523ea..bdab3f33 100644 --- a/src/main/java/com/eu/habbo/habbohotel/commands/RoomPointsCommand.java +++ b/src/main/java/com/eu/habbo/habbohotel/commands/RoomPointsCommand.java @@ -21,14 +21,14 @@ public class RoomPointsCommand extends Command { try { - type = Integer.valueOf(params[1]); + amountString = params[1]; + + type = Integer.valueOf(params[2]); } catch (Exception e) { gameClient.getHabbo().whisper(Emulator.getTexts().getValue("commands.error.cmd_masspoints.invalid_type").replace("%types%", Emulator.getConfig().getValue("seasonal.types").replace(";", ", ")), RoomChatMessageBubbles.ALERT); return true; } - - amountString = params[2]; } else if(params.length == 2) {