Updated to 1.10 decompiled.

This commit is contained in:
capheus 2018-07-08 21:32:00 +00:00
parent b4fc005c18
commit 4619f7fec0
235 changed files with 1022 additions and 6064 deletions

View File

@ -1,45 +1,16 @@
# **Arcturus Emulator is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt). Modifications are allowed but must disclosed. Changes in the about menu are forbidden as they are part of the license.** # # **Arcturus Emulator is released under the [GNU General Public License v3](https://www.gnu.org/licenses/gpl-3.0.txt). Modifications are allowed but must disclosed. Changes in the about menu are forbidden as they are part of the license.** #
# Arcturus Emulator # # Arcturus Morningstar #
## **To Get The Camera To Work Visit http://arcturus.wf and register.** ## ## **To Get The Camera To Work Visit http://arcturus.wf and register.** ##
## **TUTORIAL FOR PLUGINS http://arcturus.wf/thread-2415.html** ## ## **TUTORIAL FOR PLUGINS http://arcturus.wf/thread-2415.html** ##
# **DO NOT EDIT THE SOURCE. USE THE PLUGIN API.** # # **DO NOT EDIT THE SOURCE. USE THE PLUGIN API.** #
## Current Stable Version: 1.9.0 ## ## Current Stable Version: 1.10.0 ##
Arcturus Emulator is a Habbo emulator written in Java aiming to be an exact clone of the offical server. Arcturus Morningstar is a Habbo emulator written in Java aiming to be an exact clone of the offical server, based on Arcturus Emulator by TheGeneral.
Targeting PRODUCTION-201611291003-338511768 Targeting PRODUCTION-201611291003-338511768
Download SWF: http://arcturus.wf/mirrors/asmd_PRODUCTION-201611291003-338511768.swf
# **Compiled version (Including Database): http://arcturus.wf/mirrors/ArcturusEmulator_1.9.0.zip** #
Latest Compiled Version: http://arcturus.wf:8080
Older Files: http://arcturus.wf/mirrors/
Icons: http://arcturus.wf/mirrors/icons.zip
JavaDoc: http://arcturus.wf/doc/
SCRIPTS for developers: http://arcturus.wf/mirrors/PRODUCTION-201611291003-338511768_scripts.txt
### Contributing ### ### Contributing ###
Anyone is allowed to contribute to the project. Reporting bugs and issues goes via the issue tracker. Anyone is allowed to contribute to the project. Reporting bugs and issues goes via the issue tracker.
You can request features in the issue tracker.
### Plugins ###
An example plugin can be found here: https://bitbucket.org/Wesley12312/pluginexample
Here is a list of cool plugins you can download:
* Kickwars: https://bitbucket.org/Wesley12312/kickwars-plugin
* Bubble Alerts: https://bitbucket.org/Wesley12312/arcturus-bubble-alerts-plugin
* Essentials: https://bitbucket.org/Wesley12312/arcturus-essentials-plugin
If you want the link to your plugin repository to be added, create an issue.
### Contact ###
* http://arcturus.wf/ | Main forums.

View File

@ -29,49 +29,31 @@ import java.util.regex.Pattern;
public final class Emulator public final class Emulator
{ {
/**
* Major version of the emulator.
*/
public final static int MAJOR = 1; public final static int MAJOR = 1;
/**
* Minor version of the emulator.
*/
public final static int MINOR = 10; public final static int MINOR = 10;
/**
* Stable build version of the emulator.
*/
public final static int BUILD = 0; public final static int BUILD = 0;
/**
* Version as string.
*/
public static final String version = "Version: " + MAJOR + "." + MINOR + "." + BUILD; public static final String version = "Version: " + MAJOR + "." + MINOR + "." + BUILD;
/**
* Public chat, used for staffchat for now.
*/
public static MessengerBuddy publicChatBuddy; public static MessengerBuddy publicChatBuddy;
/**
* The emulator is fully loaded and ready to handle players.
*/
public static boolean isReady = false; public static boolean isReady = false;
/**
* The emulator is shutting down.
*/
public static boolean isShuttingDown = false; public static boolean isShuttingDown = false;
/**
* The emulator has fully shutdown.
*/
public static boolean stopped = false; public static boolean stopped = false;
/**
* The emulator is in debugging mode.
*/
public static boolean debugging = false; public static boolean debugging = false;
private static int timeStarted = 0; private static int timeStarted = 0;
@ -102,11 +84,7 @@ public final class Emulator
Runtime.getRuntime().addShutdownHook(hook); Runtime.getRuntime().addShutdownHook(hook);
} }
/**
* Entry point for Arcturus Emulator.
* @param args Unused
* @throws Exception Failed to start the emulator.
*/
public static void main(String[] args) throws Exception public static void main(String[] args) throws Exception
{ {
try try
@ -204,9 +182,7 @@ public final class Emulator
} }
} }
/**
* Shutsdown the emulator.
*/
private static void dispose() private static void dispose()
{ {
Emulator.isShuttingDown = true; Emulator.isShuttingDown = true;
@ -290,82 +266,61 @@ public final class Emulator
catch (Exception e) {} catch (Exception e) {}
} }
/**
* @return The ConfigurationManager
*/
public static ConfigurationManager getConfig() public static ConfigurationManager getConfig()
{ {
return config; return config;
} }
/**
* @return The TextsManager
*/
public static TextsManager getTexts() public static TextsManager getTexts()
{ {
return texts; return texts;
} }
/**
* @return The Database
*/
public static Database getDatabase() public static Database getDatabase()
{ {
return database; return database;
} }
/**
* @return Current Runtime
*/
public static Runtime getRuntime() public static Runtime getRuntime()
{ {
return runtime; return runtime;
} }
/**
* @return The GameServer
*/
public static GameServer getGameServer() public static GameServer getGameServer()
{ {
return gameServer; return gameServer;
} }
/**
* @return The RCONServer
*/
public static RCONServer getRconServer() public static RCONServer getRconServer()
{ {
return rconServer; return rconServer;
} }
/**
* @return Logging module
*/
public static Logging getLogging() public static Logging getLogging()
{ {
return logging; return logging;
} }
/**
* @return The ThreadPooling
*/
public static ThreadPooling getThreading() public static ThreadPooling getThreading()
{ {
return threading; return threading;
} }
/**
* @return The GameEnvironment
*/
public static GameEnvironment getGameEnvironment() public static GameEnvironment getGameEnvironment()
{ {
return gameEnvironment; return gameEnvironment;
} }
/**
*
* @return The PluginManager
*/
public static PluginManager getPluginManager() public static PluginManager getPluginManager()
{ {
return pluginManager; return pluginManager;
@ -401,11 +356,7 @@ public final class Emulator
System.exit(0); System.exit(0);
} }
/**
* Converts a date to an unix timestamp
* @param date The date to convert
* @return Return unix timestamp in seconds.
*/
private static String dateToUnixTimestamp(Date date) private static String dateToUnixTimestamp(Date date)
{ {
String res = ""; String res = "";
@ -417,11 +368,7 @@ public final class Emulator
return res + seconds; return res + seconds;
} }
/**
* Converts a String to a Date object
* @param date The String to parse
* @return The Date of the string.
*/
private static Date stringToDate(String date) private static Date stringToDate(String date)
{ {
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");

View File

@ -15,80 +15,50 @@ import java.sql.Statement;
public class CleanerThread implements Runnable { public class CleanerThread implements Runnable {
/**
* Delay between each execution of checking to clean up in MS.
*/
public static final int DELAY = 10000; public static final int DELAY = 10000;
/**
* Amount of seconds the Hall Of Fame has to be reloaded.
*/
public static final int RELOAD_HALL_OF_FAME = 1800; public static final int RELOAD_HALL_OF_FAME = 1800;
/**
* Amount of seconds the News List has to be reloaded.
*/
public static final int RELOAD_NEWS_LIST = 3600; public static final int RELOAD_NEWS_LIST = 3600;
/**
* Amount of seconds inactive rooms have to be cleared.
*/
public static final int REMOVE_INACTIVE_ROOMS = 120; public static final int REMOVE_INACTIVE_ROOMS = 120;
/**
* Amount of seconds inactive guilds have to be cleared.
*/
public static final int REMOVE_INACTIVE_GUILDS = 60; public static final int REMOVE_INACTIVE_GUILDS = 60;
/**
* Amount of seconds inactive tours have to be cleared.
*/
public static final int REMOVE_INACTIVE_TOURS = 600; public static final int REMOVE_INACTIVE_TOURS = 600;
/**
* Amount of seconds error logs have to be saved to the database.
*/
public static final int SAVE_ERROR_LOGS = 30; public static final int SAVE_ERROR_LOGS = 30;
/**
*
*/
private static final int CALLBACK_TIME = 60*15; private static final int CALLBACK_TIME = 60*15;
/**
* Last time the Hall Of Fame was reloaded.
*/
private static int LAST_HOF_RELOAD = Emulator.getIntUnixTimestamp(); private static int LAST_HOF_RELOAD = Emulator.getIntUnixTimestamp();
/**
* Last time the news list was reloaded.
*/
private static int LAST_NL_RELOAD = Emulator.getIntUnixTimestamp(); private static int LAST_NL_RELOAD = Emulator.getIntUnixTimestamp();
/**
* Last time inactive rooms have been cleared.
*/
private static int LAST_INACTIVE_ROOMS_CLEARED = Emulator.getIntUnixTimestamp(); private static int LAST_INACTIVE_ROOMS_CLEARED = Emulator.getIntUnixTimestamp();
/**
* Last time inactive guilds have been cleared.
*/
private static int LAST_INACTIVE_GUILDS_CLEARED = Emulator.getIntUnixTimestamp(); private static int LAST_INACTIVE_GUILDS_CLEARED = Emulator.getIntUnixTimestamp();
/**
* Last time inactive tours have been cleared.
*/
private static int LAST_INACTIVE_TOURS_CLEARED = Emulator.getIntUnixTimestamp(); private static int LAST_INACTIVE_TOURS_CLEARED = Emulator.getIntUnixTimestamp();
/**
* Last time error logs were saved to the database.
*/
private static int LAST_ERROR_LOGS_SAVED = Emulator.getIntUnixTimestamp(); private static int LAST_ERROR_LOGS_SAVED = Emulator.getIntUnixTimestamp();
/**
* Last time dailys where refilled.
*/
private static int LAST_DAILY_REFILL = Emulator.getIntUnixTimestamp(); private static int LAST_DAILY_REFILL = Emulator.getIntUnixTimestamp();
private static int LAST_CALLBACK = Emulator.getIntUnixTimestamp(); private static int LAST_CALLBACK = Emulator.getIntUnixTimestamp();
@ -163,9 +133,7 @@ public class CleanerThread implements Runnable {
SearchUserEvent.cachedResults.clear(); SearchUserEvent.cachedResults.clear();
} }
/**
* Cleans up the database before emulator launch to guarantee system integrity.
*/
void databaseCleanup() void databaseCleanup()
{ {
refillDailyRespects(); refillDailyRespects();

View File

@ -15,22 +15,13 @@ import java.util.Properties;
public class ConfigurationManager public class ConfigurationManager
{ {
/**
* Flag for when the ConfigurationManager has fully loaded.
*/
public boolean loaded = false; public boolean loaded = false;
/**
* Flag for when the ConfigurationManager is still loading.
* The configurationmanager is loaded in two parts,
* first the config.ini is read.
* After that the rest of the configuration is read from the database.
*/
public boolean isLoading = false; public boolean isLoading = false;
/**
* Our configurations stored in this object.
*/
private final Properties properties; private final Properties properties;
public ConfigurationManager(String path) throws Exception public ConfigurationManager(String path) throws Exception
@ -40,10 +31,7 @@ public class ConfigurationManager
this.reload(); this.reload();
} }
/**
* Reloads the settings from the config file.
* @throws Exception
*/
public void reload() throws Exception public void reload() throws Exception
{ {
this.isLoading = true; this.isLoading = true;
@ -82,9 +70,7 @@ public class ConfigurationManager
} }
} }
/**
* Loads the settings from the database.
*/
public void loadFromDatabase() public void loadFromDatabase()
{ {
Emulator.getLogging().logStart("Loading configuration from database..."); Emulator.getLogging().logStart("Loading configuration from database...");
@ -128,22 +114,13 @@ public class ConfigurationManager
} }
} }
/**
* Gets the string value for a specific key.
* @param key The key to find the value for.
* @return The string value for the key. Returns an empty string if not found.
*/
public String getValue(String key) public String getValue(String key)
{ {
return getValue(key, ""); return getValue(key, "");
} }
/**
* Gets the string value for a specific key.
* @param key The key to find the value for.
* @param defaultValue The value that will be returned when the key is not found.
* @return The string value for the key. Returns defaultValue when not found.
*/
public String getValue(String key, String defaultValue) public String getValue(String key, String defaultValue)
{ {
if (this.isLoading) if (this.isLoading)
@ -155,22 +132,13 @@ public class ConfigurationManager
return this.properties.getProperty(key, defaultValue); return this.properties.getProperty(key, defaultValue);
} }
/**
* Gets the boolean value for a specific key.
* @param key The key to find the value for.
* @return The boolean value for the key. Returns false if not found.
*/
public boolean getBoolean(String key) public boolean getBoolean(String key)
{ {
return getBoolean(key, false); return getBoolean(key, false);
} }
/**
* Gets the boolean value for a specific key.
* @param key The key to find the value for.
* @param defaultValue The value that will be returned when the key is not found.
* @return The boolean value for the key. Returns defaultValue when not found.
*/
public boolean getBoolean(String key, boolean defaultValue) public boolean getBoolean(String key, boolean defaultValue)
{ {
if (this.isLoading) if (this.isLoading)
@ -187,22 +155,13 @@ public class ConfigurationManager
return defaultValue; return defaultValue;
} }
/**
* Gets the int value for a specific key.
* @param key The key to find the value for.
* @return The int value for the key. Returns 0 if not found.
*/
public int getInt(String key) public int getInt(String key)
{ {
return getInt(key, 0); return getInt(key, 0);
} }
/**
* Gets the int value for a specific key.
* @param key The key to find the value for.
* @param defaultValue The value that will be returned when the key is not found.
* @return The int value for the key. Returns defaultValue when not found.
*/
public int getInt(String key, Integer defaultValue) public int getInt(String key, Integer defaultValue)
{ {
if (this.isLoading) if (this.isLoading)
@ -218,22 +177,13 @@ public class ConfigurationManager
return defaultValue; return defaultValue;
} }
/**
* Gets the double value for a specific key.
* @param key The key to find the value for.
* @return The double value for the key. Returns 0 if not found.
*/
public double getDouble(String key) public double getDouble(String key)
{ {
return getDouble(key, 0.0); return getDouble(key, 0.0);
} }
/**
* Gets the double value for a specific key.
* @param key The key to find the value for.
* @param defaultValue The value that will be returned when the key is not found.
* @return The double value for the key. Returns defaultValue when not found.
*/
public double getDouble(String key, Double defaultValue) public double getDouble(String key, Double defaultValue)
{ {
if (this.isLoading) if (this.isLoading)
@ -251,11 +201,7 @@ public class ConfigurationManager
return defaultValue; return defaultValue;
} }
/**
* Updates the give key.
* @param key The key to update.
* @param value The new value.
*/
public void update(String key, String value) public void update(String key, String value)
{ {
this.properties.setProperty(key, value); this.properties.setProperty(key, value);

View File

@ -7,19 +7,13 @@ import java.util.Map;
public class CreditsScheduler extends Scheduler public class CreditsScheduler extends Scheduler
{ {
/**
* Defines if users that are not in a room should be excluded from receiving credits.
*/
public static boolean IGNORE_HOTEL_VIEW; public static boolean IGNORE_HOTEL_VIEW;
/**
* Defines if users idling in rooms should be excluded from receiving credits.
*/
public static boolean IGNORE_IDLED; public static boolean IGNORE_IDLED;
/**
* The amount of credits that will be given.
*/
public static int CREDITS; public static int CREDITS;
public CreditsScheduler() public CreditsScheduler()

View File

@ -8,9 +8,7 @@ import java.io.StringWriter;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Created on 12-11-2015 19:16.
*/
public class ErrorLog implements Loggable public class ErrorLog implements Loggable
{ {
public final static String insertQuery = "INSERT INTO emulator_errors (timestamp, type, stacktrace) VALUES (?, ?, ?)"; public final static String insertQuery = "INSERT INTO emulator_errors (timestamp, type, stacktrace) VALUES (?, ?, ?)";

View File

@ -13,34 +13,22 @@ import java.sql.SQLException;
public class Logging public class Logging
{ {
/**
* File that packetlogs will be sved to.
*/
private static File packets; private static File packets;
/**
* File that undefined packetlogs will be saved to.
*/
private static File packetsUndefined; private static File packetsUndefined;
/**
* File that packets that were improperly handled will be saved to.
*/
private static File errorsPackets; private static File errorsPackets;
/**
* File that SQL errors will be saved to.
*/
private static File errorsSQL; private static File errorsSQL;
/**
* File that runtime errors will be saved to.
*/
private static File errorsRuntime; private static File errorsRuntime;
/**
* File that debug logs will be saved to.
*/
private static File debugFile; private static File debugFile;
private static PrintWriter packetsWriter; private static PrintWriter packetsWriter;
@ -50,24 +38,16 @@ public class Logging
private static PrintWriter errorsRuntimeWriter; private static PrintWriter errorsRuntimeWriter;
private static PrintWriter debugFileWriter; private static PrintWriter debugFileWriter;
/**
* Bright text.
*/
public static final String ANSI_BRIGHT = "\u001B[1m"; public static final String ANSI_BRIGHT = "\u001B[1m";
/**
* Italicized text.
*/
public static final String ANSI_ITALICS = "\u001B[3m"; public static final String ANSI_ITALICS = "\u001B[3m";
/**
* Underlined text.
*/
public static final String ANSI_UNDERLINE = "\u001B[4m"; public static final String ANSI_UNDERLINE = "\u001B[4m";
/**
* Resets all text effects to normal console font.
*/
public static final String ANSI_RESET = "\u001B[0m"; public static final String ANSI_RESET = "\u001B[0m";
public static final String ANSI_BLACK = "\u001B[30m"; public static final String ANSI_BLACK = "\u001B[30m";
@ -79,16 +59,10 @@ public class Logging
public static final String ANSI_CYAN = "\u001B[36m"; public static final String ANSI_CYAN = "\u001B[36m";
public static final String ANSI_WHITE = "\u001B[37m"; public static final String ANSI_WHITE = "\u001B[37m";
/**
* Error logging cache layer.
* Used for bulk inserting into the database.
*/
private final THashSet<Loggable> errorLogs = new THashSet<Loggable>(); private final THashSet<Loggable> errorLogs = new THashSet<Loggable>();
/**
* Command log cache layer.
* Used for bulk inserting into the database.
*/
private final THashSet<Loggable> commandLogs = new THashSet<Loggable>(); private final THashSet<Loggable> commandLogs = new THashSet<Loggable>();
public Logging() public Logging()
@ -182,19 +156,13 @@ public class Logging
} }
} }
/**
* Prints a starting message to the console.
* @param line The message to print.
*/
public void logStart(Object line) public void logStart(Object line)
{ {
System.out.println("[" + Logging.ANSI_BRIGHT + Logging.ANSI_GREEN + "LOADING" + Logging.ANSI_RESET + "] " + line.toString()); System.out.println("[" + Logging.ANSI_BRIGHT + Logging.ANSI_GREEN + "LOADING" + Logging.ANSI_RESET + "] " + line.toString());
} }
/**
* Prints a shutdown message to the console.
* @param line The message to print.
*/
public void logShutdownLine(Object line) public void logShutdownLine(Object line)
{ {
if(Emulator.getConfig().getBoolean("logging.debug")) if(Emulator.getConfig().getBoolean("logging.debug"))

View File

@ -7,19 +7,13 @@ import java.util.Map;
public class PixelScheduler extends Scheduler public class PixelScheduler extends Scheduler
{ {
/**
* Defines if users that are not in a room should be excluded from receiving pixels.
*/
public static boolean IGNORE_HOTEL_VIEW; public static boolean IGNORE_HOTEL_VIEW;
/**
* Defines if users idling in rooms should be excluded from receiving pixels.
*/
public static boolean IGNORE_IDLED; public static boolean IGNORE_IDLED;
/**
* The amount of pixels to give.
*/
private static int PIXELS; private static int PIXELS;
public PixelScheduler() public PixelScheduler()

View File

@ -7,19 +7,13 @@ import java.util.Map;
public class PointsScheduler extends Scheduler public class PointsScheduler extends Scheduler
{ {
/**
* Defines if users that are not in a room should be excluded from receiving points.
*/
public static boolean IGNORE_HOTEL_VIEW; public static boolean IGNORE_HOTEL_VIEW;
/**
* Defines if users idling in rooms should be excluded from receiving points.
*/
public static boolean IGNORE_IDLED; public static boolean IGNORE_IDLED;
/**
* The amount of points to give.
*/
private static int POINTS; private static int POINTS;
public PointsScheduler() public PointsScheduler()

View File

@ -9,9 +9,7 @@ import java.util.Properties;
public class TextsManager public class TextsManager
{ {
/**
* All emulator texts are stored in this object.
*/
private final Properties texts; private final Properties texts;
public TextsManager() public TextsManager()
@ -33,10 +31,7 @@ public class TextsManager
} }
} }
/**
* Reloads all texts from the database.
* @throws Exception
*/
public void reload() throws Exception public void reload() throws Exception
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM emulator_texts")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); Statement statement = connection.createStatement(); ResultSet set = statement.executeQuery("SELECT * FROM emulator_texts"))
@ -59,22 +54,13 @@ public class TextsManager
} }
} }
/**
* Gets the string value for a specific key.
* @param key The key to find the value for.
* @return The string value for the key. Returns an empty string if not found.
*/
public String getValue(String key) public String getValue(String key)
{ {
return getValue(key, ""); return getValue(key, "");
} }
/**
* Gets the string value for a specific key.
* @param key The key to find the value for.
* @param defaultValue The value that will be returned when the key is not found.
* @return The string value for the key. Returns defaultValue when not found.
*/
public String getValue(String key, String defaultValue) public String getValue(String key, String defaultValue)
{ {
if (!this.texts.containsKey(key)) { if (!this.texts.containsKey(key)) {
@ -83,22 +69,13 @@ public class TextsManager
return this.texts.getProperty(key, defaultValue); return this.texts.getProperty(key, defaultValue);
} }
/**
* Gets the boolean value for a specific key.
* @param key The key to find the value for.
* @return The boolean value for the key. Returns false if not found.
*/
public boolean getBoolean(String key) public boolean getBoolean(String key)
{ {
return getBoolean(key, false); return getBoolean(key, false);
} }
/**
* Gets the boolean value for a specific key.
* @param key The key to find the value for.
* @param defaultValue The value that will be returned when the key is not found.
* @return The boolean value for the key. Returns defaultValue when not found.
*/
public boolean getBoolean(String key, Boolean defaultValue) public boolean getBoolean(String key, Boolean defaultValue)
{ {
try try
@ -112,22 +89,13 @@ public class TextsManager
return defaultValue; return defaultValue;
} }
/**
* Gets the int value for a specific key.
* @param key The key to find the value for.
* @return The int value for the key. Returns 0 if not found.
*/
public int getInt(String key) public int getInt(String key)
{ {
return getInt(key, 0); return getInt(key, 0);
} }
/**
* Gets the int value for a specific key.
* @param key The key to find the value for.
* @param defaultValue The value that will be returned when the key is not found.
* @return The int value for the key. Returns defaultValue when not found.
*/
public int getInt(String key, Integer defaultValue) public int getInt(String key, Integer defaultValue)
{ {
try try
@ -141,11 +109,7 @@ public class TextsManager
return defaultValue; return defaultValue;
} }
/**
* Updates the give key.
* @param key The key to update.
* @param value The new value.
*/
public void update(String key, String value) public void update(String key, String value)
{ {
this.texts.setProperty(key, value); this.texts.setProperty(key, value);

View File

@ -5,35 +5,23 @@ import gnu.trove.set.hash.THashSet;
public abstract class ConsoleCommand public abstract class ConsoleCommand
{ {
/**
* Holds all console commands.
*/
public static THashMap<String, ConsoleCommand> commands = new THashMap<String, ConsoleCommand>(); public static THashMap<String, ConsoleCommand> commands = new THashMap<String, ConsoleCommand>();
/**
* The key of the command. First word.
*/
public final String key; public final String key;
/**
* Usage of the command (Arguments).
*/
public final String usage; public final String usage;
/**
* Constructs a new ConsoleCommand.
* @param key The key of the command. First word.
* @param usage Usage of the command (Arguments).
*/
public ConsoleCommand(String key, String usage) public ConsoleCommand(String key, String usage)
{ {
this.key = key; this.key = key;
this.usage = usage; this.usage = usage;
} }
/**
* Loads all default ConsoleCommands.
*/
public static void load() public static void load()
{ {
addCommand(new ConsoleShutdownCommand()); addCommand(new ConsoleShutdownCommand());
@ -42,37 +30,22 @@ public abstract class ConsoleCommand
addCommand(new ConsoleReconnectCameraCommand()); addCommand(new ConsoleReconnectCameraCommand());
} }
/**
* Handles a command
* @param args The arguments entered in the console including the key at index 0.
* @throws Exception
*/
public abstract void handle(String[] args) throws Exception; public abstract void handle(String[] args) throws Exception;
/**
* Add a new consolecommand.
* @param command The consolecommand to add.
*/
public static void addCommand(ConsoleCommand command) public static void addCommand(ConsoleCommand command)
{ {
commands.put(command.key, command); commands.put(command.key, command);
} }
/**
* Searches for the consolecommand using a given key.
* @param key The key to find the associated ConsoleCommand for.
* @return The ConsoleCommand associated with the key. return null if not found.
*/
public static ConsoleCommand findCommand(String key) public static ConsoleCommand findCommand(String key)
{ {
return commands.get(key); return commands.get(key);
} }
/**
* Handles a line entered in the console.
* @param line The line entered in the console.
* @return True if the command was succesfully handled. Otherwise false.
*/
public static boolean handle(String line) public static boolean handle(String line)
{ {
String[] message = line.split(" "); String[] message = line.split(" ");

View File

@ -10,14 +10,10 @@ import java.sql.Statement;
public class Database public class Database
{ {
/**
* Database datasource.
*/
private HikariDataSource dataSource; private HikariDataSource dataSource;
/**
* Database connection pool.
*/
private DatabasePool databasePool; private DatabasePool databasePool;
public Database(ConfigurationManager config) public Database(ConfigurationManager config)
@ -54,9 +50,7 @@ public class Database
Emulator.getLogging().logStart("Database -> Connected! (" + (System.currentTimeMillis() - millis) + " MS)"); Emulator.getLogging().logStart("Database -> Connected! (" + (System.currentTimeMillis() - millis) + " MS)");
} }
/**
* Disposes the database and closes all connections to the database.
*/
public void dispose() public void dispose()
{ {
if (this.databasePool != null) if (this.databasePool != null)

View File

@ -7,31 +7,19 @@ import java.sql.SQLException;
public class Achievement public class Achievement
{ {
/**
* Id of the Achievement.
*/
public final int id; public final int id;
/**
* Name of the Achievement;
*/
public final String name; public final String name;
/**
* Category of the achievement.
*/
public final AchievementCategories category; public final AchievementCategories category;
/**
* The levels this achievement has.
*/
public final THashMap<Integer, AchievementLevel> levels; public final THashMap<Integer, AchievementLevel> levels;
/**
* Creates an new achievement.
* @param set The ResultSet it should fetch the data from.
* @throws SQLException
*/
public Achievement(ResultSet set) throws SQLException public Achievement(ResultSet set) throws SQLException
{ {
levels = new THashMap<Integer, AchievementLevel>(); levels = new THashMap<Integer, AchievementLevel>();
@ -43,10 +31,7 @@ public class Achievement
this.addLevel(new AchievementLevel(set)); this.addLevel(new AchievementLevel(set));
} }
/**
* Adds an new AchievementLevel to the Achievement.
* @param level The AchievementLevel to be added.
*/
public void addLevel(AchievementLevel level) public void addLevel(AchievementLevel level)
{ {
synchronized (this.levels) synchronized (this.levels)
@ -55,11 +40,7 @@ public class Achievement
} }
} }
/**
* Calculates the AchievementLevel for the given progress.
* @param progress The amount of progress.
* @return The AchievementLevel that matches the amount of progress.
*/
public AchievementLevel getLevelForProgress(int progress) public AchievementLevel getLevelForProgress(int progress)
{ {
AchievementLevel l = null; AchievementLevel l = null;
@ -88,11 +69,7 @@ public class Achievement
return l; return l;
} }
/**
* Calculates the next level compared to the current level.
* @param currentLevel The current level to calculate the next level for.
* @return The next level. Return null if there is no next level.
*/
public AchievementLevel getNextLevel(int currentLevel) public AchievementLevel getNextLevel(int currentLevel)
{ {
AchievementLevel l = null; AchievementLevel l = null;

View File

@ -2,63 +2,39 @@ package com.eu.habbo.habbohotel.achievements;
public enum AchievementCategories public enum AchievementCategories
{ {
/**
* Achievements like looks that kill, email registered etc.
*/
IDENTITY, IDENTITY,
/**
* Achievements like room raider.
*/
EXPLORE, EXPLORE,
/**
* Related to playing music, created music and so on.
*/
MUSIC, MUSIC,
/**
* Achievements like giving respect, hanging out in other peoples room etc.
*/
SOCIAL, SOCIAL,
/**
* Games! Banzai! Freeze!
*/
GAMES, GAMES,
/**
* Stacking, builder, everthing related to furntiure.
*/
ROOM_BUILDER, ROOM_BUILDER,
/**
* Cat scratch fever.
*/
PETS, PETS,
/**
* Could be used for achievements related to floorplan editor. Not sure.
*/
TOOLS, TOOLS,
/**
* Whatever floats your boat goes in here.
*/
OTHER, OTHER,
/**
* Please referain from using.
*/
TEST, TEST,
/**
* Achievements that you don't want to showup in the achievements window.
*/
INVISIBLE, INVISIBLE,
/**
* Events, anything you want to add.
*/
EVENTS EVENTS
} }

View File

@ -5,29 +5,19 @@ import java.sql.SQLException;
public class AchievementLevel public class AchievementLevel
{ {
/**
* level of the achievement.
*/
public final int level; public final int level;
/**
* Amount of currency to give upon achieving this level.
*/
public final int rewardAmount; public final int rewardAmount;
/**
* Currency type to give upon achieving this level.
*/
public final int rewardType; public final int rewardType;
/**
* Amount of achievement points to add upon achieving this level.
*/
public final int points; public final int points;
/**
* Amount of progress needed to achieve this level.
*/
public final int progress; public final int progress;
public AchievementLevel(ResultSet set) throws SQLException public AchievementLevel(ResultSet set) throws SQLException

View File

@ -24,27 +24,19 @@ import java.util.Map;
public class AchievementManager public class AchievementManager
{ {
/**
* All the achievements in the hotel are stored in this map where:
* String = name of the achievement (Without ACH_ & Roman number.
* Achievement = Instance of the Achievement class.
*/
private final THashMap<String, Achievement> achievements; private final THashMap<String, Achievement> achievements;
private final THashMap<TalentTrackType, LinkedHashMap<Integer, TalentTrackLevel>> talentTrackLevels; private final THashMap<TalentTrackType, LinkedHashMap<Integer, TalentTrackLevel>> talentTrackLevels;
/**
* The AchievementManager, shit happens here.
*/
public AchievementManager() public AchievementManager()
{ {
this.achievements = new THashMap<>(); this.achievements = new THashMap<>();
this.talentTrackLevels = new THashMap<>(); this.talentTrackLevels = new THashMap<>();
} }
/**
* Reloads the achievement manager.
*/
public void reload() public void reload()
{ {
long millis = System.currentTimeMillis(); long millis = System.currentTimeMillis();
@ -109,21 +101,13 @@ public class AchievementManager
Emulator.getLogging().logStart("Achievement Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)"); Emulator.getLogging().logStart("Achievement Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)");
} }
/**
* Find an achievement by name.
* @param name The achievement to find.
* @return The achievement
*/
public Achievement getAchievement(String name) public Achievement getAchievement(String name)
{ {
return this.achievements.get(name); return this.achievements.get(name);
} }
/**
* Find an achievement by id
* @param id The achievement id to find.
* @return The achievement
*/
public Achievement getAchievement(int id) public Achievement getAchievement(int id)
{ {
synchronized (this.achievements) synchronized (this.achievements)
@ -182,22 +166,13 @@ public class AchievementManager
} }
/**
* Progresses an Habbo's achievement by 1.
* @param habbo The Habbo whose achievement should be progressed.
* @param achievement The Achievement to be progressed.
*/
public static void progressAchievement(Habbo habbo, Achievement achievement) public static void progressAchievement(Habbo habbo, Achievement achievement)
{ {
progressAchievement(habbo, achievement, 1); progressAchievement(habbo, achievement, 1);
} }
/**
* Progresses an Habbo's achievement by an given amount.
* @param habbo The Habbo whose achievement should be progressed.
* @param achievement The Achievement to be progressed.
* @param amount The amount that should be progressed.
*/
public static void progressAchievement(Habbo habbo, Achievement achievement, int amount) public static void progressAchievement(Habbo habbo, Achievement achievement, int amount)
{ {
if (achievement == null) if (achievement == null)
@ -317,12 +292,7 @@ public class AchievementManager
} }
} }
/**
* Checks wether the given Habbo has achieved a certain Achievement.
* @param habbo The Habbo to check.
* @param achievement The Achievement to check.
* @return True when the given Habbo has achieved the Achievement.
*/
public static boolean hasAchieved(Habbo habbo, Achievement achievement) public static boolean hasAchieved(Habbo habbo, Achievement achievement)
{ {
int currentProgress = habbo.getHabboStats().getAchievementProgress(achievement); int currentProgress = habbo.getHabboStats().getAchievementProgress(achievement);
@ -347,11 +317,7 @@ public class AchievementManager
return false; return false;
} }
/**
* Creates an new Achievement entry in the database.
* @param habbo The Habbo the achievement should be saved for.
* @param achievement The Achievement that should be inserted.
*/
public static void createUserEntry(Habbo habbo, Achievement achievement) public static void createUserEntry(Habbo habbo, Achievement achievement)
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO users_achievements (user_id, achievement_name, progress) VALUES (?, ?, ?)")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("INSERT INTO users_achievements (user_id, achievement_name, progress) VALUES (?, ?, ?)"))
@ -367,10 +333,7 @@ public class AchievementManager
} }
} }
/**
* Saves all the Achievements for the given Habbo to the database.
* @param habbo The Habbo whose Achievements should be saved.
*/
public static void saveAchievements(Habbo habbo) public static void saveAchievements(Habbo habbo)
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE users_achievements SET progress = ? WHERE achievement_name = ? AND user_id = ? LIMIT 1")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE users_achievements SET progress = ? WHERE achievement_name = ? AND user_id = ? LIMIT 1"))

View File

@ -13,34 +13,22 @@ import java.sql.SQLException;
public class TalentTrackLevel public class TalentTrackLevel
{ {
/**
* Type of this talen track level.
*/
public TalentTrackType type; public TalentTrackType type;
/**
* The level of this TalenTrackLevel.
*/
public int level; public int level;
/**
* Achievements required to achieve this level.
*/
public TObjectIntMap<Achievement> achievements; public TObjectIntMap<Achievement> achievements;
/**
* Items that will be rewarded upon achieving this level.
*/
public THashSet<Item> items; public THashSet<Item> items;
/**
* Perks unlocked upon achieving this level.
*/
public String[] perks; public String[] perks;
/**
* Badges received upon achieving this level.
*/
public String[] badges; public String[] badges;
public TalentTrackLevel(ResultSet set) throws SQLException public TalentTrackLevel(ResultSet set) throws SQLException

View File

@ -2,13 +2,9 @@ package com.eu.habbo.habbohotel.achievements;
public enum TalentTrackType public enum TalentTrackType
{ {
/**
* Talent track for citizenship.
*/
CITIZENSHIP, CITIZENSHIP,
/**
* Talent track for helpers and guardians.
*/
HELPER HELPER
} }

View File

@ -22,100 +22,61 @@ import java.util.Arrays;
public class Bot implements Runnable public class Bot implements Runnable
{ {
/**
* Bot id.
*/
private int id; private int id;
/**
* Bot name.
*/
private String name; private String name;
/**
* Bot motto.
*/
private String motto; private String motto;
/**
* Bot look.
*/
private String figure; private String figure;
/**
* Bot gender.
*/
private HabboGender gender; private HabboGender gender;
/**
* Bot owner id.
*/
private int ownerId; private int ownerId;
/**
* Bot owner name.
*/
private String ownerName; private String ownerName;
/**
* Current room the bot is in.
*/
private Room room; private Room room;
/**
* Current roomUnit that is linked to this bot.
*/
private RoomUnit roomUnit; private RoomUnit roomUnit;
/**
* Should auto talk.
*/
private boolean chatAuto; private boolean chatAuto;
/**
* Should talk random.
*/
private boolean chatRandom; private boolean chatRandom;
/**
* Delay between each sentence.
*/
private short chatDelay; private short chatDelay;
/**
* Next timestamp the bot can talk.
*/
private int chatTimeOut; private int chatTimeOut;
/**
* All chatlines the bot has.
*/
private final ArrayList<String> chatLines; private final ArrayList<String> chatLines;
/**
* Last chatline the bot spoke.
*/
private short lastChatIndex; private short lastChatIndex;
/**
* Type of this bot. Used to define custom behaviour.
* See API docs on how to use this.
*/
private String type; private String type;
/**
* Enable effect id.
*/
private int effect; private int effect;
/**
* Wether the bot has to be saved to the database.
*/
private boolean needsUpdate; private boolean needsUpdate;
/**
* Which roomunit is this bot following.
*/
private int followingHabboId; private int followingHabboId;
public Bot(int id, String name, String motto, String figure, HabboGender gender, int ownerId, String ownerName) public Bot(int id, String name, String motto, String figure, HabboGender gender, int ownerId, String ownerName)
@ -179,18 +140,13 @@ public class Bot implements Runnable
this.needsUpdate = false; this.needsUpdate = false;
} }
/**
* Sets wheter the bot has to be updated in the database.
* @param needsUpdate Should the bot be updated in the database.
*/
public void needsUpdate(boolean needsUpdate) public void needsUpdate(boolean needsUpdate)
{ {
this.needsUpdate = needsUpdate; this.needsUpdate = needsUpdate;
} }
/**
* @return Wether the bot has to be updated in the database.
*/
public boolean needsUpdate() public boolean needsUpdate()
{ {
return this.needsUpdate; return this.needsUpdate;
@ -235,14 +191,7 @@ public class Bot implements Runnable
} }
} }
/**
* Cycles through the bot checking if the bot should perform a certain action:
*
* -> Look for a new tile to walk to.
* -> Speak
*
* Override to implement custom behaviour. Make sure to call super.cycle() first.
*/
public void cycle(boolean canWalk) public void cycle(boolean canWalk)
{ {
if(this.roomUnit != null) if(this.roomUnit != null)
@ -283,10 +232,7 @@ public class Bot implements Runnable
} }
} }
/**
* Have the bot say something in the room it currently is in.
* @param message The message the bot has to say.
*/
public void talk(String message) public void talk(String message)
{ {
if(this.room != null) if(this.room != null)
@ -299,10 +245,7 @@ public class Bot implements Runnable
} }
} }
/**
* Have the bot shout something in the room it currently is in.
* @param message The message the bot has to shout.
*/
public void shout(String message) public void shout(String message)
{ {
if(this.room != null) if(this.room != null)
@ -315,11 +258,7 @@ public class Bot implements Runnable
} }
} }
/**
* Have the bot whisper something to a habbo.
* @param message The message the bot has to whisper.
* @param habbo The Habbo it should whisper to.
*/
public void whisper(String message, Habbo habbo) public void whisper(String message, Habbo habbo)
{ {
if(this.room != null && habbo != null) if(this.room != null && habbo != null)
@ -332,64 +271,43 @@ public class Bot implements Runnable
} }
} }
/**
* This event is triggered whenever a Habbo places a bot.
* @param habbo The Habbo who placed this bot.
* @param room The room this bot was placed in.
*/
public void onPlace(Habbo habbo, Room room) public void onPlace(Habbo habbo, Room room)
{ {
} }
/**
* This event is triggered whenever a Habbo picks a bot.
* @param habbo The Habbo who picked up this bot.
* @param room The Room this bot was placed in.
*/
public void onPickUp(Habbo habbo, Room room) public void onPickUp(Habbo habbo, Room room)
{ {
} }
/**
* This event is triggered whenever a Habbo talks or shouts in a room.
* @param message The message that has been said.
*/
public void onUserSay(final RoomChatMessage message) public void onUserSay(final RoomChatMessage message)
{ {
} }
/**
* @return The id of the bot.
*/
public int getId() public int getId()
{ {
return this.id; return this.id;
} }
/**
* Sets the id of the bot.
* @param id The new id of the bot.
*/
public void setId(int id) public void setId(int id)
{ {
this.id = id; this.id = id;
} }
/**
* @return The name of the bot
*/
public String getName() public String getName()
{ {
return this.name; return this.name;
} }
/**
* Sets the name of the bot.
* @param name The new name of the bot.
*/
public void setName(String name) public void setName(String name)
{ {
this.name = name; this.name = name;
@ -399,36 +317,26 @@ public class Bot implements Runnable
//this.room.sendComposer(new ChangeNameUpdatedComposer(this.getRoomUnit(), this.getName()).compose()); //this.room.sendComposer(new ChangeNameUpdatedComposer(this.getRoomUnit(), this.getName()).compose());
} }
/**
* @return The motto of the bot.
*/
public String getMotto() public String getMotto()
{ {
return this.motto; return this.motto;
} }
/**
* Sets a new motto for the bot.
* @param motto The new motto for the bot.
*/
public void setMotto(String motto) public void setMotto(String motto)
{ {
this.motto = motto; this.motto = motto;
this.needsUpdate = true; this.needsUpdate = true;
} }
/**
* @return The figure of the bot.
*/
public String getFigure() public String getFigure()
{ {
return this.figure; return this.figure;
} }
/**
* Sets a new figure of the bot and updates it in the room.
* @param figure The new figure of the bot.
*/
public void setFigure(String figure) public void setFigure(String figure)
{ {
this.figure = figure; this.figure = figure;
@ -438,18 +346,13 @@ public class Bot implements Runnable
this.room.sendComposer(new RoomUsersComposer(this).compose()); this.room.sendComposer(new RoomUsersComposer(this).compose());
} }
/**
* @return The gender of the bot.
*/
public HabboGender getGender() public HabboGender getGender()
{ {
return this.gender; return this.gender;
} }
/**
* Sets a new Gender of the bot and updates it in the room.
* @param gender The new gender of the bot.
*/
public void setGender(HabboGender gender) public void setGender(HabboGender gender)
{ {
this.gender = gender; this.gender = gender;
@ -459,17 +362,13 @@ public class Bot implements Runnable
this.room.sendComposer(new RoomUsersComposer(this).compose()); this.room.sendComposer(new RoomUsersComposer(this).compose());
} }
/**
* @return The owner id of the bot.
*/
public int getOwnerId() public int getOwnerId()
{ {
return this.ownerId; return this.ownerId;
} }
/**
* @param ownerId The new owner id of the bot.
*/
public void setOwnerId(int ownerId) public void setOwnerId(int ownerId)
{ {
this.ownerId = ownerId; this.ownerId = ownerId;
@ -479,17 +378,13 @@ public class Bot implements Runnable
this.room.sendComposer(new RoomUsersComposer(this).compose()); this.room.sendComposer(new RoomUsersComposer(this).compose());
} }
/**
* @return The owner name of the bot.
*/
public String getOwnerName() public String getOwnerName()
{ {
return this.ownerName; return this.ownerName;
} }
/**
* @param ownerName The new owner name of the bot.
*/
public void setOwnerName(String ownerName) public void setOwnerName(String ownerName)
{ {
this.ownerName = ownerName; this.ownerName = ownerName;
@ -499,92 +394,70 @@ public class Bot implements Runnable
this.room.sendComposer(new RoomUsersComposer(this).compose()); this.room.sendComposer(new RoomUsersComposer(this).compose());
} }
/**
* @return The room this bot is in. Returns NULL when in inventory.
*/
public Room getRoom() public Room getRoom()
{ {
return this.room; return this.room;
} }
/**
* @param room The room this bot is in.
*/
public void setRoom(Room room) public void setRoom(Room room)
{ {
this.room = room; this.room = room;
} }
/**
* @return The RoomUnit of the bot.
*/
public RoomUnit getRoomUnit() public RoomUnit getRoomUnit()
{ {
return this.roomUnit; return this.roomUnit;
} }
/**
* @param roomUnit The RoomUnit of the bot.
*/
public void setRoomUnit(RoomUnit roomUnit) public void setRoomUnit(RoomUnit roomUnit)
{ {
this.roomUnit = roomUnit; this.roomUnit = roomUnit;
} }
/**
* @return Wether the bot has auto chat enabled.
*/
public boolean isChatAuto() public boolean isChatAuto()
{ {
return this.chatAuto; return this.chatAuto;
} }
/**
* @param chatAuto Sets wheter the bot has auto chat enabled.
*/
public void setChatAuto(boolean chatAuto) public void setChatAuto(boolean chatAuto)
{ {
this.chatAuto = chatAuto; this.chatAuto = chatAuto;
this.needsUpdate = true; this.needsUpdate = true;
} }
/**
* @return Wheter the chatter is randomly selected.
*/
public boolean isChatRandom() public boolean isChatRandom()
{ {
return this.chatRandom; return this.chatRandom;
} }
/**
* @param chatRandom Sets wheter the chatter is randomly selected.
*/
public void setChatRandom(boolean chatRandom) public void setChatRandom(boolean chatRandom)
{ {
this.chatRandom = chatRandom; this.chatRandom = chatRandom;
this.needsUpdate = true; this.needsUpdate = true;
} }
/**
* @return The minimum interval between two messages spoken by the bot.
*/
public int getChatDelay() public int getChatDelay()
{ {
return this.chatDelay; return this.chatDelay;
} }
/**
* @param chatDelay Sets the minimum interval between two messages spoken by the bot.
*/
public void setChatDelay(short chatDelay) public void setChatDelay(short chatDelay)
{ {
this.chatDelay = chatDelay; this.chatDelay = chatDelay;
this.needsUpdate = true; this.needsUpdate = true;
} }
/**
* Removes all chatlines from the bot.
*/
public void clearChat() public void clearChat()
{ {
synchronized (this.chatLines) synchronized (this.chatLines)
@ -594,26 +467,19 @@ public class Bot implements Runnable
} }
} }
/**
* @return The bot type.
*/
public String getType() public String getType()
{ {
return this.type; return this.type;
} }
/**
* @return The current enable effect.
*/
public int getEffect() public int getEffect()
{ {
return this.effect; return this.effect;
} }
/**
* Sets the effect for a bot and also updates it to the room.
* @param effect The effect to give to the bot.
*/
public void setEffect(int effect) public void setEffect(int effect)
{ {
this.effect = effect; this.effect = effect;
@ -630,10 +496,7 @@ public class Bot implements Runnable
} }
} }
/**
* Adds new chatlines to the bot. Does not erase existing chatlines.
* @param chatLines The chatlines to add.
*/
public void addChatLines(ArrayList<String> chatLines) public void addChatLines(ArrayList<String> chatLines)
{ {
synchronized (this.chatLines) synchronized (this.chatLines)
@ -643,10 +506,7 @@ public class Bot implements Runnable
} }
} }
/**
* Adds a new chatline to the bot. Does not erase existing chatlines.
* @param chatLine The chatline to add.
*/
public void addChatLine(String chatLine) public void addChatLine(String chatLine)
{ {
synchronized (this.chatLines) synchronized (this.chatLines)
@ -656,30 +516,19 @@ public class Bot implements Runnable
} }
} }
/**
* @return The chatlines this bot can speak.
*/
public ArrayList<String> getChatLines() public ArrayList<String> getChatLines()
{ {
return this.chatLines; return this.chatLines;
} }
/**
* @return The HabboInfo.id of the Habbo it is following.
*/
public int getFollowingHabboId() public int getFollowingHabboId()
{ {
return this.followingHabboId; return this.followingHabboId;
} }
/**
* Starts following a specific Habbo. Action may get interrupted when:
* <li>The bot is triggered with WiredEffectBotFollowHabbo.</li>
* <li>The bot is triggered with WiredEffectBotGiveHandItem.</li>
* <li>The bots in the room are frozen</li>
*
* @param habbo The Habbo to follow.
*/
public void startFollowingHabbo(Habbo habbo) public void startFollowingHabbo(Habbo habbo)
{ {
this.followingHabboId = habbo.getHabboInfo().getId(); this.followingHabboId = habbo.getHabboInfo().getId();
@ -692,20 +541,13 @@ public class Bot implements Runnable
this.followingHabboId = 0; this.followingHabboId = 0;
} }
/**
* Used to load in custom data.
* Implement this method whenever you want data to be loaded from the database
* upon the loading of the BotManager. This is to guarantee database integrity.
* This method must be implemented. Failing to do so will result into a runtime error.
*/
public static void initialise() public static void initialise()
{ {
} }
/**
* Called upon Emulator shutdown.
*/
public static void dispose() public static void dispose()
{ {

View File

@ -24,11 +24,7 @@ public class BotManager
final private static THashMap<String, Class<? extends Bot>> botDefenitions = new THashMap<String, Class<? extends Bot>>(); final private static THashMap<String, Class<? extends Bot>> botDefenitions = new THashMap<String, Class<? extends Bot>>();
/**
* Loads up the BotManager. Do NOT initialise this class yourself.
*
* Extend from the Bot class and implement 'public static void initialise()' to load data as you see fit.
*/
public BotManager() public BotManager()
{ {
long millis = System.currentTimeMillis(); long millis = System.currentTimeMillis();
@ -42,10 +38,7 @@ public class BotManager
Emulator.getLogging().logStart("Bot Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)"); Emulator.getLogging().logStart("Bot Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)");
} }
/**
* Reloads the bot manager
* @return Returns true if the BotManager has been succesfully reloaded.
*/
public boolean reload() public boolean reload()
{ {
for(Map.Entry<String, Class<? extends Bot>> set : botDefenitions.entrySet()) for(Map.Entry<String, Class<? extends Bot>> set : botDefenitions.entrySet())
@ -71,12 +64,7 @@ public class BotManager
return true; return true;
} }
/**
* Creates a new Bot and inserts it into the database.
* @param data A key-value set of details of the bot (name, motto, figure, gender)
* @param type The type of the bot that must be initialised.
* @return The initialised bot. Returns NULL upon Exception;
*/
public Bot createBot(THashMap<String, String> data, String type) public Bot createBot(THashMap<String, String> data, String type)
{ {
Bot bot = null; Bot bot = null;
@ -118,13 +106,7 @@ public class BotManager
return bot; return bot;
} }
/**
* Places a bot at the given location in the given room.
* @param bot The Bot that is being placed.
* @param habbo The Habbo that owns the Bot.
* @param room The Room this Bot is being placed in.
* @param location The given location of the Bot.
*/
public void placeBot(Bot bot, Habbo habbo, Room room, RoomTile location) public void placeBot(Bot bot, Habbo habbo, Room room, RoomTile location)
{ {
BotPlacedEvent event = new BotPlacedEvent(bot, location, habbo); BotPlacedEvent event = new BotPlacedEvent(bot, location, habbo);
@ -171,12 +153,7 @@ public class BotManager
} }
} }
/**
* Removes a bot from the room.
* Note the owner is being set to the Habbo.
* @param botId The id of the Bot that is being picked up.
* @param habbo The Habbo who picks it.
*/
public void pickUpBot(int botId, Habbo habbo) public void pickUpBot(int botId, Habbo habbo)
{ {
if(habbo.getHabboInfo().getCurrentRoom() != null) if(habbo.getHabboInfo().getCurrentRoom() != null)
@ -185,12 +162,7 @@ public class BotManager
} }
} }
/**
* Removes a bot from the room.
* Note the owner is being set to the Habbo.
* @param bot The Bot that is being picked up.
* @param habbo The Habbo who picks it.
*/
public void pickUpBot(Bot bot, Habbo habbo) public void pickUpBot(Bot bot, Habbo habbo)
{ {
if(bot != null && habbo != null) if(bot != null && habbo != null)
@ -220,11 +192,7 @@ public class BotManager
} }
} }
/**
* Loads a bot from the given ResultSet.
* @param set The set this bot must be initialised from.
* @return The initialised bot. Returns NULL upon SQLException being thrown.
*/
public Bot loadBot(ResultSet set) public Bot loadBot(ResultSet set)
{ {
try try
@ -249,11 +217,7 @@ public class BotManager
return null; return null;
} }
/**
* Deletes a bot from the database.
* @param bot The bot to delete.
* @return true if the bot has been deleted.
*/
public boolean deleteBot(Bot bot) public boolean deleteBot(Bot bot)
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM bots WHERE id = ? LIMIT 1")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM bots WHERE id = ? LIMIT 1"))
@ -269,15 +233,7 @@ public class BotManager
return false; return false;
} }
/**
* Add a new bot type in order to implement custom behaviour.
*
* Make sure to extend the Bot class and make the constructor match Bot(ResultSet)
* @param type The name of the bot type.
* @param botClazz The class that needs to be initialised.
* @throws Exception If the bot type already exists.
* If the bot class has no constructor matchin Bot(ResultSet)
*/
public static void addBotDefinition(String type, Class<? extends Bot> botClazz) throws Exception public static void addBotDefinition(String type, Class<? extends Bot> botClazz) throws Exception
{ {
if(botClazz.getDeclaredConstructor(ResultSet.class) == null) if(botClazz.getDeclaredConstructor(ResultSet.class) == null)
@ -292,11 +248,7 @@ public class BotManager
} }
} }
/**
* Called upon Emulator shutdown.
* Implement 'public static void dispose()' to pass on this event
* to your custom bot class.
*/
public void dispose() public void dispose()
{ {
for(Map.Entry<String, Class<? extends Bot>> set : botDefenitions.entrySet()) for(Map.Entry<String, Class<? extends Bot>> set : botDefenitions.entrySet())

View File

@ -17,11 +17,7 @@ public class ButlerBot extends Bot
{ {
public static THashMap<THashSet<String>, Integer> serveItems = new THashMap<THashSet<String>, Integer>(); public static THashMap<THashSet<String>, Integer> serveItems = new THashMap<THashSet<String>, Integer>();
/**
* This class is a bot that will hand out handitems upon triggering with the correct keys.
* @param set
* @throws SQLException
*/
public ButlerBot(ResultSet set) throws SQLException public ButlerBot(ResultSet set) throws SQLException
{ {
super(set); super(set);

View File

@ -15,90 +15,55 @@ import java.util.HashMap;
public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem> public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem>
{ {
/**
* Unique identifier.
*/
protected int id; protected int id;
/**
* Page where this item will be displayed.
*/
protected int pageId; protected int pageId;
/**
* String representation of the items that are displayed.
*/
protected String itemId; protected String itemId;
/**
* Catalog item name.
*/
protected String name; protected String name;
/**
* The amount of credits this item can be purchased for.
*/
protected int credits; protected int credits;
/**
* The amount of points this item can be purchased for.
*/
protected int points; protected int points;
/**
* The seasonal currency that is used in order to buy this item.
* Defaults to pixels at 0.
*/
protected short pointsType; protected short pointsType;
/**
* The amount of times this item will be given when purchased.
*/
protected int amount; protected int amount;
/**
* If this item can be gifted.
*/
protected boolean allowGift = false; protected boolean allowGift = false;
/**
* The total limited stack of this catalog item.
*/
protected int limitedStack; protected int limitedStack;
/**
* The amount of items that have been sold in this limited stack.
*/
protected int limitedSells; protected int limitedSells;
/**
* Extradata can be used to hold more data or set default data for the items bought.
*/
protected String extradata; protected String extradata;
/**
* Determines if this item can only be bought by people that have Habbo Club.
*/
protected boolean clubOnly; protected boolean clubOnly;
/**
* Determines if multiple purchases and thus discount is available.
*/
protected boolean haveOffer; protected boolean haveOffer;
/**
* The search offer id linked to this catalog item.
*/
protected int offerId; protected int offerId;
/**
* Flag to mark this item requiring an update to the database.
*/
protected boolean needsUpdate; protected boolean needsUpdate;
/**
* Contains the amount of items in the bundle.
*/
protected HashMap<Integer, Integer> bundle; protected HashMap<Integer, Integer> bundle;
public CatalogItem(ResultSet set) throws SQLException public CatalogItem(ResultSet set) throws SQLException
@ -107,11 +72,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
this.needsUpdate = false; this.needsUpdate = false;
} }
/**
* Updaes the CatalogItem with the given resultset.
* @param set The ResultSet to update the CatalogItem with.
* @throws SQLException
*/
public void update(ResultSet set) throws SQLException public void update(ResultSet set) throws SQLException
{ {
this.load(set); this.load(set);
@ -138,98 +99,73 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
this.loadBundle(); this.loadBundle();
} }
/**
* @return Unique identifier.
*/
public int getId() public int getId()
{ {
return this.id; return this.id;
} }
/**
* @return Page where this item will be displayed.
*/
public int getPageId() public int getPageId()
{ {
return this.pageId; return this.pageId;
} }
/**
* @param pageId Thenew page id to set for the item of where it will be displayed.
*/
public void setPageId(int pageId) public void setPageId(int pageId)
{ {
this.pageId = pageId; this.pageId = pageId;
} }
/**
* @return String representation of the items that are displayed.
*/
public String getItemId() public String getItemId()
{ {
return this.itemId; return this.itemId;
} }
/**
* @param itemId String representation of the items that are displayed.
*/
public void setItemId(String itemId) public void setItemId(String itemId)
{ {
this.itemId = itemId; this.itemId = itemId;
} }
/**
* @return Catalog item name.
*/
public String getName() public String getName()
{ {
return this.name; return this.name;
} }
/**
* @return The amount of credits this item can be purchased for.
*/
public int getCredits() public int getCredits()
{ {
return this.credits; return this.credits;
} }
/**
* @return The amount of points this item can be purchased for.
*/
public int getPoints() public int getPoints()
{ {
return this.points; return this.points;
} }
/**
* @return The seasonal currency that is used in order to buy this item.
* Defaults to pixels at 0.
*/
public int getPointsType() public int getPointsType()
{ {
return this.pointsType; return this.pointsType;
} }
/**
* @return The amount of times this item will be given when purchased.
*/
public int getAmount() public int getAmount()
{ {
return this.amount; return this.amount;
} }
/**
* @return The total limited stack of this catalog item.
*/
public int getLimitedStack() public int getLimitedStack()
{ {
return this.limitedStack; return this.limitedStack;
} }
/**
* @return The amount of items that have been sold in this limited stack.
*/
public int getLimitedSells() public int getLimitedSells()
{ {
CatalogLimitedConfiguration ltdConfig = Emulator.getGameEnvironment().getCatalogManager().getLimitedConfig(this); CatalogLimitedConfiguration ltdConfig = Emulator.getGameEnvironment().getCatalogManager().getLimitedConfig(this);
@ -242,49 +178,37 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
return this.limitedStack; return this.limitedStack;
} }
/**
* @return Extradata can be used to hold more data or set default data for the items bought.
*/
public String getExtradata() public String getExtradata()
{ {
return this.extradata; return this.extradata;
} }
/**
* @return Determines if this item can only be bought by people that have Habbo Club.
*/
public boolean isClubOnly() public boolean isClubOnly()
{ {
return this.clubOnly; return this.clubOnly;
} }
/**
* @return Determines if multiple purchases and thus discount is available.
*/
public boolean isHaveOffer() public boolean isHaveOffer()
{ {
return this.haveOffer; return this.haveOffer;
} }
/**
* @return The search offer id linked to this catalog item.
*/
public int getOfferId() public int getOfferId()
{ {
return this.offerId; return this.offerId;
} }
/**
* @return Returns True if this item has a limited stack.
*/
public boolean isLimited() public boolean isLimited()
{ {
return this.limitedStack > 0; return this.limitedStack > 0;
} }
/**
* Sell a limited item.
*/
public synchronized void sellRare() public synchronized void sellRare()
{ {
this.limitedSells++; this.limitedSells++;
@ -299,9 +223,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
Emulator.getThreading().run(this); Emulator.getThreading().run(this);
} }
/**
* @return Return all BaseItems being sold.
*/
public THashSet<Item> getBaseItems() public THashSet<Item> getBaseItems()
{ {
THashSet<Item> items = new THashSet<>(); THashSet<Item> items = new THashSet<>();
@ -334,9 +256,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
return items; return items;
} }
/**
* @return The amount of items being sold.
*/
public int getItemAmount(int id) public int getItemAmount(int id)
{ {
if(this.bundle.containsKey(id)) if(this.bundle.containsKey(id))
@ -345,17 +265,13 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
return this.amount; return this.amount;
} }
/**
* @return The bundle items.
*/
public HashMap<Integer, Integer> getBundle() public HashMap<Integer, Integer> getBundle()
{ {
return this.bundle; return this.bundle;
} }
/**
* Loads the items in a bundle.
*/
public void loadBundle() public void loadBundle()
{ {
int intItemId; int intItemId;
@ -514,11 +430,7 @@ public class CatalogItem implements ISerialize, Runnable, Comparable<CatalogItem
return this.getId() - catalogItem.getId(); return this.getId() - catalogItem.getId();
} }
/**
* Does additional checks to see if an item has offers enabled.
* @param item The item to check
* @return True if the item has offers enabled.
*/
private static boolean haveOffer(CatalogItem item) private static boolean haveOffer(CatalogItem item)
{ {
if(!item.haveOffer) if(!item.haveOffer)

View File

@ -45,76 +45,48 @@ import java.util.*;
public class CatalogManager public class CatalogManager
{ {
/**
* All the CatalogPages are stored in here.
*/
public final TIntObjectMap<CatalogPage> catalogPages; public final TIntObjectMap<CatalogPage> catalogPages;
/**
* All featured items on the frontpage.
*/
public final TIntObjectMap<CatalogFeaturedPage> catalogFeaturedPages; public final TIntObjectMap<CatalogFeaturedPage> catalogFeaturedPages;
/**
* All the recycler prizes are stored in here.
*/
public final THashMap<Integer, THashSet<Item>> prizes; public final THashMap<Integer, THashSet<Item>> prizes;
/**
* All the new gift wrappers are stored in here.
*/
public final THashMap<Integer, Integer> giftWrappers; public final THashMap<Integer, Integer> giftWrappers;
/**
* All the old gift wrappers (Seperate furnis) are stored in here.
*/
public final THashMap<Integer, Integer> giftFurnis; public final THashMap<Integer, Integer> giftFurnis;
/**
* All the items that can be claimed as club rewards are stored in here.
*/
public final THashSet<CatalogItem> clubItems; public final THashSet<CatalogItem> clubItems;
/**
* All Habbo Club subcription offers.
*/
public final THashMap<Integer, ClubOffer> clubOffers; public final THashMap<Integer, ClubOffer> clubOffers;
/**
* All clothing definitions
*/
public final THashMap<Integer, ClothItem> clothing; public final THashMap<Integer, ClothItem> clothing;
/**
* Offer definitions.
*/
public final TIntIntHashMap offerDefs; public final TIntIntHashMap offerDefs;
/**
* All vouchers are stored in here.
*/
private final List<Voucher> vouchers; private final List<Voucher> vouchers;
/**
* The box that should be given as ecotron reward.
*/
public final Item ecotronItem; public final Item ecotronItem;
/**
* The numbers available for limited furniture.
*/
public final THashMap<Integer, CatalogLimitedConfiguration> limitedNumbers; public final THashMap<Integer, CatalogLimitedConfiguration> limitedNumbers;
/**
* The amount of items that are on sale.
*/
public static int catalogItemAmount; public static int catalogItemAmount;
public final THashMap<Integer, CalendarRewardObject> calendarRewards; public final THashMap<Integer, CalendarRewardObject> calendarRewards;
/**
* Mapped all page definitions.
*/
public static final THashMap<String, Class<? extends CatalogPage>> pageDefinitions = new THashMap<String, Class<? extends CatalogPage>>() public static final THashMap<String, Class<? extends CatalogPage>> pageDefinitions = new THashMap<String, Class<? extends CatalogPage>>()
{ {
{ {
@ -188,9 +160,7 @@ public class CatalogManager
Emulator.getLogging().logStart("Catalog Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)"); Emulator.getLogging().logStart("Catalog Manager -> Loaded! ("+(System.currentTimeMillis() - millis)+" MS)");
} }
/**
* Initializes the CatalogManager.
*/
public synchronized void initialize() public synchronized void initialize()
{ {
Emulator.getPluginManager().fireEvent(new EmulatorLoadCatalogManagerEvent()); Emulator.getPluginManager().fireEvent(new EmulatorLoadCatalogManagerEvent());
@ -251,10 +221,7 @@ public class CatalogManager
} }
} }
/**
* Load all CatalogPages
* @throws SQLException
*/
private synchronized void loadCatalogPages() throws SQLException private synchronized void loadCatalogPages() throws SQLException
{ {
this.catalogPages.clear(); this.catalogPages.clear();
@ -324,10 +291,7 @@ public class CatalogManager
Emulator.getLogging().logStart("Loaded " + this.catalogPages.size() + " Catalog Pages!"); Emulator.getLogging().logStart("Loaded " + this.catalogPages.size() + " Catalog Pages!");
} }
/**
* Loads the featured catalog pages.
* @throws SQLException
*/
private synchronized void loadCatalogFeaturedPages() throws SQLException private synchronized void loadCatalogFeaturedPages() throws SQLException
{ {
this.catalogFeaturedPages.clear(); this.catalogFeaturedPages.clear();
@ -353,10 +317,7 @@ public class CatalogManager
Emulator.getLogging().logSQLException(e); Emulator.getLogging().logSQLException(e);
} }
} }
/**
* Load all CatalogItems
* @throws SQLException
*/
private synchronized void loadCatalogItems() throws SQLException private synchronized void loadCatalogItems() throws SQLException
{ {
this.clubItems.clear(); this.clubItems.clear();
@ -444,10 +405,7 @@ public class CatalogManager
} }
} }
/**
* Load all vouchers.
* @throws SQLException
*/
private void loadVouchers() throws SQLException private void loadVouchers() throws SQLException
{ {
synchronized (this.vouchers) synchronized (this.vouchers)
@ -464,10 +422,7 @@ public class CatalogManager
} }
} }
/**
* Load the recycler.
* @throws SQLException
*/
public void loadRecycler() throws SQLException public void loadRecycler() throws SQLException
{ {
synchronized (this.prizes) synchronized (this.prizes)
@ -501,10 +456,7 @@ public class CatalogManager
} }
} }
/**
* Load all gift wrappers (And old gift furnis)
* @throws SQLException
*/
public void loadGiftWrappers() throws SQLException public void loadGiftWrappers() throws SQLException
{ {
synchronized (this.giftWrappers) synchronized (this.giftWrappers)
@ -561,9 +513,7 @@ public class CatalogManager
} }
} }
/**
* Loads all clothing.
*/
private void loadClothing() private void loadClothing()
{ {
synchronized (this.clothing) synchronized (this.clothing)
@ -597,11 +547,7 @@ public class CatalogManager
return null; return null;
} }
/**
* Looks up the given code for any voucher that matches it.
* @param code The code to look up.
* @return The voucher that uses the code. NULL when not found.
*/
public Voucher getVoucher(String code) public Voucher getVoucher(String code)
{ {
synchronized (this.vouchers) synchronized (this.vouchers)
@ -617,11 +563,7 @@ public class CatalogManager
return null; return null;
} }
/**
* Redeem a vouchercode for the given GameClient.
* @param client The GameClient that receives the rewards.
* @param voucherCode The voucher code.
*/
public void redeemVoucher(GameClient client, String voucherCode) public void redeemVoucher(GameClient client, String voucherCode)
{ {
Voucher voucher = Emulator.getGameEnvironment().getCatalogManager().getVoucher(voucherCode); Voucher voucher = Emulator.getGameEnvironment().getCatalogManager().getVoucher(voucherCode);
@ -663,11 +605,7 @@ public class CatalogManager
client.sendResponse(new RedeemVoucherErrorComposer(RedeemVoucherErrorComposer.INVALID_CODE)); client.sendResponse(new RedeemVoucherErrorComposer(RedeemVoucherErrorComposer.INVALID_CODE));
} }
/**
* Deletes an voucher from the database and emulator cache.
* @param voucher The voucher to delete.
* @return True when the voucher has been deleted.
*/
public boolean deleteVoucher(Voucher voucher) public boolean deleteVoucher(Voucher voucher)
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM vouchers WHERE code = ?")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM vouchers WHERE code = ?"))
@ -689,11 +627,7 @@ public class CatalogManager
return false; return false;
} }
/**
* Gets the CatalogPage for the given page Id
* @param pageId The page Id to lookup.
* @return The CatalogPage matching the page Id. NULL When not found.
*/
public CatalogPage getCatalogPage(int pageId) public CatalogPage getCatalogPage(int pageId)
{ {
return this.catalogPages.get(pageId); return this.catalogPages.get(pageId);
@ -724,11 +658,7 @@ public class CatalogManager
} }
} }
/**
* Finds the catalog item associated with the id.
* @param id
* @return
*/
public CatalogItem getCatalogItem(int id) public CatalogItem getCatalogItem(int id)
{ {
final CatalogItem[] item = {null}; final CatalogItem[] item = {null};
@ -749,12 +679,7 @@ public class CatalogManager
return item[0]; return item[0];
} }
/**
* Gets all the sub pages for the given CatalogPage.
* @param parentId The page the sub pages have to bee looked up for.
* @param habbo The Habbo that has access to these pages.
* @return The selected pages.
*/
public List<CatalogPage> getCatalogPages(int parentId, final Habbo habbo) public List<CatalogPage> getCatalogPages(int parentId, final Habbo habbo)
{ {
final List<CatalogPage> pages = new ArrayList<CatalogPage>(); final List<CatalogPage> pages = new ArrayList<CatalogPage>();
@ -782,10 +707,7 @@ public class CatalogManager
return this.catalogFeaturedPages; return this.catalogFeaturedPages;
} }
/**
* @param itemId The CatalogItem that should be lookup.
* @return The CatalogItem for the id. NULL when not found.
*/
public CatalogItem getClubItem(int itemId) public CatalogItem getClubItem(int itemId)
{ {
synchronized (this.clubItems) synchronized (this.clubItems)
@ -800,12 +722,7 @@ public class CatalogManager
return null; return null;
} }
/**
* Moves a catalog item to the a different CatalogPage.
* @param item The CatalogItem to move.
* @param pageId The unique identifier of the page.
* @return True if the move has been succesfully.
*/
public boolean moveCatalogItem(CatalogItem item, int pageId) public boolean moveCatalogItem(CatalogItem item, int pageId)
{ {
CatalogPage page = this.getCatalogPage(item.getPageId()); CatalogPage page = this.getCatalogPage(item.getPageId());
@ -824,9 +741,7 @@ public class CatalogManager
return true; return true;
} }
/**
* @return Random recycler reward.
*/
public Item getRandomRecyclerPrize() public Item getRandomRecyclerPrize()
{ {
int level = 1; int level = 1;
@ -860,17 +775,7 @@ public class CatalogManager
return null; return null;
} }
/**
* Creates a new catalog page.
* @param caption The caption of the page.
* @param captionSave Save caption.
* @param roomId The id of the room if the page is a room bundle.
* @param icon The icon of the page.
* @param layout The layout of the page.
* @param minRank The minimum rank that is required to view the page.
* @param parentId The id of the parent page.
* @return The created CatalogPage.
*/
public CatalogPage createCatalogPage(String caption, String captionSave, int roomId, int icon, CatalogPageLayouts layout, int minRank, int parentId) public CatalogPage createCatalogPage(String caption, String captionSave, int roomId, int icon, CatalogPageLayouts layout, int minRank, int parentId)
{ {
CatalogPage catalogPage = null; CatalogPage catalogPage = null;
@ -933,10 +838,7 @@ public class CatalogManager
return catalogPage; return catalogPage;
} }
/**
* @param item The CatalogItem to find the limited configuration for.
* @return The limited configuration for the CatalogItem.
*/
public CatalogLimitedConfiguration getLimitedConfig(CatalogItem item) public CatalogLimitedConfiguration getLimitedConfig(CatalogItem item)
{ {
synchronized (this.limitedNumbers) synchronized (this.limitedNumbers)
@ -945,11 +847,7 @@ public class CatalogManager
} }
} }
/**
* Creates or updates the CatalogLimitedConfiguration for the given CatalogItem.
* @param item The CatalogItem to create or update hte CatalogLimitedConfiguration for.
* @return The created or updated CatalogLimitedConfiguration.
*/
public CatalogLimitedConfiguration createOrUpdateLimitedConfig(CatalogItem item) public CatalogLimitedConfiguration createOrUpdateLimitedConfig(CatalogItem item)
{ {
if (item.isLimited()) if (item.isLimited())
@ -987,9 +885,7 @@ public class CatalogManager
return null; return null;
} }
/**
* Disposes the CatalogManager.
*/
public void dispose() public void dispose()
{ {
TIntObjectIterator<CatalogPage> pageIterator = this.catalogPages.iterator(); TIntObjectIterator<CatalogPage> pageIterator = this.catalogPages.iterator();
@ -1011,15 +907,7 @@ public class CatalogManager
Emulator.getLogging().logShutdownLine("Catalog Manager -> Disposed!"); Emulator.getLogging().logShutdownLine("Catalog Manager -> Disposed!");
} }
/**
* Purchases a catalog item.
* @param page The page to purchase from.
* @param item The CatalogItem to purchase.
* @param habbo The Habbo that purchased this CatalogItem.
* @param amount The amount of times the item should be bought.
* @param extradata Any extradataassociated.
* @param free Determines if this purchase is free and thus no credits / points will be deducted.
*/
public void purchaseItem(CatalogPage page, CatalogItem item, Habbo habbo, int amount, String extradata, boolean free) public void purchaseItem(CatalogPage page, CatalogItem item, Habbo habbo, int amount, String extradata, boolean free)
{ {
Item cBaseItem = null; Item cBaseItem = null;
@ -1079,12 +967,7 @@ public class CatalogManager
THashSet<HabboItem> itemsList = new THashSet<HabboItem>(); THashSet<HabboItem> itemsList = new THashSet<HabboItem>();
/*
Scripting protection that prevents users from buying multiple items
when offer is not enabled for the item.
Automatically creates a new ModToolIssue and sends it to the online moderators.
*/
if(amount > 1 && !item.isHaveOffer()) if(amount > 1 && !item.isHaveOffer())
{ {
String message = Emulator.getTexts().getValue("scripter.warning.catalog.amount").replace("%username%", habbo.getHabboInfo().getUsername()).replace("%itemname%", item.getName()).replace("%pagename%", page.getCaption()); String message = Emulator.getTexts().getValue("scripter.warning.catalog.amount").replace("%username%", habbo.getHabboInfo().getUsername()).replace("%itemname%", item.getName()).replace("%pagename%", page.getCaption());

View File

@ -2,179 +2,109 @@ package com.eu.habbo.habbohotel.catalog;
public enum CatalogPageLayouts public enum CatalogPageLayouts
{ {
/**
* Default page, used most of the time.
*/
default_3x3, default_3x3,
/**
* The page that you can buy Guild furniture from.
*/
guild_furni, guild_furni,
/**
* The page that allows you to buy a Guild.
*/
guilds, guilds,
/**
* The page that allows you to buy a forum for your Guild.
*/
guild_forum, guild_forum,
/**
* The page with information about duckets.
*/
info_duckets, info_duckets,
/**
* The page with information about rentables.
*/
info_rentables, info_rentables,
/**
* The page with information about loyalty programme.
*/
info_loyalty, info_loyalty,
/**
* The page you can buy VIP with loyalty points.
*/
loyalty_vip_buy, loyalty_vip_buy,
/**
* The page where you can buy bots from.
*/
bots, bots,
/**
* Pets
*/
pets, pets,
/**
* Petss
*/
pets2, pets2,
/**
* Petsss
*/
pets3, pets3,
/**
* The page where you can claim club gifts.
*/
club_gift, club_gift,
/**
* The front page. Without it, there is nothing. /s
*/
frontpage, frontpage,
/**
* The page where you can buy those fancy badge displays.
*/
badge_display, badge_display,
/**
* The new spaces layout.
*/
spaces_new, spaces_new,
/**
* Trax
*/
soundmachine, soundmachine,
/**
* Info about pets.
*/
info_pets, info_pets,
/**
* The page where you can buy Habbo Club from.
*/
club_buy, club_buy,
/**
* Roomads are being sold here.
*/
roomads, roomads,
/**
* Trophies page.
*/
trophies, trophies,
/**
* Single bundle for single people.
*/
single_bundle, single_bundle,
/**
* The Marketplace.
*/
marketplace, marketplace,
/**
* Lists your own Marketplace items.
*/
marketplace_own_items, marketplace_own_items,
/**
* The Recycler (Or ecotron)
*/
recycler, recycler,
/**
* Info, for the people that don't know how to drag 'n drop.
*/
recycler_info, recycler_info,
/**
* All the rewards you can get from the Recycler (Or ecotron)
*/
recycler_prizes, recycler_prizes,
/**
* The page where all the sold out LTDs go.
*/
sold_ltd_items, sold_ltd_items,
/**
* This is gone in the newer PRODUCTION versions, unfortunately.
*/
plasto, plasto,
/**
* Color grouping using the default page.
*/
default_3x3_color_grouping, default_3x3_color_grouping,
/**
* Page where your recent purchases reside.
*/
recent_purchases, recent_purchases,
/**
* Room Bundles
*/
room_bundle, room_bundle,
/**
* Pet Customization like pet color dyes
*/
petcustomization, petcustomization,
/**
* Root page. Do not use!
*/
root, root,
/**
* The page where you can buy Habbo VIP from.
*/
vip_buy, vip_buy,
frontpage_featured, frontpage_featured,

View File

@ -2,13 +2,9 @@ package com.eu.habbo.habbohotel.catalog;
public enum CatalogPageType public enum CatalogPageType
{ {
/**
* NORMAL Catalog
*/
NORMAL, NORMAL,
/**
* BUILDER Catalog (Not implemented yet!)
*/
BUILDER BUILDER
} }

View File

@ -5,19 +5,13 @@ import java.sql.SQLException;
public class ClothItem public class ClothItem
{ {
/**
* Identifier.
*/
public int id; public int id;
/**
* Name
*/
public String name; public String name;
/**
* Set
*/
public int[] setId; public int[] setId;
public ClothItem(ResultSet set) throws SQLException public ClothItem(ResultSet set) throws SQLException

View File

@ -5,44 +5,28 @@ import java.sql.SQLException;
public class ClubOffer public class ClubOffer
{ {
/**
* Id of the offer.
*/
private final int id; private final int id;
/**
* Name of the offer
*/
private final String name; private final String name;
/**
* Total days
*/
private final int days; private final int days;
/**
* Price in credits.
*/
private final int credits; private final int credits;
/**
* Price in points.
*/
private final int points; private final int points;
/**
* Points type.
*/
private final int pointsType; private final int pointsType;
/**
* Is VIP (Legacy)
*/
private final boolean vip; private final boolean vip;
/**
* If the ClubOffer is an extension deal.
*/
private final boolean deal; private final boolean deal;
public ClubOffer(ResultSet set) throws SQLException public ClubOffer(ResultSet set) throws SQLException

View File

@ -5,41 +5,25 @@ import java.sql.SQLException;
public class Voucher public class Voucher
{ {
/**
* Voucher ID
*/
private final int id; private final int id;
/**
* Code
*/
public final String code; public final String code;
/**
* Reward credits.
*/
public final int credits; public final int credits;
/**
* Reward points.
*/
public final int points; public final int points;
/**
* Points type
*/
public final int pointsType; public final int pointsType;
/**
* Item from the catalog.
*/
public final int catalogItemId; public final int catalogItemId;
/**
* Constructs a new Voucher.
* @param set The ResultSet to read the data from.
* @throws SQLException
*/
public Voucher(ResultSet set) throws SQLException public Voucher(ResultSet set) throws SQLException
{ {
this.id = set.getInt("id"); this.id = set.getInt("id");

View File

@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Class for the interactive badge display catalog page.
*/
public class BadgeDisplayLayout extends CatalogPage public class BadgeDisplayLayout extends CatalogPage
{ {
public BadgeDisplayLayout(ResultSet set) throws SQLException public BadgeDisplayLayout(ResultSet set) throws SQLException

View File

@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Class for the bots page.
*/
public class BotsLayout extends CatalogPage public class BotsLayout extends CatalogPage
{ {
public BotsLayout(ResultSet set) throws SQLException public BotsLayout(ResultSet set) throws SQLException

View File

@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Class for the page where additional buildersclub addons can be bought.
*/
public class BuildersClubAddonsLayout extends CatalogPage public class BuildersClubAddonsLayout extends CatalogPage
{ {
public BuildersClubAddonsLayout(ResultSet set) throws SQLException public BuildersClubAddonsLayout(ResultSet set) throws SQLException

View File

@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Class for the frontpage of the buildersclub.
*/
public class BuildersClubFrontPageLayout extends CatalogPage public class BuildersClubFrontPageLayout extends CatalogPage
{ {
public BuildersClubFrontPageLayout(ResultSet set) throws SQLException public BuildersClubFrontPageLayout(ResultSet set) throws SQLException

View File

@ -6,9 +6,7 @@ import com.eu.habbo.messages.ServerMessage;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Class for the buildersclub rewards page.
*/
public class BuildersClubLoyaltyLayout extends CatalogPage public class BuildersClubLoyaltyLayout extends CatalogPage
{ {
public BuildersClubLoyaltyLayout(ResultSet set) throws SQLException public BuildersClubLoyaltyLayout(ResultSet set) throws SQLException

View File

@ -24,12 +24,7 @@ import java.sql.SQLException;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
* Note: A lot of data in here is not cached in the emulator but rather loaded from the database.
* If you have a big hotel and the marketplace is used frequently this may cause some lagg.
* If you have issues with that please let us know so we can see if we need to modify the Marketplace so
* it caches the data in the Emulator.
*/
public class MarketPlace public class MarketPlace
{ {
//Configuration. Loaded from database & updated accordingly. //Configuration. Loaded from database & updated accordingly.
@ -38,10 +33,7 @@ public class MarketPlace
//Currency to use. //Currency to use.
public static int MARKETPLACE_CURRENCY = 0; public static int MARKETPLACE_CURRENCY = 0;
/**
* @param habbo The Habbo to lookup items for.
* @return The items that are put on marketplace by the given Habbo.
*/
public static THashSet<MarketPlaceOffer> getOwnOffers(Habbo habbo) public static THashSet<MarketPlaceOffer> getOwnOffers(Habbo habbo)
{ {
THashSet<MarketPlaceOffer> offers = new THashSet<MarketPlaceOffer>(); THashSet<MarketPlaceOffer> offers = new THashSet<MarketPlaceOffer>();
@ -64,11 +56,7 @@ public class MarketPlace
return offers; return offers;
} }
/**
* Removes an offer from the marketplace.
* @param habbo The Habbo that owns the item.
* @param offerId The offer id.
*/
public static void takeBackItem(Habbo habbo, int offerId) public static void takeBackItem(Habbo habbo, int offerId)
{ {
MarketPlaceOffer offer = habbo.getInventory().getOffer(offerId); MarketPlaceOffer offer = habbo.getInventory().getOffer(offerId);
@ -79,11 +67,7 @@ public class MarketPlace
} }
} }
/**
* Removes an offer from the marketplace.
* @param habbo The Habbo that owns the item.
* @param offer The offer.
*/
private static void takeBackItem(Habbo habbo, MarketPlaceOffer offer) private static void takeBackItem(Habbo habbo, MarketPlaceOffer offer)
{ {
if(offer != null && habbo.getInventory().getMarketplaceItems().contains(offer)) if(offer != null && habbo.getInventory().getMarketplaceItems().contains(offer))
@ -147,34 +131,13 @@ public class MarketPlace
} }
} }
/**
* Searches the marketplace for specific items in the given price range.
* @param minPrice The minimum price of the offers.
* @param maxPrice The maximum price of the offers
* @param search The search criteria for the offers.
* @param sort The sort criteria for the offers.
* @return The result of the search.
*/
public static List<MarketPlaceOffer> getOffers(int minPrice, int maxPrice, String search, int sort) public static List<MarketPlaceOffer> getOffers(int minPrice, int maxPrice, String search, int sort)
{ {
List<MarketPlaceOffer> offers = new ArrayList<>(10); List<MarketPlaceOffer> offers = new ArrayList<>(10);
//String query = "SELECT items_base.type AS type, items.item_id AS base_item_id, items.limited_data AS ltd_data, marketplace_items.*, COUNT(*) as number, AVG(price) as avg, MIN(price) as minPrice FROM marketplace_items INNER JOIN items ON marketplace_items.item_id = items.id INNER JOIN items_base ON items.item_id = items_base.id WHERE state = ? AND timestamp >= ?"; //String query = "SELECT items_base.type AS type, items.item_id AS base_item_id, items.limited_data AS ltd_data, marketplace_items.*, COUNT(*) as number, AVG(price) as avg, MIN(price) as minPrice FROM marketplace_items INNER JOIN items ON marketplace_items.item_id = items.id INNER JOIN items_base ON items.item_id = items_base.id WHERE state = ? AND timestamp >= ?";
/*String query = "SELECT " +
"B.* FROM marketplace_items a " +
"INNER JOIN (SELECT " +
"items_base.type AS type, " +
"items.item_id AS base_item_id, " +
"items.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 " +
"FROM marketplace_items " +
"INNER JOIN items ON marketplace_items.item_id = items.id " +
"INNER JOIN items_base ON items.item_id = items_base.id " +
"WHERE state = 1 AND timestamp > ?";*/
String query = "SELECT " + String query = "SELECT " +
"B.* FROM marketplace_items a " + "B.* FROM marketplace_items a " +
@ -270,11 +233,7 @@ public class MarketPlace
return offers; return offers;
} }
/**
* Serializes the item info.
* @param itemId The item id that should be looked up.
* @param message The message the data should be appended to.
*/
public static void serializeItemInfo(int itemId, ServerMessage message) public static void serializeItemInfo(int itemId, ServerMessage message)
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT avg(price) as price, COUNT(*) as sold, (datediff(NOW(), DATE(from_unixtime(timestamp)))) as day FROM marketplace_items INNER JOIN items ON items.id = marketplace_items.item_id INNER JOIN items_base ON items.item_id = items_base.id WHERE items.limited_data = '0:0' AND state = 2 AND items_base.sprite_id = ? AND DATE(from_unixtime(timestamp)) >= NOW() - INTERVAL 30 DAY GROUP BY DATE(from_unixtime(timestamp))")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT avg(price) as price, COUNT(*) as sold, (datediff(NOW(), DATE(from_unixtime(timestamp)))) as day FROM marketplace_items INNER JOIN items ON items.id = marketplace_items.item_id INNER JOIN items_base ON items.item_id = items_base.id WHERE items.limited_data = '0:0' AND state = 2 AND items_base.sprite_id = ? AND DATE(from_unixtime(timestamp)) >= NOW() - INTERVAL 30 DAY GROUP BY DATE(from_unixtime(timestamp))"))
@ -308,10 +267,7 @@ public class MarketPlace
} }
} }
/**
* @param baseItemId The base item id that should be looked up. (items_base table)
* @return The amount of items of this type are on sale.
*/
public static int itemsOnSale(int baseItemId) public static int itemsOnSale(int baseItemId)
{ {
int number = 0; int number = 0;
@ -333,11 +289,7 @@ public class MarketPlace
return number; return number;
} }
/**
* @param baseItemId The base item id that should be looked up. (items_base table)
* @param days The amount of days.
* @return The average amount of coins this item was over the given amount of days.
*/
private static int avarageLastXDays(int baseItemId, int days) private static int avarageLastXDays(int baseItemId, int days)
{ {
int avg = 0; int avg = 0;
@ -360,11 +312,7 @@ public class MarketPlace
return calculateCommision(avg); return calculateCommision(avg);
} }
/**
* Buys an item from the marketplace.
* @param offerId The offer id that should be bought.
* @param client The GameClient that buys it.
*/
public static void buyItem(int offerId, GameClient client) public static void buyItem(int offerId, GameClient client)
{ {
RequestOffersEvent.cachedResults.clear(); RequestOffersEvent.cachedResults.clear();
@ -451,14 +399,7 @@ public class MarketPlace
} }
} }
/**
* Sends an error message to the client. If the items was sold out or
* if the previous one isn't on sale anymore then it shows the new price.
* @param client The GameClient the messages should be send to.
* @param baseItemId The Item id data selected from the marketplace_offers table.
* @param offerId The id of the offer that was bought.
* @throws SQLException
*/
public static void sendErrorMessage(GameClient client, int baseItemId, int offerId) throws SQLException public static void sendErrorMessage(GameClient client, int baseItemId, int offerId) throws SQLException
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT marketplace_items.*, COUNT( * ) AS count\n" + try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("SELECT marketplace_items.*, COUNT( * ) AS count\n" +
@ -487,13 +428,7 @@ public class MarketPlace
} }
} }
/**
* Sells an item to the marketplace.
* @param client The GameClient that sells it.
* @param item The HabboItem that is being sold.
* @param price The price it is being sold for.
* @return Whether it has succesfully been posted to the marketplace.
*/
public static boolean sellItem(GameClient client, HabboItem item, int price) public static boolean sellItem(GameClient client, HabboItem item, int price)
{ {
if(item == null || client == null) if(item == null || client == null)
@ -533,10 +468,7 @@ public class MarketPlace
return true; return true;
} }
/**
* Claims all the credits that are gained from selling items on the marketplace.
* @param client The GameClient the credits should be checked for.
*/
public static void getCredits(GameClient client) public static void getCredits(GameClient client)
{ {
int credits = 0; int credits = 0;
@ -583,11 +515,7 @@ public class MarketPlace
} }
} }
/**
* Calculates the commission that is being added for the given price.
* @param price The price to calculate the commission for.
* @return The new price including the commission.
*/
public static int calculateCommision(int price) public static int calculateCommision(int price)
{ {
return price + (int)Math.ceil(price / 100.0); return price + (int)Math.ceil(price / 100.0);

View File

@ -2,20 +2,13 @@ package com.eu.habbo.habbohotel.catalog.marketplace;
public enum MarketPlaceState public enum MarketPlaceState
{ {
/**
* When the offer is available to be bought.
*/
OPEN(1), OPEN(1),
/**
* When the offer has been sold.
*/
SOLD(2), SOLD(2),
/**
* When the offer has been expired.
* When the offer has been cancelled.
*/
CLOSED(3); CLOSED(3);
private final int state; private final int state;
@ -30,11 +23,7 @@ public enum MarketPlaceState
return this.state; return this.state;
} }
/**
* Gets the offer state for the type.
* @param type The type to look for.
* @return The offer state defaults to CLOSED
*/
public static MarketPlaceState getType(int type) public static MarketPlaceState getType(int type)
{ {
switch(type) switch(type)

View File

@ -7,11 +7,7 @@ import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
/**
* This is part of the open source license. Modification is prohobited.
* If you don't like it, use another emulator. Or otherwise deal with it.
* Respect the authors work. Don't be a dick.
*/
public class AboutCommand extends Command public class AboutCommand extends Command
{ {
public AboutCommand() public AboutCommand()

View File

@ -4,18 +4,10 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
public abstract class Command public abstract class Command
{ {
/**
* Permission string the executor must have in order to access the command.
*/
public final String permission; public final String permission;
/**
* All keys the command can be exectuted from.
* <p>
* Example:
* :<b>userinfo</b> TheGeneral
* </p>
*/
public final String[] keys; public final String[] keys;
public Command(String permission, String[] keys) public Command(String permission, String[] keys)
@ -24,12 +16,6 @@ public abstract class Command
this.keys = keys; this.keys = keys;
} }
/**
* Executes an command for a given gameClient.
* @param gameClient The GameClient who executes the command.
* @param params Array of parameters given in the command.
* @return Returns true if the user should <b>NOT</b> say anything in the room.
* @throws Exception
*/
public abstract boolean handle(GameClient gameClient, String[] params) throws Exception; public abstract boolean handle(GameClient gameClient, String[] params) throws Exception;
} }

View File

@ -140,10 +140,7 @@ public class CommandHandler
addCommand(new TestCommand()); addCommand(new TestCommand());
} }
/**
* Adds a new command to the commands list.
* @param command The command to be added.
*/
public static void addCommand(Command command) public static void addCommand(Command command)
{ {
if(command == null) if(command == null)
@ -152,10 +149,7 @@ public class CommandHandler
commands.put(command.getClass().getName(), command); commands.put(command.getClass().getName(), command);
} }
/**
* Adds a new command to the commands list.
* @param command The command class to be added.
*/
public static void addCommand(Class<? extends Command> command) public static void addCommand(Class<? extends Command> command)
{ {
try try
@ -170,13 +164,7 @@ public class CommandHandler
} }
} }
/**
* Handles a command executed by the connected GameClient.
* This includes handling the petcommands aswell.
* @param gameClient The GameClient that executed the command.
* @param commandLine The whole sentence the GameClient used including the start:
* @return Wether the command has been succesfully executed.
*/
public static boolean handleCommand(GameClient gameClient, String commandLine) public static boolean handleCommand(GameClient gameClient, String commandLine)
{ {
if(gameClient != null) if(gameClient != null)
@ -290,11 +278,7 @@ public class CommandHandler
return false; return false;
} }
/**
* Returns an arraylist of all commands that the given rank has access to based on the permissions that have been set.
* @param rankId The rank ID to search commands for.
* @return ArrayList of commands.
*/
public List<Command> getCommandsForRank(int rankId) public List<Command> getCommandsForRank(int rankId)
{ {
List<Command> allowedCommands = new ArrayList<Command>(); List<Command> allowedCommands = new ArrayList<Command>();
@ -335,9 +319,7 @@ public class CommandHandler
return null; return null;
} }
/**
* Disposes the CommandHandler.
*/
public void dispose() public void dispose()
{ {
commands.clear(); commands.clear();
@ -345,9 +327,7 @@ public class CommandHandler
Emulator.getLogging().logShutdownLine("Command Handler -> Disposed!"); Emulator.getLogging().logShutdownLine("Command Handler -> Disposed!");
} }
/**
* Sort all commands based on their permission in alphabetical order.
*/
private static final Comparator<Command> ALPHABETICAL_ORDER = new Comparator<Command>() { private static final Comparator<Command> ALPHABETICAL_ORDER = new Comparator<Command>() {
public int compare(Command c1, Command c2) { public int compare(Command c1, Command c2) {
int res = String.CASE_INSENSITIVE_ORDER.compare(c1.permission, c2.permission); int res = String.CASE_INSENSITIVE_ORDER.compare(c1.permission, c2.permission);

View File

@ -5,9 +5,7 @@ import com.eu.habbo.habbohotel.gameclients.GameClient;
import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer; import com.eu.habbo.messages.outgoing.rooms.users.RoomUserDataComposer;
import com.eu.habbo.messages.outgoing.users.UpdateUserLookComposer; import com.eu.habbo.messages.outgoing.users.UpdateUserLookComposer;
/**
* Kudos to Wouto on RaGEZONE
*/
public class FacelessCommand extends Command public class FacelessCommand extends Command
{ {
public FacelessCommand() public FacelessCommand()

View File

@ -452,100 +452,13 @@ public class TestCommand extends Command
} }
/*if(params[1].equalsIgnoreCase("r"))
{
gameClient.getHabbo().getRoomUnit().getStatus().remove(params[2]);
return true;
}
String s = "";
for(int i = 2; i < params.length; i++)
{
s+= params[i];
if(i + 1 < params.length)
{
s+= " ";
}
}
gameClient.getHabbo().getRoomUnit().getStatus().put(params[1], s);
gameClient.getHabbo().getHabboInfo().getCurrentRoom().sendComposer(new RoomUserStatusComposer(gameClient.getHabbo().getRoomUnit()).compose());*/
//if(params.length >= 2) //if(params.length >= 2)
//{ //{
// gameClient.sendResponse(new RoomUserActionComposer(gameClient.getHabbo().getRoomUnit(), Integer.valueOf(params[1]))); // gameClient.sendResponse(new RoomUserActionComposer(gameClient.getHabbo().getRoomUnit(), Integer.valueOf(params[1])));
//} //}
/*if(params.length < 2)
return false;
/*
:test 1604 i:0 s:a i:1 i:2 i:3 i: 4 s:b i:3 i:1 i:1 s:Admin s:a s:M i:0 i:0 i:0 i:0
if(params[1].equalsIgnoreCase("purple"))
{
AbstractPet pet = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getPet(13);
if(pet instanceof Pet)
{
String a = "";
String b = "";
String c = "";
if(params[2] != null)
{
a = params[2];
if(params.length >= 4)
{
b = params[3];
}
if(params.length >= 5)
{
c = params[4];
}
pet.getRoomUnit().getStatus().put(a, b + " " + c);
gameClient.sendResponse(new RoomUserStatusComposer(pet.getRoomUnit()));
}
}
}
else if(params[1].equalsIgnoreCase("clear"))
{
AbstractPet pet = gameClient.getHabbo().getHabboInfo().getCurrentRoom().getPet(13);
if(pet instanceof Pet)
{
pet.getRoomUnit().getStatus().clear();
gameClient.sendResponse(new RoomUserStatusComposer(pet.getRoomUnit()));
}
}
else if(params[1].equalsIgnoreCase("club"))
{
gameClient.sendResponse(new ClubDataComposer(gameClient.getHabbo(), Integer.valueOf(params[2])));
return true;
}
int header = Integer.valueOf(params[1]);
ServerMessage message = new ServerMessage();
message.init(header);
for (int i = 2; i < params.length; i++)
{
String[] data = params[i].split(":");
System.out.println(data.length + "//");
if (data[0].equals("i"))
{
message.appendInt(Integer.valueOf(data[1]));
} else if (data[0].equals("s"))
{
if(data[1].equalsIgnoreCase("%look%"))
{
data[1] = gameClient.getHabbo().getHabboInfo().getLook();
}
message.appendString(data[1]);
} else if (data[0].equals("b"))
{
message.appendBoolean(data[1].equalsIgnoreCase("1"));
}
}
gameClient.sendResponse(message);*/
//} //}
//int header = Integer.valueOf(params[1]); //int header = Integer.valueOf(params[1]);
@ -559,28 +472,7 @@ public class TestCommand extends Command
//gameClient.sendResponse(new SnowWarsCompose1(1604)); //gameClient.sendResponse(new SnowWarsCompose1(1604));
//gameClient.sendResponse(new SnowWarsLevelDataComposer()); //gameClient.sendResponse(new SnowWarsLevelDataComposer());
/*
ServerMessage response = new ServerMessage();
response.init(Outgoing.RoomUsersComposer);
response.appendInt(1);
response.appendInt(0);
response.appendString("");
response.appendString("");
response.appendString("");
response.appendInt(0); //Room Unit ID
response.appendInt(10);
response.appendInt(10);
response.appendString("");
response.appendInt(0);
response.appendInt(200);
response.appendString(this.habbo.getHabboInfo().getGender());
response.appendInt(this.habbo.getHabboStats().guild != 0 ? this.habbo.getHabboStats().guild : -1);
response.appendInt(this.habbo.getHabboStats().guild != 0 ? 1 : -1);
response.appendString(this.habbo.getHabboStats().guild != 0 ? Emulator.getGameEnvironment().getGuildManager().getGuild(this.habbo.getHabboStats().guild).getName() : "");
response.appendString("");
response.appendInt(this.habbo.getHabboInfo().getAchievementScore());
response.appendBoolean(true);
}*/
return true; return true;
} }

View File

@ -13,11 +13,7 @@ import java.util.Map;
public class CraftingManager public class CraftingManager
{ {
/*
crafting_altars_recipes
crafting_recipes
crafting_recipes_ingredients
*/
private final THashMap<Item, CraftingAltar> altars; private final THashMap<Item, CraftingAltar> altars;
public CraftingManager() public CraftingManager()

View File

@ -20,19 +20,13 @@ import java.util.ArrayList;
public class GameClient public class GameClient
{ {
/**
* The Channel this client is using.
*/
private final Channel channel; private final Channel channel;
/**
* The Habbo it is linked to.
*/
private Habbo habbo; private Habbo habbo;
/**
* The MAC Address of the connected client.
*/
private String machineId = ""; private String machineId = "";
public GameClient(Channel channel) public GameClient(Channel channel)
@ -40,10 +34,7 @@ public class GameClient
this.channel = channel; this.channel = channel;
} }
/**
* Sends an composer to the client.
* @param composer The composer to send.
*/
public void sendResponse(MessageComposer composer) public void sendResponse(MessageComposer composer)
{ {
if(this.channel.isOpen()) if(this.channel.isOpen())
@ -59,10 +50,7 @@ public class GameClient
} }
} }
/**
* Sends an response to the client.
* @param response The response to send.
*/
public void sendResponse(ServerMessage response) public void sendResponse(ServerMessage response)
{ {
if(this.channel.isOpen()) if(this.channel.isOpen())
@ -80,10 +68,7 @@ public class GameClient
} }
} }
/**
* Sends multiple responses to the client.
* @param responses The responses to send.
*/
public void sendResponses(ArrayList<ServerMessage> responses) public void sendResponses(ArrayList<ServerMessage> responses)
{ {
ByteBuf buffer = Unpooled.buffer(); ByteBuf buffer = Unpooled.buffer();
@ -108,9 +93,7 @@ public class GameClient
buffer.release(); buffer.release();
} }
/**
* Disposes the client. Disconnection mostly.
*/
public void dispose() public void dispose()
{ {
try try

View File

@ -20,44 +20,28 @@ import java.util.Map;
public abstract class Game implements Runnable public abstract class Game implements Runnable
{ {
/**
* The class that should be used that defines teams.
*/
public final Class<? extends GameTeam> gameTeamClazz; public final Class<? extends GameTeam> gameTeamClazz;
/**
* The class that should be used that defines a player.
*/
public final Class<? extends GamePlayer> gamePlayerClazz; public final Class<? extends GamePlayer> gamePlayerClazz;
/**
* All the teams.
*/
protected final THashMap<GameTeamColors, GameTeam> teams = new THashMap<GameTeamColors, GameTeam>(); protected final THashMap<GameTeamColors, GameTeam> teams = new THashMap<GameTeamColors, GameTeam>();
/**
* The room this game is affected by.
*/
protected Room room; protected Room room;
/**
* Should this game progress any achievements.
*/
protected boolean countsAchievements; protected boolean countsAchievements;
/**
* Time the game started.
*/
protected int startTime; protected int startTime;
/**
* Time the game ended.
*/
protected int endTime; protected int endTime;
/**
* Wether the game is running.
*/
public boolean isRunning; public boolean isRunning;
public Game(Class<? extends GameTeam> gameTeamClazz, Class<? extends GamePlayer> gamePlayerClazz, Room room, boolean countsAchievements) public Game(Class<? extends GameTeam> gameTeamClazz, Class<? extends GamePlayer> gamePlayerClazz, Room room, boolean countsAchievements)
@ -68,19 +52,10 @@ public abstract class Game implements Runnable
this.countsAchievements = countsAchievements; this.countsAchievements = countsAchievements;
} }
/**
* Should reset the game to it's default state and call start() when done initialising.
* Only call start if you need to start a game.
*/
public abstract void initialise(); public abstract void initialise();
/**
* When overridden call super first!
* Adds a particular Habbo to a specific team.
* @param habbo The Habbo to add to an team.
* @param teamColor The teamcolor to add the Habbo too.
* @return True when user has joined the game.
*/
public boolean addHabbo(Habbo habbo, GameTeamColors teamColor) public boolean addHabbo(Habbo habbo, GameTeamColors teamColor)
{ {
try try
@ -121,14 +96,7 @@ public abstract class Game implements Runnable
return false; return false;
} }
/**
* When overridden call super first!
* Removes an Habbo when the following events occur:
* <li>The Habbo gets disconnected.</li>
* <li>The Habbo leaves the room.</li>
* <li>The Habbo triggers leave team wired.</li>
* @param habbo The Habbo to be removed.
*/
public void removeHabbo(Habbo habbo) public void removeHabbo(Habbo habbo)
{ {
if (habbo != null) if (habbo != null)
@ -172,10 +140,7 @@ public abstract class Game implements Runnable
} }
} }
/**
* This method should start a game. Make sure to call super.start()
* to register the time the game was started.
*/
public void start() public void start()
{ {
this.isRunning = true; this.isRunning = true;
@ -190,18 +155,10 @@ public abstract class Game implements Runnable
WiredHandler.handle(WiredTriggerType.GAME_STARTS, null, this.room, new Object[]{this}); WiredHandler.handle(WiredTriggerType.GAME_STARTS, null, this.room, new Object[]{this});
} }
/**
* Main game loop.
*/
public abstract void run(); public abstract void run();
/**
* Should stop the game.
*
* Called upon room unload or when the timer runs out.
*
* Make sure to call super.stop() when overriden to save the scores to the database.
*/
public void stop() public void stop()
{ {
this.isRunning = false; this.isRunning = false;
@ -223,11 +180,7 @@ public abstract class Game implements Runnable
} }
} }
/**
* Saves all scores to the game.
* Used for the Wired Highscores.
* Must have set the room.
*/
private void saveScores() private void saveScores()
{ {
if(this.room == null) if(this.room == null)
@ -239,11 +192,7 @@ public abstract class Game implements Runnable
} }
} }
/**
* Gets the team for the given Habbo.
* @param habbo The Habbo to look for the team.
* @return The team the Habbo is in.
*/
public GameTeam getTeamForHabbo(Habbo habbo) public GameTeam getTeamForHabbo(Habbo habbo)
{ {
if(habbo != null) if(habbo != null)
@ -263,11 +212,7 @@ public abstract class Game implements Runnable
return null; return null;
} }
/**
* Get the team by the team color.
* @param teamColor The teamcolor to look up.
* @return The team for the given team color.
*/
public GameTeam getTeam(GameTeamColors teamColor) public GameTeam getTeam(GameTeamColors teamColor)
{ {
synchronized (this.teams) synchronized (this.teams)
@ -276,11 +221,7 @@ public abstract class Game implements Runnable
} }
} }
/**
* Adds a new team to the game.
* Note: Overwrites any existing team for the team.teamColor
* @param team The team to add.
*/
public void addTeam(GameTeam team) public void addTeam(GameTeam team)
{ {
synchronized (this.teams) synchronized (this.teams)
@ -289,34 +230,25 @@ public abstract class Game implements Runnable
} }
} }
/**
* @return The room this game is affected by.
*/
public Room getRoom() public Room getRoom()
{ {
return this.room; return this.room;
} }
/**
* @return The time the game was started.
*/
public int getStartTime() public int getStartTime()
{ {
return this.startTime; return this.startTime;
} }
/**
* @return Last time this game ended.
*/
public int getEndTime() public int getEndTime()
{ {
return this.endTime; return this.endTime;
} }
/**
* Adds time to the current game.
* @param time The amount of time to add.
*/
public void addTime(int time) public void addTime(int time)
{ {
this.endTime += time; this.endTime += time;

View File

@ -6,76 +6,48 @@ import com.eu.habbo.habbohotel.wired.WiredTriggerType;
public class GamePlayer public class GamePlayer
{ {
/**
* The Habbo that is linked to the game player.
*/
private Habbo habbo; private Habbo habbo;
/**
* The team color of this player.
*/
private GameTeamColors teamColor; private GameTeamColors teamColor;
/**
* The score of this player.
*
* This score gets saved at the end of a game for the Wired HighScore furniture.
*/
private int score; private int score;
/**
* Creates a new GamePlayer for the given Habbo and it's team.
* @param habbo The Habbo who is linked to this GamePlayer.
* @param teamColor The team the GamePlayer is in.
*/
public GamePlayer(Habbo habbo, GameTeamColors teamColor) public GamePlayer(Habbo habbo, GameTeamColors teamColor)
{ {
this.habbo = habbo; this.habbo = habbo;
this.teamColor = teamColor; this.teamColor = teamColor;
} }
/**
* Resets the GamePlayer object to it's 'default' state.
* This method will be called by the emulator:
* <ul>
* <li>The game starts.</li>
* <li>The game ends.</li>
* </ul>
*/
public void reset() public void reset()
{ {
this.score = 0; this.score = 0;
} }
/**
* Adds an given amount of score to this object.
* @param amount The amount of score to add.
*/
public synchronized void addScore(int amount) public synchronized void addScore(int amount)
{ {
this.score += amount; this.score += amount;
WiredHandler.handle(WiredTriggerType.SCORE_ACHIEVED, null, this.habbo.getHabboInfo().getCurrentRoom(), new Object[]{this.habbo.getHabboInfo().getCurrentRoom().getGame(this.habbo.getHabboInfo().getCurrentGame()).getTeamForHabbo(this.habbo).getTotalScore(), amount}); WiredHandler.handle(WiredTriggerType.SCORE_ACHIEVED, null, this.habbo.getHabboInfo().getCurrentRoom(), new Object[]{this.habbo.getHabboInfo().getCurrentRoom().getGame(this.habbo.getHabboInfo().getCurrentGame()).getTeamForHabbo(this.habbo).getTotalScore(), amount});
} }
/**
* @return The Habbo linked to this object.
*/
public Habbo getHabbo() public Habbo getHabbo()
{ {
return this.habbo; return this.habbo;
} }
/**
* @return The GameTeamColor for this object.
*/
public GameTeamColors getTeamColor() public GameTeamColors getTeamColor()
{ {
return this.teamColor; return this.teamColor;
} }
/**
* @return The score amount for this object.
*/
public int getScore() public int getScore()
{ {
return this.score; return this.score;

View File

@ -8,25 +8,16 @@ import gnu.trove.set.hash.THashSet;
public class GameTeam public class GameTeam
{ {
/**
* List of all players in this team.
*/
private final THashSet<GamePlayer> members; private final THashSet<GamePlayer> members;
/**
* The team color of this team.
*/
public final GameTeamColors teamColor; public final GameTeamColors teamColor;
/**
* The total score of this team.
*/
private int teamScore; private int teamScore;
/**
* Creates an new GameTeam with the given team color.
* @param teamColor The team color this GameTeam is identified by.
*/
public GameTeam(GameTeamColors teamColor) public GameTeam(GameTeamColors teamColor)
{ {
this.teamColor = teamColor; this.teamColor = teamColor;
@ -34,9 +25,7 @@ public class GameTeam
this.members = new THashSet<GamePlayer>(); this.members = new THashSet<GamePlayer>();
} }
/**
* Initialises the team and resets each player to it's default state.
*/
public void initialise() public void initialise()
{ {
for(GamePlayer player : this.members) for(GamePlayer player : this.members)
@ -47,34 +36,25 @@ public class GameTeam
this.teamScore = 0; this.teamScore = 0;
} }
/**
* Resets this team by clearing all members in the team.
*/
public void reset() public void reset()
{ {
this.members.clear(); this.members.clear();
} }
/**
* Adds an given amount of score to the team score.
* @param teamScore The amount of score that will be added.
*/
public void addTeamScore(int teamScore) public void addTeamScore(int teamScore)
{ {
this.teamScore += teamScore; this.teamScore += teamScore;
} }
/**
* @return The team score of this team.
*/
public int getTeamScore() public int getTeamScore()
{ {
return this.teamScore; return this.teamScore;
} }
/**
* @return The sum of each team members score + the team score.
*/
public synchronized int getTotalScore() public synchronized int getTotalScore()
{ {
int score = this.teamScore; int score = this.teamScore;
@ -87,10 +67,7 @@ public class GameTeam
return score; return score;
} }
/**
* Adds an GamePlayer to the team.
* @param gamePlayer The GamePlayer that needs to be added.
*/
public void addMember(GamePlayer gamePlayer) public void addMember(GamePlayer gamePlayer)
{ {
synchronized (this.members) synchronized (this.members)
@ -99,10 +76,7 @@ public class GameTeam
} }
} }
/**
* Removes an GamePlayer from the team.
* @param gamePlayer The GamePlayer that needs to be removed.
*/
public void removeMember(GamePlayer gamePlayer) public void removeMember(GamePlayer gamePlayer)
{ {
synchronized (this.members) synchronized (this.members)
@ -111,19 +85,13 @@ public class GameTeam
} }
} }
/**
* @return An collection of all GamePlayers.
*/
public THashSet<GamePlayer> getMembers() public THashSet<GamePlayer> getMembers()
{ {
return this.members; return this.members;
} }
/**
* Checks wether the given Habbo is part of this team.
* @param habbo The habbo to check.
* @return True when the given Habbo is part of the team.
*/
public boolean isMember(Habbo habbo) public boolean isMember(Habbo habbo)
{ {
for(GamePlayer p : this.members) for(GamePlayer p : this.members)
@ -137,11 +105,7 @@ public class GameTeam
return false; return false;
} }
/**
* Gets the GamePlayer object for the given Habbo.
* @param habbo The habbo to get the GamePlayer object for.
* @return The GamePlayer for the given Habbo. If not present returns null.
*/
@Deprecated @Deprecated
public GamePlayer getPlayerForHabbo(Habbo habbo) public GamePlayer getPlayerForHabbo(Habbo habbo)
{ {

View File

@ -2,29 +2,19 @@ package com.eu.habbo.habbohotel.games;
public enum GameTeamColors public enum GameTeamColors
{ {
/**
* Team Red.
*/
RED(0), RED(0),
/**
* Team Green.
*/
GREEN(1), GREEN(1),
/**
* Team Blue.
*/
BLUE(2), BLUE(2),
/**
* Team Yellow.
*/
YELLOW(3), YELLOW(3),
/**
* Additional GameTeamColors
*/
NONE(4), NONE(4),
ONE(5), ONE(5),
@ -38,9 +28,7 @@ public enum GameTeamColors
NINE(13), NINE(13),
TEN(14); TEN(14);
/**
* The type of the TeamColor. Aka identifier.
*/
public final int type; public final int type;
GameTeamColors(int type) GameTeamColors(int type)

View File

@ -31,24 +31,16 @@ import java.util.Map;
public class BattleBanzaiGame extends Game public class BattleBanzaiGame extends Game
{ {
/**
* The effect id BB effects start at.
*/
public static final int effectId = 33; public static final int effectId = 33;
/**
* Points for hijacking another users tile.
*/
public static final int POINTS_HIJACK_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.steal"); public static final int POINTS_HIJACK_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.steal");
/**
* Points for coloring a grey tile.
*/
public static final int POINTS_FILL_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.fill"); public static final int POINTS_FILL_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.fill");
/**
* Points for locking a tile.
*/
public static final int POINTS_LOCK_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.lock"); public static final int POINTS_LOCK_TILE = Emulator.getConfig().getInt("hotel.banzai.points.tile.lock");
private int timeLeft; private int timeLeft;
@ -57,9 +49,7 @@ public class BattleBanzaiGame extends Game
private int countDown; private int countDown;
/**
* All locked tiles.
*/
private final THashMap<GameTeamColors, THashSet<HabboItem>> lockedTiles; private final THashMap<GameTeamColors, THashSet<HabboItem>> lockedTiles;
public BattleBanzaiGame(Room room) public BattleBanzaiGame(Room room)
@ -285,9 +275,7 @@ public class BattleBanzaiGame extends Game
this.lockedTiles.clear(); this.lockedTiles.clear();
} }
/**
* Resets the map.
*/
protected synchronized void resetMap() protected synchronized void resetMap()
{ {
for (HabboItem item : this.room.getFloorItems()) for (HabboItem item : this.room.getFloorItems())
@ -342,11 +330,7 @@ public class BattleBanzaiGame extends Game
} }
} }
/**
* Locks an tile
* @param teamColor The color to lock.
* @param item The item to lock.
*/
public void tileLocked(GameTeamColors teamColor, HabboItem item, Habbo habbo) public void tileLocked(GameTeamColors teamColor, HabboItem item, Habbo habbo)
{ {
if(item instanceof InteractionBattleBanzaiTile) if(item instanceof InteractionBattleBanzaiTile)
@ -365,9 +349,7 @@ public class BattleBanzaiGame extends Game
} }
} }
/**
* Updates the counters in the room.
*/
public void refreshCounters() public void refreshCounters()
{ {
for(GameTeam team : this.teams.values()) for(GameTeam team : this.teams.values())
@ -379,10 +361,7 @@ public class BattleBanzaiGame extends Game
} }
} }
/**
* Updates the counters for the given GameTeamColors in the room.
* @param teamColors The color that should be updated.
*/
public void refreshCounters(GameTeamColors teamColors) public void refreshCounters(GameTeamColors teamColors)
{ {
int totalScore = this.teams.get(teamColors).getTotalScore(); int totalScore = this.teams.get(teamColors).getTotalScore();

View File

@ -13,9 +13,7 @@ import com.eu.habbo.messages.outgoing.rooms.users.RoomUserActionComposer;
import java.util.Map; import java.util.Map;
/**
* Thanks to Beny for adding football game to Arcturus!
*/
public class FootballGame extends Game public class FootballGame extends Game
{ {
private Room room; private Room room;

View File

@ -51,9 +51,7 @@ public class FreezeGamePlayer extends GamePlayer
} }
} }
/*
Freeze
*/
public void addLife() public void addLife()
{ {
if(this.lives < FreezeGame.MAX_LIVES) if(this.lives < FreezeGame.MAX_LIVES)

View File

@ -5,161 +5,7 @@ import com.eu.habbo.habbohotel.items.interactions.games.tag.InteractionTagPole;
import com.eu.habbo.habbohotel.items.interactions.games.tag.icetag.InteractionIceTagPole; import com.eu.habbo.habbohotel.items.interactions.games.tag.icetag.InteractionIceTagPole;
import com.eu.habbo.habbohotel.rooms.Room; import com.eu.habbo.habbohotel.rooms.Room;
/*public class IceTagGame extends Game
{
private static final int MALE_SKATES = 38;
private static final int FEMALE_SKATES = 39;
public boolean hasIceTagGame = false;
public IceTagGame(Room room) throws Exception
{
super(null, null, room);
}
@Override
public void initialise()
{
}
@Override
public boolean addHabbo(Habbo habbo, GameTeamColors teamColor)
{
return super.addHabbo(habbo, teamColor);
}
@Override
public void removeHabbo(Habbo habbo)
{
}
@Override
public void start()
{
}
@Override
public void run()
{
}
@Override
public void stop()
{
}
@EventHandler
public static void onUserLookAtPoint(RoomUnitLookAtPointEvent event)
{
if(!isValidEffect(event.roomUnit.getEffectId()))
return;
Room room = event.room;
Habbo h = event.room.getHabbo(event.roomUnit);
boolean found = false;
if (room != null && h != null)
{
for(Habbo habbo : room.getCurrentHabbos().valueCollection())
{
if(habbo.getRoomUnit().getEffectId() == (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES + 7 : FEMALE_SKATES + 7))
found = true;
}
if(!found)
{
room.giveEffect(h, (h.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES) + 7);
return;
}
THashSet<HabboItem> items = room.getRoomSpecialTypes().getItemsOfType(InteractionTagPole.class);
if(items.isEmpty())
return;
if(PathFinder.tilesAdjecent(event.location.X, event.location.Y, h.getRoomUnit().getX(), h.getRoomUnit().getY()))
{
if (h.getRoomUnit().getEffectId() == (h.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES + 7 : FEMALE_SKATES + 7))
{
boolean affectedHabbo = false;
for (Habbo habbo : room.getHabbosAt(event.location))
{
if (habbo == h)
continue;
if (habbo.getRoomUnit().getEffectId() == (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES))
{
room.giveEffect(habbo, (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES) + 7);
room.giveEffect(h, (habbo.getHabboInfo().getGender().equals(HabboGender.M) ? MALE_SKATES : FEMALE_SKATES));
}
affectedHabbo = true;
break;
}
if (affectedHabbo)
{
for (HabboItem item : items)
{
item.setExtradata("1");
room.updateItem(item);
Emulator.getThreading().run(new HabboItemNewState(item, room, "0"), 1000);
}
}
}
}
}
}
@EventHandler
public static void onUserWalkEvent(UserTakeStepEvent event)
{
if (event.habbo.getHabboInfo().getCurrentGame() == IceTagGame.class)
{
}
else
{
THashSet<InteractionIceTagIce>
}
}
private static boolean isValidEffect(int effectId)
{
if(effectId == MALE_SKATES)
return true;
if(effectId == FEMALE_SKATES)
return true;
if(effectId - 7 == MALE_SKATES)
return true;
if (effectId - 7 == FEMALE_SKATES)
return true;
return false;
}
private static boolean hasValidEffect(Habbo habbo)
{
if (habbo.getHabboInfo().getGender().equals(HabboGender.M))
{
return habbo.getRoomUnit().getEffectId() == MALE_SKATES || habbo.getRoomUnit().getEffectId() - 7 == MALE_SKATES;
}
else
{
return habbo.getRoomUnit().getEffectId() == FEMALE_SKATES || habbo.getRoomUnit().getEffectId() - 7 == FEMALE_SKATES;
}
}
}
*/
public class IceTagGame extends TagGame public class IceTagGame extends TagGame
{ {

View File

@ -6,12 +6,7 @@ import com.eu.habbo.habbohotel.users.Habbo;
public class TagGamePlayer extends GamePlayer public class TagGamePlayer extends GamePlayer
{ {
/**
* Creates a new GamePlayer for the given Habbo and it's team.
*
* @param habbo The Habbo who is linked to this GamePlayer.
* @param teamColor The team the GamePlayer is in.
*/
public TagGamePlayer(Habbo habbo, GameTeamColors teamColor) public TagGamePlayer(Habbo habbo, GameTeamColors teamColor)
{ {
super(habbo, teamColor); super(habbo, teamColor);

View File

@ -39,10 +39,7 @@ public class GuardianTicket
this.date = new Date(); this.date = new Date();
} }
/**
* Requests an Guardian to vote on this ticket.
* @param guardian The Guardian to ask.
*/
public void requestToVote(Habbo guardian) public void requestToVote(Habbo guardian)
{ {
guardian.getClient().sendResponse(new GuardianNewReportReceivedComposer(this)); guardian.getClient().sendResponse(new GuardianNewReportReceivedComposer(this));
@ -52,10 +49,7 @@ public class GuardianTicket
Emulator.getThreading().run(new GuardianNotAccepted(this, guardian), Emulator.getConfig().getInt("guardians.accept.timer") * 1000); Emulator.getThreading().run(new GuardianNotAccepted(this, guardian), Emulator.getConfig().getInt("guardians.accept.timer") * 1000);
} }
/**
* Adds an guardian to this ticket.
* @param guardian The guardian to add.
*/
public void addGuardian(Habbo guardian) public void addGuardian(Habbo guardian)
{ {
GuardianVote vote = this.votes.get(guardian); GuardianVote vote = this.votes.get(guardian);
@ -68,10 +62,7 @@ public class GuardianTicket
} }
} }
/**
* Removes an Guardian from this ticket.
* @param guardian The Guardian to remove.
*/
public void removeGuardian(Habbo guardian) public void removeGuardian(Habbo guardian)
{ {
GuardianVote vote = this.getVoteForGuardian(guardian); GuardianVote vote = this.getVoteForGuardian(guardian);
@ -91,11 +82,7 @@ public class GuardianTicket
this.updateVotes(); this.updateVotes();
} }
/**
* Set the vote for an Guardian.
* @param guardian The Guardian to set the vote for.
* @param vote The GuardianVoteType to set the vote to.
*/
public void vote(Habbo guardian, GuardianVoteType vote) public void vote(Habbo guardian, GuardianVoteType vote)
{ {
this.votes.get(guardian).type = vote; this.votes.get(guardian).type = vote;
@ -107,9 +94,7 @@ public class GuardianTicket
this.finish(); this.finish();
} }
/**
* Updates the votes to all other voting guardians.
*/
public void updateVotes() public void updateVotes()
{ {
synchronized (this.votes) synchronized (this.votes)
@ -124,9 +109,7 @@ public class GuardianTicket
} }
} }
/**
* Tries to finish the voting on a ticket and searches for more guardians if needed.
*/
public void finish() public void finish()
{ {
int votedCount = this.getVotedCount(); int votedCount = this.getVotedCount();
@ -183,17 +166,13 @@ public class GuardianTicket
} }
} }
/**
* @return True if an verdict has been set.
*/
public boolean isFinished() public boolean isFinished()
{ {
return !(this.verdict == null); return !(this.verdict == null);
} }
/**
* @return Calculates the verdict of this ticket.
*/
public GuardianVoteType calculateVerdict() public GuardianVoteType calculateVerdict()
{ {
int countAcceptably = 0; int countAcceptably = 0;
@ -289,11 +268,7 @@ public class GuardianTicket
return this.guardianCount; return this.guardianCount;
} }
/**
* Sorts all votes.
* @param guardian The guardian to remove from this vote list.
* @return The sorted votes list.
*/
public ArrayList<GuardianVote> getSortedVotes(Habbo guardian) public ArrayList<GuardianVote> getSortedVotes(Habbo guardian)
{ {
synchronized (this.votes) synchronized (this.votes)
@ -316,9 +291,7 @@ public class GuardianTicket
} }
} }
/**
* @return The amount of votes (Acceptably, Badly or Awfully) thath as been cast.
*/
public int getVotedCount() public int getVotedCount()
{ {
int count = 0; int count = 0;

View File

@ -55,9 +55,7 @@ public class GuideManager
this.activeGuardians.remove(habbo); this.activeGuardians.remove(habbo);
} }
/**
* Guide Shit
*/
public void setOnGuide(Habbo habbo, boolean onDuty) public void setOnGuide(Habbo habbo, boolean onDuty)
{ {
@ -76,14 +74,7 @@ public class GuideManager
} }
} }
/**
* Searches for an helper to handle the tour.
* Automatically schedules the tour request untill an helper is found
* or the request has been cancelled by the requester.
*
* @param tour The tour to find a helper for.
* @return Wether an helper has been found.
*/
public boolean findHelper(GuideTour tour) public boolean findHelper(GuideTour tour)
{ {
synchronized (this.activeHelpers) synchronized (this.activeHelpers)
@ -111,11 +102,7 @@ public class GuideManager
return false; return false;
} }
/**
* Declines an tourrequest for the current helper assigned.
* Automatically searches for a new helper.
* @param tour The tour to decline.
*/
public void declineTour(GuideTour tour) public void declineTour(GuideTour tour)
{ {
Habbo helper = tour.getHelper(); Habbo helper = tour.getHelper();
@ -130,11 +117,7 @@ public class GuideManager
} }
} }
/**
* Starts an new tour session.
* @param tour The tour to start.
* @param helper The helper to assign.
*/
public void startSession(GuideTour tour, Habbo helper) public void startSession(GuideTour tour, Habbo helper)
{ {
synchronized (this.activeTours) synchronized (this.activeTours)
@ -152,21 +135,7 @@ public class GuideManager
} }
} }
/**
* Ends an tour session.
* <list>
* <ul>
* The requester cancels the tour request.
* </ul>
* <ul>
* The requester says no more help needed.
* </ul>
* <ul>
* The requester reported the helper.
* </ul>
* </list>
* @param tour
*/
public void endSession(GuideTour tour) public void endSession(GuideTour tour)
{ {
synchronized (this.activeTours) synchronized (this.activeTours)
@ -187,11 +156,7 @@ public class GuideManager
} }
} }
/**
* Recommend the guide.
* @param tour The GuideTour this applies to.
* @param recommend Recommended or not.
*/
public void recommend(GuideTour tour, boolean recommend) public void recommend(GuideTour tour, boolean recommend)
{ {
synchronized (this.activeTours) synchronized (this.activeTours)
@ -204,11 +169,7 @@ public class GuideManager
} }
} }
/**
* Gets the GuideTour for the given helper.
* @param helper The helper to find the tour for.
* @return The GuideTour for the helper. NULL when not found.
*/
public GuideTour getGuideTourByHelper(Habbo helper) public GuideTour getGuideTourByHelper(Habbo helper)
{ {
synchronized (this.activeTours) synchronized (this.activeTours)
@ -225,11 +186,7 @@ public class GuideManager
return null; return null;
} }
/**
* Gets the GuideTour for the given requester.
* @param noob The noob to find the tour for.
* @return The GuideTour for the noob. NULL when not found.
*/
public GuideTour getGuideTourByNoob(Habbo noob) public GuideTour getGuideTourByNoob(Habbo noob)
{ {
synchronized (this.activeTours) synchronized (this.activeTours)
@ -246,11 +203,7 @@ public class GuideManager
return null; return null;
} }
/**
* Searches for any GuideTour linked to the either the noob or the helper.
* @param habbo The Habbo to look for.
* @return An given tour.
*/
public GuideTour getGuideTourByHabbo(Habbo habbo) public GuideTour getGuideTourByHabbo(Habbo habbo)
{ {
synchronized (this.activeTours) synchronized (this.activeTours)
@ -267,33 +220,25 @@ public class GuideManager
return null; return null;
} }
/**
* @return The amount of helpers that are on duty.
*/
public int getGuidesCount() public int getGuidesCount()
{ {
return this.activeHelpers.size(); return this.activeHelpers.size();
} }
/**
* @return The amount of guardians that are on duty.
*/
public int getGuardiansCount() public int getGuardiansCount()
{ {
return this.activeGuardians.size(); return this.activeGuardians.size();
} }
/**
* @return true if there are guardians on duty.
*/
public boolean activeGuardians() public boolean activeGuardians()
{ {
return this.activeGuardians.size() > 0; return this.activeGuardians.size() > 0;
} }
/**
* @return The average waiting time before an helper is assinged.
*/
public int getAverageWaitingTime() public int getAverageWaitingTime()
{ {
synchronized (this.tourRequestTiming) synchronized (this.tourRequestTiming)
@ -312,14 +257,9 @@ public class GuideManager
} }
} }
/**
* Guardians
*/
/**
* Adds a new guardian ticket to the active ticket Queue
* @param ticket The GuardianTicket to add.
*/
public void addGuardianTicket(GuardianTicket ticket) public void addGuardianTicket(GuardianTicket ticket)
{ {
synchronized (this.activeTickets) synchronized (this.activeTickets)
@ -330,10 +270,7 @@ public class GuideManager
} }
} }
/**
* Searches for new guardians to vote on the given ticket.
* @param ticket The GuardianTicket to find Guardians for.
*/
public void findGuardians(GuardianTicket ticket) public void findGuardians(GuardianTicket ticket)
{ {
synchronized (this.activeGuardians) synchronized (this.activeGuardians)
@ -376,11 +313,7 @@ public class GuideManager
} }
} }
/**
* Accept a ticket for an Guardian.
* @param guardian The Guardian who accepts.
* @param accepted Accepted.
*/
public void acceptTicket(Habbo guardian, boolean accepted) public void acceptTicket(Habbo guardian, boolean accepted)
{ {
GuardianTicket ticket = this.getTicketForGuardian(guardian); GuardianTicket ticket = this.getTicketForGuardian(guardian);
@ -401,9 +334,7 @@ public class GuideManager
} }
} }
/**
* @return The active GuardianTicket for the Guardian.
*/
public GuardianTicket getTicketForGuardian(Habbo guardian) public GuardianTicket getTicketForGuardian(Habbo guardian)
{ {
synchronized (this.activeGuardians) synchronized (this.activeGuardians)
@ -412,9 +343,7 @@ public class GuideManager
} }
} }
/**
* @return The most recent ticket send by the reporter. NULL when not found.
*/
public GuardianTicket getRecentTicket(Habbo reporter) public GuardianTicket getRecentTicket(Habbo reporter)
{ {
GuardianTicket ticket = null; GuardianTicket ticket = null;
@ -465,10 +394,7 @@ public class GuideManager
return ticket; return ticket;
} }
/**
* Closes a ticket and moves it to the closed ticket queue.
* @param ticket The GuardianTicket to close.
*/
public void closeTicket(GuardianTicket ticket) public void closeTicket(GuardianTicket ticket)
{ {
synchronized (this.activeTickets) synchronized (this.activeTickets)
@ -500,11 +426,7 @@ public class GuideManager
} }
} }
/**
* Sets the give Guardian active for Guardian duty.
* @param habbo The Guardian to set on duty.
* @param onDuty On duty or not.
*/
public void setOnGuardian(Habbo habbo, boolean onDuty) public void setOnGuardian(Habbo habbo, boolean onDuty)
{ {
if(onDuty) if(onDuty)
@ -524,9 +446,7 @@ public class GuideManager
} }
} }
/**
* Cleans up shit.
*/
public void cleanup() public void cleanup()
{ {
synchronized (this.activeTours) synchronized (this.activeTours)

View File

@ -21,14 +21,10 @@ import java.util.NoSuchElementException;
public class GuildManager public class GuildManager
{ {
/**
* Guildparts. The things you use to create the badge.
*/
private final THashMap<GuildPartType, THashMap<Integer, GuildPart>> guildParts; private final THashMap<GuildPartType, THashMap<Integer, GuildPart>> guildParts;
/**
* Cached guilds.
*/
private final TIntObjectMap<Guild> guilds; private final TIntObjectMap<Guild> guilds;
public GuildManager() public GuildManager()
@ -41,9 +37,7 @@ public class GuildManager
Emulator.getLogging().logStart("Guild Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS)"); Emulator.getLogging().logStart("Guild Manager -> Loaded! (" + (System.currentTimeMillis() - millis) + " MS)");
} }
/**
* Loads the guild parts.
*/
public void loadGuildParts() public void loadGuildParts()
{ {
this.guildParts.clear(); this.guildParts.clear();
@ -68,17 +62,7 @@ public class GuildManager
} }
} }
/**
* Creates a new guild.
* @param habbo
* @param roomId
* @param name
* @param description
* @param badge
* @param colorOne
* @param colorTwo
* @return
*/
public Guild createGuild(Habbo habbo, int roomId, String roomName, String name, String description, String badge, int colorOne, int colorTwo) public Guild createGuild(Habbo habbo, int roomId, String roomName, String name, String description, String badge, int colorOne, int colorTwo)
{ {
Guild guild = new Guild(habbo.getHabboInfo().getId(), habbo.getHabboInfo().getUsername(), roomId, roomName, name, description, colorOne, colorTwo, badge); Guild guild = new Guild(habbo.getHabboInfo().getId(), habbo.getHabboInfo().getUsername(), roomId, roomName, name, description, colorOne, colorTwo, badge);
@ -134,10 +118,7 @@ public class GuildManager
return guild; return guild;
} }
/**
* Deletes a guild.
* @param guild The guild to delete.
*/
public void deleteGuild(Guild guild) public void deleteGuild(Guild guild)
{ {
THashSet<GuildMember> members = this.getGuildMembers(guild); THashSet<GuildMember> members = this.getGuildMembers(guild);
@ -192,9 +173,7 @@ public class GuildManager
} }
} }
/**
* Removes inactive guilds from the cache.
*/
public void clearInactiveGuilds() public void clearInactiveGuilds()
{ {
List<Integer> toRemove = new ArrayList<Integer>(); List<Integer> toRemove = new ArrayList<Integer>();
@ -222,13 +201,7 @@ public class GuildManager
} }
} }
/**
* Join a guild.
* @param guild The guild to join.
* @param client The client that joins.
* @param userId The Habbo ID that joins.
* @param acceptRequest Accepted the request.
*/
public void joinGuild(Guild guild, GameClient client, int userId, boolean acceptRequest) public void joinGuild(Guild guild, GameClient client, int userId, boolean acceptRequest)
{ {
boolean error = false; boolean error = false;
@ -359,11 +332,7 @@ public class GuildManager
} }
} }
/**
* Makes the user admin of the guild.
* @param guild The guild that the user should become admin of.
* @param userId The userID that becomes admin.
*/
public void setAdmin(Guild guild, int userId) public void setAdmin(Guild guild, int userId)
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE guilds_members SET level_id = ? WHERE user_id = ? AND guild_id = ? LIMIT 1")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("UPDATE guilds_members SET level_id = ? WHERE user_id = ? AND guild_id = ? LIMIT 1"))
@ -379,11 +348,7 @@ public class GuildManager
} }
} }
/**
* Demotes the admin back to user.
* @param guild The guild that the admin is demoted of.
* @param userId The user id.
*/
public void removeAdmin(Guild guild, int userId) public void removeAdmin(Guild guild, int userId)
{ {
if(guild.getOwnerId() == userId) if(guild.getOwnerId() == userId)
@ -402,11 +367,7 @@ public class GuildManager
} }
} }
/**
* Removes a member from the guild.
* @param guild The guild.
* @param userId The member
*/
public void removeMember(Guild guild, int userId) public void removeMember(Guild guild, int userId)
{ {
if(guild.getOwnerId() == userId) if(guild.getOwnerId() == userId)
@ -433,33 +394,20 @@ public class GuildManager
} }
} }
/**
* Adds a guild to the cache.
* @param guild The guild to add.
*/
public void addGuild(Guild guild) public void addGuild(Guild guild)
{ {
guild.lastRequested = Emulator.getIntUnixTimestamp(); guild.lastRequested = Emulator.getIntUnixTimestamp();
this.guilds.put(guild.getId(), guild); this.guilds.put(guild.getId(), guild);
} }
/**
* Gets the guild member for the given Habbo.
* @param guild The guild to look up.
* @param habbo The Habbo to look up.
* @return The GuildMember.
*/
public GuildMember getGuildMember(Guild guild, Habbo habbo) public GuildMember getGuildMember(Guild guild, Habbo habbo)
{ {
return getGuildMember(guild.getId(), habbo.getHabboInfo().getId()); return getGuildMember(guild.getId(), habbo.getHabboInfo().getId());
} }
/**
* Gets the guild member for the given Habbo.
* @param guildId The guild to look up.
* @param habboId The Habbo to look up.
* @return The GuildMember.
*/
public GuildMember getGuildMember(int guildId, int habboId) public GuildMember getGuildMember(int guildId, int habboId)
{ {
GuildMember member = null; GuildMember member = null;
@ -483,21 +431,13 @@ public class GuildManager
return member; return member;
} }
/**
* Gets the guild members for the guild.
* @param guildId The guild to lookup.
* @return The guild members.
*/
public THashSet<GuildMember> getGuildMembers(int guildId) public THashSet<GuildMember> getGuildMembers(int guildId)
{ {
return this.getGuildMembers(this.getGuild(guildId)); return this.getGuildMembers(this.getGuild(guildId));
} }
/**
* Gets the guild members for the guild.
* @param guild The guild to lookup.
* @return The guild members.
*/
THashSet<GuildMember> getGuildMembers(Guild guild) THashSet<GuildMember> getGuildMembers(Guild guild)
{ {
THashSet<GuildMember> guildMembers = new THashSet<GuildMember>(); THashSet<GuildMember> guildMembers = new THashSet<GuildMember>();
@ -521,14 +461,7 @@ public class GuildManager
return guildMembers; return guildMembers;
} }
/**
* Gets the guild members for the guild.
* @param guild The guild to lookup.
* @param page The page to lookup.
* @param levelId The levelid (Admins, Users, Unaccepted)
* @param query The search query.
* @return The found members.
*/
public ArrayList<GuildMember> getGuildMembers(Guild guild, int page, int levelId, String query) public ArrayList<GuildMember> getGuildMembers(Guild guild, int page, int levelId, String query)
{ {
ArrayList<GuildMember> guildMembers = new ArrayList<GuildMember>(); ArrayList<GuildMember> guildMembers = new ArrayList<GuildMember>();
@ -556,11 +489,7 @@ public class GuildManager
return guildMembers; return guildMembers;
} }
/**
* Gets all the admins for a guild.
* @param guild The guild to lookup.
* @return The GuildMembers that have admin permission for the guild.
*/
public THashMap<Integer, GuildMember> getOnlyAdmins(Guild guild) public THashMap<Integer, GuildMember> getOnlyAdmins(Guild guild)
{ {
THashMap<Integer, GuildMember> guildAdmins = new THashMap<Integer, GuildMember>(); THashMap<Integer, GuildMember> guildAdmins = new THashMap<Integer, GuildMember>();
@ -594,10 +523,7 @@ public class GuildManager
} }
} }
/**
* @param guildId The guild id
* @return The guild. Caches if needed.
*/
public Guild getGuild(int guildId) public Guild getGuild(int guildId)
{ {
Guild g = this.guilds.get(guildId); Guild g = this.guilds.get(guildId);
@ -742,11 +668,7 @@ public class GuildManager
return this.guildParts.get(type).get(id); return this.guildParts.get(type).get(id);
} }
/**
* Sets the furniture guild.
* @param furni The furni to set.
* @param guildId The guild to set.
*/
public void setGuild(InteractionGuildFurni furni, int guildId) public void setGuild(InteractionGuildFurni furni, int guildId)
{ {
furni.setGuildId(guildId); furni.setGuildId(guildId);
@ -762,9 +684,7 @@ public class GuildManager
} }
} }
/**
* Disposes the GuildManager
*/
public void dispose() public void dispose()
{ {
TIntObjectIterator<Guild> guildIterator = this.guilds.iterator(); TIntObjectIterator<Guild> guildIterator = this.guilds.iterator();

View File

@ -5,19 +5,13 @@ import java.sql.SQLException;
public class GuildPart public class GuildPart
{ {
/**
* Identifier.
*/
public final int id; public final int id;
/**
* Part A
*/
public final String valueA; public final String valueA;
/**
* Part B
*/
public final String valueB; public final String valueB;
public GuildPart(ResultSet set) throws SQLException public GuildPart(ResultSet set) throws SQLException

View File

@ -2,19 +2,13 @@ package com.eu.habbo.habbohotel.guilds;
public enum GuildPartType public enum GuildPartType
{ {
/**
* Badge base.
*/
BASE, BASE,
/**
* Symbol
*/
SYMBOL, SYMBOL,
/**
* Colors
*/
BASE_COLOR, BASE_COLOR,
SYMBOL_COLOR, SYMBOL_COLOR,
BACKGROUND_COLOR BACKGROUND_COLOR

View File

@ -81,14 +81,7 @@ public class GuildForum implements ISerialize
} }
//TODO: //TODO:
/*
Verwijderen door guild admin -> state naar HIDDEN_BY_ADMIN
Guild admins moeten nog wel forum kunnen bekijken.
Verwijderen door staff -> state naar HIDDEN_BY_STAFF
Guild admins kunnen de thread niet zien. Staff wel.
Thread wordt nooit uit de database verwijderd, alleen als de groep verwijderd wordt.
*/
public void hideThread(int threadId) public void hideThread(int threadId)
{ {
this.threads.get(threadId).setState(ThreadState.HIDDEN_BY_ADMIN); this.threads.get(threadId).setState(ThreadState.HIDDEN_BY_ADMIN);
@ -143,12 +136,7 @@ public class GuildForum implements ISerialize
public enum ThreadState public enum ThreadState
{ {
/*
public static const _SafeStr_11113:int = 0;
public static const _SafeStr_11114:int = 1;
public static const _SafeStr_11115:int = 10;
public static const _SafeStr_9691:int = 20;
*/
OPEN(0), OPEN(0),
CLOSED(1), CLOSED(1),

View File

@ -7,14 +7,10 @@ import java.sql.*;
public class HallOfFame public class HallOfFame
{ {
/**
* Hall of Fame winners are in here.
*/
private final THashMap<Integer, HallOfFameWinner> winners = new THashMap<Integer, HallOfFameWinner>(); private final THashMap<Integer, HallOfFameWinner> winners = new THashMap<Integer, HallOfFameWinner>();
/**
* The name of the competition.
*/
private static String competitionName; private static String competitionName;
public HallOfFame() public HallOfFame()
@ -24,9 +20,7 @@ public class HallOfFame
reload(); reload();
} }
/**
* Reloads the HoF
*/
public void reload() public void reload()
{ {
this.winners.clear(); this.winners.clear();

View File

@ -5,24 +5,16 @@ import java.sql.SQLException;
public class HallOfFameWinner implements Comparable<HallOfFameWinner> public class HallOfFameWinner implements Comparable<HallOfFameWinner>
{ {
/**
* Habbo ID
*/
private int id; private int id;
/**
* Name
*/
private String username; private String username;
/**
* Look
*/
private String look; private String look;
/**
* Score
*/
private int points; private int points;
public HallOfFameWinner(ResultSet set) throws SQLException public HallOfFameWinner(ResultSet set) throws SQLException
@ -33,33 +25,25 @@ public class HallOfFameWinner implements Comparable<HallOfFameWinner>
this.points = set.getInt("hof_points"); this.points = set.getInt("hof_points");
} }
/**
* Habbo ID
*/
public int getId() public int getId()
{ {
return this.id; return this.id;
} }
/**
* Name
*/
public String getUsername() public String getUsername()
{ {
return this.username; return this.username;
} }
/**
* Look
*/
public String getLook() public String getLook()
{ {
return this.look; return this.look;
} }
/**
* Score
*/
public int getPoints() public int getPoints()
{ {
return this.points; return this.points;

View File

@ -15,9 +15,7 @@ public class NewsList
this.reload(); this.reload();
} }
/**
* Reloads the news.
*/
public void reload() public void reload()
{ {
synchronized (this.newsWidgets) synchronized (this.newsWidgets)
@ -37,10 +35,7 @@ public class NewsList
} }
} }
/**
* The newsitems displayed on the HotelView
* @return
*/
public THashSet<NewsWidget> getNewsWidgets() public THashSet<NewsWidget> getNewsWidgets()
{ {
return newsWidgets; return newsWidgets;

View File

@ -5,39 +5,25 @@ import java.sql.SQLException;
public class NewsWidget public class NewsWidget
{ {
/**
* News ID
*/
private int id; private int id;
/**
* Title
*/
private String title; private String title;
/**
* Message
*/
private String message; private String message;
/**
* Text on the button
*/
private String buttonMessage; private String buttonMessage;
/**
* Type
*/
private int type; private int type;
/**
* Link
*/
private String link; private String link;
/**
* Image
*/
private String image; private String image;
public NewsWidget(ResultSet set) throws SQLException public NewsWidget(ResultSet set) throws SQLException
@ -51,57 +37,43 @@ public class NewsWidget
this.image = set.getString("image"); this.image = set.getString("image");
} }
/**
* News ID
*/
public int getId() public int getId()
{ {
return this.id; return this.id;
} }
/**
* Title
*/
public String getTitle() public String getTitle()
{ {
return this.title; return this.title;
} }
/**
* Message
*/
public String getMessage() public String getMessage()
{ {
return this.message; return this.message;
} }
/**
* Text on the button
*/
public String getButtonMessage() public String getButtonMessage()
{ {
return this.buttonMessage; return this.buttonMessage;
} }
/**
* Type
*/
public int getType() public int getType()
{ {
return this.type; return this.type;
} }
/**
* Link
*/
public String getLink() public String getLink()
{ {
return this.link; return this.link;
} }
/**
* Image
*/
public String getImage() public String getImage()
{ {
return this.image; return this.image;

View File

@ -7,32 +7,20 @@ public class ItemInteraction
private final String name; private final String name;
private final Class<? extends HabboItem> type; private final Class<? extends HabboItem> type;
/**
* Creates an new ItemInteraction that will be used to load custom ItemInteractions.
* Note that the name (item_interaction_type) must be unique. Failing to do so will result
* into an launch failure at startup.
* @param name The name of this item interaction. Do not use capitals or spaces.
* @param type The interaction class that is linked and will be instantiated for new items.
*/
public ItemInteraction(String name, Class<? extends HabboItem> type) public ItemInteraction(String name, Class<? extends HabboItem> type)
{ {
this.name = name; this.name = name;
this.type = type; this.type = type;
} }
/**
* @return The class that is lined to this interaction.
*/
public Class<? extends HabboItem> getType() public Class<? extends HabboItem> getType()
{ {
return this.type; return this.type;
} }
/**
* Should only be used upon startup and never get called outside of the emulator.
* Use getType() in order to identify the correct interactions!
* @return The interaction name as defined in the database.
*/
public String getName() public String getName()
{ {
return this.name; return this.name;

View File

@ -146,12 +146,8 @@ public class ItemManager
this.interactionsList.add(new ItemInteraction("effect_tile", InteractionEffectTile.class)); this.interactionsList.add(new ItemInteraction("effect_tile", InteractionEffectTile.class));
this.interactionsList.add(new ItemInteraction("sticky_pole", InteractionStickyPole.class)); this.interactionsList.add(new ItemInteraction("sticky_pole", InteractionStickyPole.class));
/*
Wireds
*/
/*
Triggers
*/
this.interactionsList.add(new ItemInteraction("wf_trg_walks_on_furni", WiredTriggerHabboWalkOnFurni.class)); this.interactionsList.add(new ItemInteraction("wf_trg_walks_on_furni", WiredTriggerHabboWalkOnFurni.class));
this.interactionsList.add(new ItemInteraction("wf_trg_walks_off_furni", WiredTriggerHabboWalkOffFurni.class)); this.interactionsList.add(new ItemInteraction("wf_trg_walks_off_furni", WiredTriggerHabboWalkOffFurni.class));
this.interactionsList.add(new ItemInteraction("wf_trg_enter_room", WiredTriggerHabboEntersRoom.class)); this.interactionsList.add(new ItemInteraction("wf_trg_enter_room", WiredTriggerHabboEntersRoom.class));
@ -169,9 +165,7 @@ public class ItemManager
this.interactionsList.add(new ItemInteraction("wf_trg_says_command", WiredTriggerHabboSaysCommand.class)); this.interactionsList.add(new ItemInteraction("wf_trg_says_command", WiredTriggerHabboSaysCommand.class));
this.interactionsList.add(new ItemInteraction("wf_trg_score_achieved", WiredTriggerScoreAchieved.class)); this.interactionsList.add(new ItemInteraction("wf_trg_score_achieved", WiredTriggerScoreAchieved.class));
/*
Effects
*/
this.interactionsList.add(new ItemInteraction("wf_act_toggle_state", WiredEffectToggleFurni.class)); this.interactionsList.add(new ItemInteraction("wf_act_toggle_state", WiredEffectToggleFurni.class));
this.interactionsList.add(new ItemInteraction("wf_act_reset_timers", WiredEffectResetTimers.class)); this.interactionsList.add(new ItemInteraction("wf_act_reset_timers", WiredEffectResetTimers.class));
this.interactionsList.add(new ItemInteraction("wf_act_match_to_sshot", WiredEffectMatchFurni.class)); this.interactionsList.add(new ItemInteraction("wf_act_match_to_sshot", WiredEffectMatchFurni.class));
@ -209,9 +203,7 @@ public class ItemManager
this.interactionsList.add(new ItemInteraction("wf_act_give_respect", WiredEffectGiveRespect.class)); this.interactionsList.add(new ItemInteraction("wf_act_give_respect", WiredEffectGiveRespect.class));
this.interactionsList.add(new ItemInteraction("wf_act_alert", WiredEffectAlert.class)); this.interactionsList.add(new ItemInteraction("wf_act_alert", WiredEffectAlert.class));
/*
Conditions
*/
this.interactionsList.add(new ItemInteraction("wf_cnd_has_furni_on", WiredConditionFurniHaveFurni.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_has_furni_on", WiredConditionFurniHaveFurni.class));
this.interactionsList.add(new ItemInteraction("wf_cnd_furnis_hv_avtrs", WiredConditionFurniHaveHabbo.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_furnis_hv_avtrs", WiredConditionFurniHaveHabbo.class));
this.interactionsList.add(new ItemInteraction("wf_cnd_stuff_is", WiredConditionFurniTypeMatch.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_stuff_is", WiredConditionFurniTypeMatch.class));
@ -242,23 +234,15 @@ public class ItemManager
this.interactionsList.add(new ItemInteraction("wf_cnd_freeze", WiredConditionFreezeGameActive.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_freeze", WiredConditionFreezeGameActive.class));
this.interactionsList.add(new ItemInteraction("wf_cnd_not_freeze", WiredConditionNotFreezeGameActive.class)); this.interactionsList.add(new ItemInteraction("wf_cnd_not_freeze", WiredConditionNotFreezeGameActive.class));
/*
Extra
*/
this.interactionsList.add(new ItemInteraction("wf_xtra_random", WiredExtraRandom.class)); this.interactionsList.add(new ItemInteraction("wf_xtra_random", WiredExtraRandom.class));
this.interactionsList.add(new ItemInteraction("wf_xtra_unseen", WiredExtraUnseen.class)); this.interactionsList.add(new ItemInteraction("wf_xtra_unseen", WiredExtraUnseen.class));
/*
Highscores
*/
this.interactionsList.add(new ItemInteraction("wf_highscore", InteractionWiredHighscore.class)); this.interactionsList.add(new ItemInteraction("wf_highscore", InteractionWiredHighscore.class));
/*
Battle Banzai
*/
/*
Battle Banzai Items
*/
//battlebanzai_pyramid //battlebanzai_pyramid
//battlebanzai_puck extends pushable //battlebanzai_puck extends pushable
this.interactionsList.add(new ItemInteraction("battlebanzai_timer", InteractionBattleBanzaiTimer.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_timer", InteractionBattleBanzaiTimer.class));
@ -266,69 +250,49 @@ public class ItemManager
this.interactionsList.add(new ItemInteraction("battlebanzai_random_teleport", InteractionBattleBanzaiTeleporter.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_random_teleport", InteractionBattleBanzaiTeleporter.class));
this.interactionsList.add(new ItemInteraction("battlebanzai_sphere", InteractionBattleBanzaiSphere.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_sphere", InteractionBattleBanzaiSphere.class));
/*
Battle Banzai Gates
*/
this.interactionsList.add(new ItemInteraction("battlebanzai_gate_blue", InteractionBattleBanzaiGateBlue.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_gate_blue", InteractionBattleBanzaiGateBlue.class));
this.interactionsList.add(new ItemInteraction("battlebanzai_gate_green", InteractionBattleBanzaiGateGreen.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_gate_green", InteractionBattleBanzaiGateGreen.class));
this.interactionsList.add(new ItemInteraction("battlebanzai_gate_red", InteractionBattleBanzaiGateRed.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_gate_red", InteractionBattleBanzaiGateRed.class));
this.interactionsList.add(new ItemInteraction("battlebanzai_gate_yellow", InteractionBattleBanzaiGateYellow.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_gate_yellow", InteractionBattleBanzaiGateYellow.class));
/*
Battle Banzai Scoreboards
*/
this.interactionsList.add(new ItemInteraction("battlebanzai_counter_blue", InteractionBattleBanzaiScoreboardBlue.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_counter_blue", InteractionBattleBanzaiScoreboardBlue.class));
this.interactionsList.add(new ItemInteraction("battlebanzai_counter_green", InteractionBattleBanzaiScoreboardGreen.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_counter_green", InteractionBattleBanzaiScoreboardGreen.class));
this.interactionsList.add(new ItemInteraction("battlebanzai_counter_red", InteractionBattleBanzaiScoreboardRed.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_counter_red", InteractionBattleBanzaiScoreboardRed.class));
this.interactionsList.add(new ItemInteraction("battlebanzai_counter_yellow", InteractionBattleBanzaiScoreboardYellow.class)); this.interactionsList.add(new ItemInteraction("battlebanzai_counter_yellow", InteractionBattleBanzaiScoreboardYellow.class));
/*
Freeze
*/
/*
Freeze Items
*/
this.interactionsList.add(new ItemInteraction("freeze_block", InteractionFreezeBlock.class)); this.interactionsList.add(new ItemInteraction("freeze_block", InteractionFreezeBlock.class));
this.interactionsList.add(new ItemInteraction("freeze_tile", InteractionFreezeTile.class)); this.interactionsList.add(new ItemInteraction("freeze_tile", InteractionFreezeTile.class));
this.interactionsList.add(new ItemInteraction("freeze_exit", InteractionFreezeExitTile.class)); this.interactionsList.add(new ItemInteraction("freeze_exit", InteractionFreezeExitTile.class));
this.interactionsList.add(new ItemInteraction("freeze_timer", InteractionFreezeTimer.class)); this.interactionsList.add(new ItemInteraction("freeze_timer", InteractionFreezeTimer.class));
/*
Freeze Gates
*/
this.interactionsList.add(new ItemInteraction("freeze_gate_blue", InteractionFreezeGateBlue.class)); this.interactionsList.add(new ItemInteraction("freeze_gate_blue", InteractionFreezeGateBlue.class));
this.interactionsList.add(new ItemInteraction("freeze_gate_green", InteractionFreezeGateGreen.class)); this.interactionsList.add(new ItemInteraction("freeze_gate_green", InteractionFreezeGateGreen.class));
this.interactionsList.add(new ItemInteraction("freeze_gate_red", InteractionFreezeGateRed.class)); this.interactionsList.add(new ItemInteraction("freeze_gate_red", InteractionFreezeGateRed.class));
this.interactionsList.add(new ItemInteraction("freeze_gate_yellow", InteractionFreezeGateYellow.class)); this.interactionsList.add(new ItemInteraction("freeze_gate_yellow", InteractionFreezeGateYellow.class));
/*
Freeze Scoreboards
*/
this.interactionsList.add(new ItemInteraction("freeze_counter_blue", InteractionFreezeScoreboardBlue.class)); this.interactionsList.add(new ItemInteraction("freeze_counter_blue", InteractionFreezeScoreboardBlue.class));
this.interactionsList.add(new ItemInteraction("freeze_counter_green", InteractionFreezeScoreboardGreen.class)); this.interactionsList.add(new ItemInteraction("freeze_counter_green", InteractionFreezeScoreboardGreen.class));
this.interactionsList.add(new ItemInteraction("freeze_counter_red", InteractionFreezeScoreboardRed.class)); this.interactionsList.add(new ItemInteraction("freeze_counter_red", InteractionFreezeScoreboardRed.class));
this.interactionsList.add(new ItemInteraction("freeze_counter_yellow", InteractionFreezeScoreboardYellow.class)); this.interactionsList.add(new ItemInteraction("freeze_counter_yellow", InteractionFreezeScoreboardYellow.class));
/*
Ice Tag
*/
this.interactionsList.add(new ItemInteraction("icetag_pole", InteractionIceTagPole.class)); this.interactionsList.add(new ItemInteraction("icetag_pole", InteractionIceTagPole.class));
this.interactionsList.add(new ItemInteraction("icetag_field", InteractionIceTagField.class)); this.interactionsList.add(new ItemInteraction("icetag_field", InteractionIceTagField.class));
/*
Bunnyrun
*/
this.interactionsList.add(new ItemInteraction("bunnyrun_pole", InteractionBunnyrunPole.class)); this.interactionsList.add(new ItemInteraction("bunnyrun_pole", InteractionBunnyrunPole.class));
this.interactionsList.add(new ItemInteraction("bunnyrun_field", InteractionBunnyrunField.class)); this.interactionsList.add(new ItemInteraction("bunnyrun_field", InteractionBunnyrunField.class));
/*
Rollerskate
*/
this.interactionsList.add(new ItemInteraction("rollerskate_field", InteractionRollerskateField.class)); this.interactionsList.add(new ItemInteraction("rollerskate_field", InteractionRollerskateField.class));
/*
Football
*/
this.interactionsList.add(new ItemInteraction("football", InteractionFootball.class)); this.interactionsList.add(new ItemInteraction("football", InteractionFootball.class));
this.interactionsList.add(new ItemInteraction("football_gate", InteractionFootballGate.class)); this.interactionsList.add(new ItemInteraction("football_gate", InteractionFootballGate.class));
this.interactionsList.add(new ItemInteraction("football_counter_blue", InteractionFootballScoreboardBlue.class)); this.interactionsList.add(new ItemInteraction("football_counter_blue", InteractionFootballScoreboardBlue.class));
@ -345,10 +309,7 @@ public class ItemManager
this.interactionsList.add(new ItemInteraction("snowstorm_pile", null)); this.interactionsList.add(new ItemInteraction("snowstorm_pile", null));
} }
/**
* Adds an new ItemInteraction to the interaction list.
* @param itemInteraction The ItemInteraction that must be added.
*/
public void addItemInteraction(ItemInteraction itemInteraction) public void addItemInteraction(ItemInteraction itemInteraction)
{ {
for (ItemInteraction interaction : this.interactionsList) for (ItemInteraction interaction : this.interactionsList)
@ -362,11 +323,7 @@ public class ItemManager
this.interactionsList.add(itemInteraction); this.interactionsList.add(itemInteraction);
} }
/**
* Gets that correct ItemInteraction class for the given Interaction.
* @param type The Interaction that must be found.
* @return The ItemInteraction definition for the given class.
*/
public ItemInteraction getItemInteraction(Class<? extends HabboItem> type) public ItemInteraction getItemInteraction(Class<? extends HabboItem> type)
{ {
for (ItemInteraction interaction : this.interactionsList) for (ItemInteraction interaction : this.interactionsList)
@ -379,11 +336,7 @@ public class ItemManager
return getItemInteraction(InteractionDefault.class); return getItemInteraction(InteractionDefault.class);
} }
/**
* Gets that correct ItemInteraction class for the given Interaction.
* @param type The Interaction that must be found.
* @return The ItemInteraction definition for the given class.
*/
public ItemInteraction getItemInteraction(String type) public ItemInteraction getItemInteraction(String type)
{ {
for (ItemInteraction interaction : this.interactionsList) for (ItemInteraction interaction : this.interactionsList)
@ -395,11 +348,7 @@ public class ItemManager
return this.getItemInteraction(InteractionDefault.class); return this.getItemInteraction(InteractionDefault.class);
} }
/**
* Loads all items from the database. Updates the item definition when needed.
*
* Note: Does not change the interaction type. Emulator requires a restart for that.
*/
public void loadItems() public void loadItems()
{ {
try ( try (
@ -432,9 +381,7 @@ public class ItemManager
} }
} }
/**
* Loads the crackable items and their rewards from the database.
*/
public void loadCrackable() public void loadCrackable()
{ {
this.crackableRewards.clear(); this.crackableRewards.clear();
@ -462,11 +409,7 @@ public class ItemManager
} }
} }
/**
* Gets the amount of clicks required for an crackable item.
* @param itemId The Item id.
* @return The amount of clicks required.
*/
public int getCrackableCount(int itemId) public int getCrackableCount(int itemId)
{ {
if(this.crackableRewards.containsKey(itemId)) if(this.crackableRewards.containsKey(itemId))
@ -475,12 +418,7 @@ public class ItemManager
return 0; return 0;
} }
/**
* Calculates the current state of the crackable item depending on the amount of ticks.
* @param count The current amount of ticks.
* @param max The amount of ticks needed.
* @return State of the crackable.
*/
public int calculateCrackState(int count, int max, Item baseItem) public int calculateCrackState(int count, int max, Item baseItem)
{ {
return (int)Math.floor((1.0D / ((double)max / (double)count) * baseItem.getStateCount())); return (int)Math.floor((1.0D / ((double)max / (double)count) * baseItem.getStateCount()));
@ -496,9 +434,7 @@ public class ItemManager
return this.getItem(this.crackableRewards.get(itemId).getRandomReward()); return this.getItem(this.crackableRewards.get(itemId).getRandomReward());
} }
/**
* Loads soundtracks from the database.
*/
public void loadSoundTracks() public void loadSoundTracks()
{ {
this.soundTracks.clear(); this.soundTracks.clear();

View File

@ -2,24 +2,16 @@ package com.eu.habbo.habbohotel.items;
public enum PostItColor public enum PostItColor
{ {
/**
* Blue!
*/
BLUE("9CCEFF"), BLUE("9CCEFF"),
/**
* Green!
*/
GREEN("9CFF9C"), GREEN("9CFF9C"),
/**
* Pink! (Or purple :P)
*/
PINK("FF9CFF"), PINK("FF9CFF"),
/**
* Yellow
*/
YELLOW("FFFF33"); YELLOW("FFFF33");
public final String hexColor; public final String hexColor;
@ -29,11 +21,7 @@ public enum PostItColor
this.hexColor = hexColor; this.hexColor = hexColor;
} }
/**
* If the color is a custom color.
* @param color The color to check.
* @return True if the color is a custom color.
*/
public static boolean isCustomColor(String color) public static boolean isCustomColor(String color)
{ {
for(PostItColor postItColor : PostItColor.values()) for(PostItColor postItColor : PostItColor.values())

View File

@ -11,9 +11,7 @@ import java.sql.SQLException;
public abstract class InteractionPushable extends InteractionDefault public abstract class InteractionPushable extends InteractionDefault
{ {
/**
* Currently running Runnable for this item.
*/
private KickBallAction currentThread; private KickBallAction currentThread;
public InteractionPushable(ResultSet set, Item baseItem) throws SQLException public InteractionPushable(ResultSet set, Item baseItem) throws SQLException
@ -116,183 +114,57 @@ public abstract class InteractionPushable extends InteractionDefault
} }
} }
/**
* Gets the velocity of the item when a Habbo kicks the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return The item's new velocity
*/
public abstract int getWalkOnVelocity(RoomUnit roomUnit, Room room); public abstract int getWalkOnVelocity(RoomUnit roomUnit, Room room);
/**
* Gets the direction the item should start moving in when a Habbo kicks the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return Direction that the item should start moving in
*/
public abstract RoomUserRotation getWalkOnDirection(RoomUnit roomUnit, Room room); public abstract RoomUserRotation getWalkOnDirection(RoomUnit roomUnit, Room room);
/**
* Gets the velocity of the item when a Habbo walks off the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return The item's new velocity
*/
public abstract int getWalkOffVelocity(RoomUnit roomUnit, Room room); public abstract int getWalkOffVelocity(RoomUnit roomUnit, Room room);
/**
* Gets the direction the item should start moving in when a Habbo walks off the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return Direction that the item should start moving in
*/
public abstract RoomUserRotation getWalkOffDirection(RoomUnit roomUnit, Room room); public abstract RoomUserRotation getWalkOffDirection(RoomUnit roomUnit, Room room);
/**
* Gets the velocity of the item when a Habbo drags the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return The item's new velocity
*/
public abstract int getDragVelocity(RoomUnit roomUnit, Room room); public abstract int getDragVelocity(RoomUnit roomUnit, Room room);
/**
* Gets the direction the item should start moving in when a Habbo drags the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return Direction that the item should start moving in
*/
public abstract RoomUserRotation getDragDirection(RoomUnit roomUnit, Room room); public abstract RoomUserRotation getDragDirection(RoomUnit roomUnit, Room room);
/**
* Gets the velocity of the item when a Habbo tackles the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return The item's new velocity
*/
public abstract int getTackleVelocity(RoomUnit roomUnit, Room room); public abstract int getTackleVelocity(RoomUnit roomUnit, Room room);
/**
* Gets the direction the item should start moving in when a Habbo tackles the item
*
* @param roomUnit The Habbo that initiated the event
* @param room The room this event happened in
* @return Direction that the item should start moving in
*/
public abstract RoomUserRotation getTackleDirection(RoomUnit roomUnit, Room room); public abstract RoomUserRotation getTackleDirection(RoomUnit roomUnit, Room room);
/**
* Gets the delay till the next move of the item in milliseconds.
*
* @param currentStep The current step of the move sequence
* @param totalSteps The total number of steps to complete the move sequence
* @return Time in milliseconds till the next move of the item
*/
public abstract int getNextRollDelay(int currentStep, int totalSteps); //The length in milliseconds when the ball should next roll public abstract int getNextRollDelay(int currentStep, int totalSteps); //The length in milliseconds when the ball should next roll
/**
* Gets the new direction of the item when it cannot move any further.
*
* @param room The room this event happened in
* @param currentDirection The current direction of the item
* @return New direction of the item
*/
public abstract RoomUserRotation getBounceDirection(Room room, RoomUserRotation currentDirection); //Returns the new direction to move the ball when the ball cannot move public abstract RoomUserRotation getBounceDirection(Room room, RoomUserRotation currentDirection); //Returns the new direction to move the ball when the ball cannot move
/**
* Checks if the next move is allowed.
*
* @param room The room this event happened in
* @param from The current coordinate of the item
* @param to The coordinate the item wishes to move to
* @return Is this move allowed?
*/
public abstract boolean validMove(Room room, RoomTile from, RoomTile to); //Checks if the next move is valid public abstract boolean validMove(Room room, RoomTile from, RoomTile to); //Checks if the next move is valid
/**
* Triggered when a Habbo drags a pushable item.
*
* @param room The room that this event happened in
* @param roomUnit The Habbo that initiated the event
* @param velocity The new velocity of the item
* @param direction The direction the item is moving in
*/
public abstract void onDrag(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction); public abstract void onDrag(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction);
/**
* Triggered when a Habbo kicks a pushable item.
*
* @param room The room that this event happened in
* @param roomUnit The Habbo that initiated the event
* @param velocity The new velocity of the item
* @param direction The direction the item is moving in
*/
public abstract void onKick(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction); public abstract void onKick(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction);
/**
* Triggered when a Habbo tackles the ball (double clicks).
*
* @param room The room that this event happened in
* @param roomUnit The Habbo that initiated the event
* @param velocity The new velocity of the item
* @param direction The direction the item is moving in
*/
public abstract void onTackle(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction); public abstract void onTackle(Room room, RoomUnit roomUnit, int velocity, RoomUserRotation direction);
/**
* Triggered when an item is moved due to a kick, drag or tackle.
* State changes should be executed here
*
* @param room The room that the event happened in
* @param from The old coordinate of the item
* @param to The new coordinate of the item
* @param direction The direction the item is moving in
* @param kicker The Habbo which initiated the move of the item
* @param nextRoll The delay till the next move of the item
* @param currentStep The current step of the move sequence
* @param totalSteps The total number of steps to complete the move sequence
*/
public abstract void onMove(Room room, RoomTile from, RoomTile to, RoomUserRotation direction, RoomUnit kicker, int nextRoll, int currentStep, int totalSteps); public abstract void onMove(Room room, RoomTile from, RoomTile to, RoomUserRotation direction, RoomUnit kicker, int nextRoll, int currentStep, int totalSteps);
/**
* Triggered when an item cannot move any further and has changed it's direction.
*
* @param room The room that the event happened in
* @param oldDirection The old direction of the item
* @param newDirection The new direction of the item
* @param kicker The Habbo which initiated the move of the item
*/
public abstract void onBounce(Room room, RoomUserRotation oldDirection, RoomUserRotation newDirection, RoomUnit kicker); public abstract void onBounce(Room room, RoomUserRotation oldDirection, RoomUserRotation newDirection, RoomUnit kicker);
/**
* Triggered when an item stops moving
*
* @param room The room that the event happened in
* @param kicker The Habbo which initiated the move of the item
* @param currentStep The current step of the move sequence
* @param totalSteps The total number of steps to complete the move sequence
*/
public abstract void onStop(Room room, RoomUnit kicker, int currentStep, int totalSteps); public abstract void onStop(Room room, RoomUnit kicker, int currentStep, int totalSteps);
/**
* Checks if the item is still allowed to move. If not, the ball will stop.
*
* @param room The room that the event happened in
* @param from The old coordinate of the item
* @param to The new coordinate of the item
* @param direction The direction the item is moving in
* @param kicker The Habbo which initiated the move of the item
* @param nextRoll The delay till the next move of the item
* @param currentStep The current step of the move sequence
* @param totalSteps The total number of steps to complete the move sequence
* @return Can the item still move?
*/
public abstract boolean canStillMove(Room room, RoomTile from, RoomTile to, RoomUserRotation direction, RoomUnit kicker, int nextRoll, int currentStep, int totalSteps); public abstract boolean canStillMove(Room room, RoomTile from, RoomTile to, RoomUserRotation direction, RoomUnit kicker, int nextRoll, int currentStep, int totalSteps);
} }

View File

@ -61,26 +61,7 @@ public class InteractionTeleport extends HabboItem
if(room != null && client != null && objects.length <= 1) if(room != null && client != null && objects.length <= 1)
{ {
/*client.getHabbo().getRoomUnit().cmdTeleport = false;
this.roomUnitId
RoomTile loc = room.getLayout().getTile(this.getX(), this.getY());
if (loc.equals(room.getLayout().getDoorTile()))
return;
/*if (!this.getBaseItem().allowWalk())
{
loc = HabboItem.getSquareInFront(room.getLayout(), this);
}
if (loc != null)
{
else
{
client.getHabbo().getRoomUnit().setGoalLocation(loc);
Emulator.getThreading().run(new RoomUnitTeleportWalkToAction(client.getHabbo(), this, room), client.getHabbo().getRoomUnit().getPath().size() + 2 * 510);
}
}*/
super.onClick(client, room, objects); super.onClick(client, room, objects);

View File

@ -15,6 +15,8 @@ import java.sql.SQLException;
public abstract class InteractionWired extends HabboItem public abstract class InteractionWired extends HabboItem
{ {
private long cooldown;
InteractionWired(ResultSet set, Item baseItem) throws SQLException InteractionWired(ResultSet set, Item baseItem) throws SQLException
{ {
super(set, baseItem); super(set, baseItem);
@ -101,4 +103,24 @@ public abstract class InteractionWired extends HabboItem
this.setExtradata(this.getExtradata().equals("1") ? "0" : "1"); this.setExtradata(this.getExtradata().equals("1") ? "0" : "1");
room.sendComposer(new ItemStateComposer(this).compose()); room.sendComposer(new ItemStateComposer(this).compose());
} }
protected long requiredCooldown()
{
return 500;
}
public boolean canExecute(long newMillis)
{
if (newMillis - this.cooldown < this.requiredCooldown())
{
this.cooldown = newMillis;
return false;
}
this.cooldown = newMillis;
return true;
}
} }

View File

@ -14,7 +14,6 @@ import java.sql.SQLException;
public abstract class InteractionWiredEffect extends InteractionWired public abstract class InteractionWiredEffect extends InteractionWired
{ {
private int delay; private int delay;
private long cooldown;
public InteractionWiredEffect(ResultSet set, Item baseItem) throws SQLException public InteractionWiredEffect(ResultSet set, Item baseItem) throws SQLException
{ {
@ -69,58 +68,24 @@ public abstract class InteractionWiredEffect extends InteractionWired
} }
/**
* Checks if the cooldown has passed and updates it to the new cooldown.
* @param newMillis The new timestamp the wired was executed.
* @return True if the wired can be executed.
*/
public boolean canExecute(long newMillis)
{
if (newMillis - this.cooldown < this.requiredCooldown())
{
this.cooldown = newMillis;
return false;
}
this.cooldown = newMillis;
return true;
}
public abstract boolean saveData(ClientMessage packet, GameClient gameClient); public abstract boolean saveData(ClientMessage packet, GameClient gameClient);
/**
* Sets the delay of execution.
* @param value The delay of execution.
*/
protected void setDelay(int value) protected void setDelay(int value)
{ {
this.delay = value; this.delay = value;
} }
/**
* @return The delay of execution.
*/
public int getDelay() public int getDelay()
{ {
return this.delay; return this.delay;
} }
/**
* @return The type of the wired trigger.
*/
public abstract WiredEffectType getType(); public abstract WiredEffectType getType();
/**
* @return The delay between two activations.
*/
protected long requiredCooldown()
{
return 500;
}
/**
* @return Returns true if the InteractionWiredEffect can only be executed
* if there is a RoomUnit triggering the wired.
*/
public boolean requiresTriggeringUser() public boolean requiresTriggeringUser()
{ {
return false; return false;

View File

@ -112,10 +112,7 @@ public class InteractionWiredHighscore extends HabboItem
} }
} }
/*
FUCK OFF
*/
@Override @Override
public void serializeExtradata(ServerMessage serverMessage) public void serializeExtradata(ServerMessage serverMessage)
{ {

View File

@ -13,9 +13,7 @@ import com.eu.habbo.habbohotel.wired.WiredEffectType;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Thanks to Beny for coding football game for Arcturus!
*/
public class InteractionFootballScoreboard extends InteractionGameScoreboard public class InteractionFootballScoreboard extends InteractionGameScoreboard
{ {
private int score; private int score;
@ -60,11 +58,7 @@ public class InteractionFootballScoreboard extends InteractionGameScoreboard
return false; return false;
} }
/**
*
* @param amount
* @return New score.
*/
public int changeScore(int amount) public int changeScore(int amount)
{ {
this.score += amount; this.score += amount;

View File

@ -47,10 +47,7 @@ public class InteractionFreezeTimer extends InteractionGameTimer
super.onClick(client, room, objects); super.onClick(client, room, objects);
} }
/**
* Overrides from the InteractionGameTimer class.
* @return The specific game class which should be linked to this timer.
*/
@Override @Override
public Class<? extends Game> getGameType() public Class<? extends Game> getGameType()
{ {

View File

@ -137,6 +137,7 @@ public class WiredEffectTeleport extends InteractionWiredEffect
int currentEffect = habbo.getRoomUnit().getEffectId(); int currentEffect = habbo.getRoomUnit().getEffectId();
room.giveEffect(habbo, 4); room.giveEffect(habbo, 4);
final WiredEffectTeleport teleportWired = this;
Emulator.getThreading().run(new RoomUnitTeleport(habbo.getRoomUnit(), room, item.getX(), item.getY(), item.getZ() + (item.getBaseItem().allowSit() ? item.getBaseItem().getHeight() - 0.50 : 0D), currentEffect), WiredHandler.TELEPORT_DELAY); Emulator.getThreading().run(new RoomUnitTeleport(habbo.getRoomUnit(), room, item.getX(), item.getY(), item.getZ() + (item.getBaseItem().allowSit() ? item.getBaseItem().getHeight() - 0.50 : 0D), currentEffect), WiredHandler.TELEPORT_DELAY);
Emulator.getThreading().run(new Runnable() Emulator.getThreading().run(new Runnable()
{ {
@ -145,7 +146,7 @@ public class WiredEffectTeleport extends InteractionWiredEffect
{ {
try try
{ {
item.onWalkOn(habbo.getRoomUnit(), room, new Object[]{}); item.onWalkOn(habbo.getRoomUnit(), room, new Object[]{teleportWired});
} }
catch (Exception e) catch (Exception e)
{} {}

View File

@ -72,12 +72,7 @@ public class WordFilter
} }
} }
/**
* Normalises a string to replace all weird unicode characters to regular characters.
* May dispose certain characters (Like Chinese)
* @param message The {@String} to normalise.
* @return A String with only regular characters.
*/
public String normalise(String message) public String normalise(String message)
{ {
return Normalizer.normalize(message, Normalizer.Form.NFD) return Normalizer.normalize(message, Normalizer.Form.NFD)

View File

@ -523,11 +523,7 @@ public class PetManager
return new Pet(set); return new Pet(set);
} }
/**
* Deletes a pet from the database.
* @param pet The pet to delete.
* @return true if the pet has been deleted.
*/
public boolean deletePet(AbstractPet pet) public boolean deletePet(AbstractPet pet)
{ {
try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM users_pets WHERE id = ? LIMIT 1")) try (Connection connection = Emulator.getDatabase().getDataSource().getConnection(); PreparedStatement statement = connection.prepareStatement("DELETE FROM users_pets WHERE id = ? LIMIT 1"))

View File

@ -1066,17 +1066,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
message.appendString(s); message.appendString(s);
} }
/*if(g != null)
{
message.appendInt(58);
message.appendInt(g.getId());
message.appendString(g.getName());
message.appendString(g.getBadge());
}
else
{
message.appendInt(56);
}*/
int base = 0; int base = 0;
@ -1386,9 +1376,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
if (allowFurniture || (!allowFurniture && !stackContainsRoller)) if (allowFurniture || (!allowFurniture && !stackContainsRoller))
{ {
/**
* Redneck way to prevent checking ifregistered each time.
*/
Event furnitureRolledEvent = null; Event furnitureRolledEvent = null;
if (Emulator.getPluginManager().isRegistered(FurnitureRolledEvent.class, true)) if (Emulator.getPluginManager().isRegistered(FurnitureRolledEvent.class, true))
@ -2792,10 +2780,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
this.removeHabboItem(this.getHabboItem(id)); this.removeHabboItem(this.getHabboItem(id));
} }
/**
* Removes an {@see HabboItem} from the list of room items. Does not visually remove it from the room.
* @param item The item to remove.
*/
public void removeHabboItem(HabboItem item) public void removeHabboItem(HabboItem item)
{ {
if (item != null) if (item != null)
@ -2967,14 +2952,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
} }
/*items.addAll(this.roomSpecialTypes.getBanzaiTeleporters());
items.addAll(this.roomSpecialTypes.getNests());
items.addAll(this.roomSpecialTypes.getPetDrinks());
items.addAll(this.roomSpecialTypes.getPetFoods());
items.addAll(this.roomSpecialTypes.getRollers());
items.addAll(this.roomSpecialTypes.getTriggers());
items.addAll(this.roomSpecialTypes.getEffects());
items.addAll(this.roomSpecialTypes.getConditions());*/
return items; return items;
@ -4773,17 +4751,13 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
this.pickUpItem(item, null); this.pickUpItem(item, null);
} }
/**
* Ejects all furniture from the room not belonging to the room owner.
*/
public void ejectAll() public void ejectAll()
{ {
this.ejectAll(null); this.ejectAll(null);
} }
/**
* @param habbo The Habbo to exclude to eject its items.
*/
public void ejectAll(Habbo habbo) public void ejectAll(Habbo habbo)
{ {
THashMap<Integer, THashSet<HabboItem>> userItemsMap = new THashMap<Integer, THashSet<HabboItem>>(); THashMap<Integer, THashSet<HabboItem>> userItemsMap = new THashMap<Integer, THashSet<HabboItem>>();
@ -4997,9 +4971,7 @@ public class Room implements Comparable<Room>, ISerialize, Runnable
} }
} }
/*
SELECT SUM(score + team_score) as total_score, COUNT(*) as wins, users.username, score, GROUP_CONCAT(users.username) as usernames FROM room_game_scores INNER JOIN users ON room_game_scores.user_id = users.id WHERE room_id = 0 GROUP BY game_start_timestamp, game_name, team_id ORDER BY total_score ASC, wins DESC LIMIT 10
*/
if(scoreType == WiredHighscoreScoreType.CLASSIC) if(scoreType == WiredHighscoreScoreType.CLASSIC)
{ {
query += "GROUP BY game_start_timestamp, user_id, team_id ORDER BY total_score DESC"; query += "GROUP BY game_start_timestamp, user_id, team_id ORDER BY total_score DESC";

View File

@ -357,17 +357,7 @@ public class RoomManager
return room; return room;
} }
/**
* Creates and preloads a room.
* @param ownerId
* @param ownerName
* @param name
* @param description
* @param modelName
* @param usersMax
* @param categoryId
* @return
*/
public Room createRoom(int ownerId, String ownerName, String name, String description, String modelName, int usersMax, int categoryId) public Room createRoom(int ownerId, String ownerName, String name, String description, String modelName, int usersMax, int categoryId)
{ {
Room room = null; Room room = null;
@ -396,16 +386,7 @@ public class RoomManager
return room; return room;
} }
/**
* Creates a room for the given Habbo and also preloads the room.
* @param habbo
* @param name
* @param description
* @param modelName
* @param usersMax
* @param categoryId
* @return
*/
public Room createRoomForHabbo(Habbo habbo, String name, String description, String modelName, int usersMax, int categoryId) public Room createRoomForHabbo(Habbo habbo, String name, String description, String modelName, int usersMax, int categoryId)
{ {
Room room = this.createRoom(habbo.getHabboInfo().getId(), habbo.getHabboInfo().getUsername(), name, description, modelName, usersMax, categoryId); Room room = this.createRoom(habbo.getHabboInfo().getId(), habbo.getHabboInfo().getUsername(), name, description, modelName, usersMax, categoryId);

View File

@ -2,54 +2,34 @@ package com.eu.habbo.habbohotel.rooms;
public enum RoomRightLevels public enum RoomRightLevels
{ {
/**
* No Rights.
*/
NONE (0), NONE (0),
/**
* Rights given by the room owner.
*/
RIGHTS (1), RIGHTS (1),
/**
* Rights trough guild allowing members to build.
*/
GUILD_RIGHTS(2), GUILD_RIGHTS(2),
/**
* Rights as Admin of the guild.
*/
GUILD_ADMIN (3), GUILD_ADMIN (3),
/**
* Room owner rights.
*/
OWNER (4), OWNER (4),
/**
* Moderator rights.
*/
MODERATOR (5), MODERATOR (5),
/**
* Six. Unknown.
*/
SIX (6), SIX (6),
/**
* Seven. Unknown.
*/
SEVEN (7), SEVEN (7),
/**
* Eight. Unknown.
*/
EIGHT (8), EIGHT (8),
/**
* Nine. Unknown.
*/
NINE (9); NINE (9);
public final int level; public final int level;

View File

@ -71,9 +71,7 @@ public class RoomSpecialTypes
this.cycleTasks = new THashSet<>(0); this.cycleTasks = new THashSet<>(0);
} }
/*
Banzai Teleporter
*/
public InteractionBattleBanzaiTeleporter getBanzaiTeleporter(int itemId) public InteractionBattleBanzaiTeleporter getBanzaiTeleporter(int itemId)
{ {
return this.banzaiTeleporters.get(itemId); return this.banzaiTeleporters.get(itemId);
@ -108,9 +106,7 @@ public class RoomSpecialTypes
} }
} }
/*
Nests
*/
public InteractionNest getNest(int itemId) public InteractionNest getNest(int itemId)
{ {
return this.nests.get(itemId); return this.nests.get(itemId);
@ -137,9 +133,7 @@ public class RoomSpecialTypes
} }
} }
/*
Pet Drinks
*/
public InteractionPetDrink getPetDrink(int itemId) public InteractionPetDrink getPetDrink(int itemId)
{ {
return this.petDrinks.get(itemId); return this.petDrinks.get(itemId);
@ -166,9 +160,7 @@ public class RoomSpecialTypes
} }
} }
/*
Pet Foods.
*/
public InteractionPetFood getPetFood(int itemId) public InteractionPetFood getPetFood(int itemId)
{ {
return this.petFoods.get(itemId); return this.petFoods.get(itemId);
@ -195,9 +187,7 @@ public class RoomSpecialTypes
} }
} }
/*
Pet Toys.
*/
public InteractionPetToy getPetToy(int itemId) public InteractionPetToy getPetToy(int itemId)
{ {
return this.petToys.get(itemId); return this.petToys.get(itemId);
@ -224,9 +214,7 @@ public class RoomSpecialTypes
} }
} }
/*
Rollers
*/
public InteractionRoller getRoller(int itemId) public InteractionRoller getRoller(int itemId)
{ {
synchronized (this.rollers) synchronized (this.rollers)
@ -256,9 +244,7 @@ public class RoomSpecialTypes
return rollers; return rollers;
} }
/*
Wired Triggers
*/
public InteractionWiredTrigger getTrigger(int itemId) public InteractionWiredTrigger getTrigger(int itemId)
{ {
synchronized (this.wiredTriggers) synchronized (this.wiredTriggers)
@ -339,9 +325,7 @@ public class RoomSpecialTypes
} }
} }
/*
Wired Effects
*/
public InteractionWiredEffect getEffect(int itemId) public InteractionWiredEffect getEffect(int itemId)
{ {
synchronized (this.wiredEffects) synchronized (this.wiredEffects)
@ -422,9 +406,7 @@ public class RoomSpecialTypes
} }
} }
/*
Wired Conditions
*/
public InteractionWiredCondition getCondition(int itemId) public InteractionWiredCondition getCondition(int itemId)
{ {
synchronized (this.wiredConditions) synchronized (this.wiredConditions)
@ -508,9 +490,7 @@ public class RoomSpecialTypes
} }
} }
/*
Wired Extra
*/
public THashSet<InteractionWiredExtra> getExtras(int x, int y) public THashSet<InteractionWiredExtra> getExtras(int x, int y)
{ {
synchronized (this.wiredExtras) synchronized (this.wiredExtras)
@ -561,9 +541,7 @@ public class RoomSpecialTypes
return false; return false;
} }
/*
GameScoreboards
*/
public InteractionGameScoreboard getGameScorebord(int itemId) public InteractionGameScoreboard getGameScorebord(int itemId)
{ {
return this.gameScoreboards.get(itemId); return this.gameScoreboards.get(itemId);
@ -690,9 +668,7 @@ public class RoomSpecialTypes
} }
} }
/*
GameGates
*/
public InteractionGameGate getGameGate(int itemId) public InteractionGameGate getGameGate(int itemId)
{ {
return this.gameGates.get(itemId); return this.gameGates.get(itemId);
@ -744,9 +720,7 @@ public class RoomSpecialTypes
} }
} }
/*
GameTimers
*/
public InteractionGameTimer getGameTimer(int itemId) public InteractionGameTimer getGameTimer(int itemId)
{ {
return this.gameTimers.get(itemId); return this.gameTimers.get(itemId);
@ -803,9 +777,7 @@ public class RoomSpecialTypes
} }
} }
/*
Freeze Exit Tile
*/
public InteractionFreezeExitTile getFreezeExitTile() public InteractionFreezeExitTile getFreezeExitTile()
{ {
for(InteractionFreezeExitTile t : this.freezeExitTile.values()) for(InteractionFreezeExitTile t : this.freezeExitTile.values())

View File

@ -11,23 +11,14 @@ public class RoomTile
private boolean allowStack = true; private boolean allowStack = true;
private boolean walkable = true; private boolean walkable = true;
/**
* Pathfinder
*/
private RoomTile previous = null; private RoomTile previous = null;
private boolean diagonally; private boolean diagonally;
private short movementPanelty; private short movementPanelty;
private short gCosts; private short gCosts;
private short hCosts; private short hCosts;
/**
* @param x
* @param y
* @param z
* @param state
* @param walkable
* @param allowStack
*/
public RoomTile(short x, short y, short z, RoomTileState state, boolean walkable, boolean allowStack) public RoomTile(short x, short y, short z, RoomTileState state, boolean walkable, boolean allowStack)
{ {
this.x = x; this.x = x;

View File

@ -1,8 +1,6 @@
package com.eu.habbo.habbohotel.rooms; package com.eu.habbo.habbohotel.rooms;
/**
* Created on 6-9-2014 14:44.
*/
public enum RoomTileState public enum RoomTileState
{ {
OPEN, OPEN,

View File

@ -107,9 +107,7 @@ public class RoomUnit
{ {
try try
{ {
/**
* !this.status.containsKey("mv") &&
*/
if (!this.isWalking() && !isKicked) if (!this.isWalking() && !isKicked)
{ {
if (this.status.remove("mv") == null) if (this.status.remove("mv") == null)

View File

@ -1,8 +1,6 @@
package com.eu.habbo.habbohotel.rooms; package com.eu.habbo.habbohotel.rooms;
/**
* Created on 13-9-2014 17:14.
*/
public enum RoomUserRotation { public enum RoomUserRotation {
NORTH(0), NORTH(0),
NORTH_EAST(1), NORTH_EAST(1),

View File

@ -126,9 +126,7 @@ public class Habbo implements Runnable
this.client = client; this.client = client;
} }
/*
Called upon succesfull SSO Login. NOT socket connection.
*/
public void connect() public void connect()
{ {
if (!Emulator.getConfig().getBoolean("networking.tcp.proxy")) if (!Emulator.getConfig().getBoolean("networking.tcp.proxy"))
@ -215,34 +213,19 @@ public class Habbo implements Runnable
} }
} }
/**
* Checks if the Habbo has the allowed permission.
*
* @param key The permission to check.
* @return True if the Habbo has the permission.
*/
public boolean hasPermission(String key) public boolean hasPermission(String key)
{ {
return hasPermission(key, false); return hasPermission(key, false);
} }
/**
* Checks if the Habbo has the allowed permission.
*
* @param key The permission to check.
* @param hasRoomRights True if the Habbo is the room owner.
* @return True if the Habbo has the permission.
*/
public boolean hasPermission(String key, boolean hasRoomRights) public boolean hasPermission(String key, boolean hasRoomRights)
{ {
return Emulator.getGameEnvironment().getPermissionsManager().hasPermission(this, key, hasRoomRights); return Emulator.getGameEnvironment().getPermissionsManager().hasPermission(this, key, hasRoomRights);
} }
/**
* Gives credits to the Habbo and updates the credits balance in game.
*
* @param credits The amount of credits to give.
*/
public void giveCredits(int credits) public void giveCredits(int credits)
{ {
if (credits == 0) if (credits == 0)
@ -256,11 +239,7 @@ public class Habbo implements Runnable
this.client.sendResponse(new UserCreditsComposer(this.client.getHabbo())); this.client.sendResponse(new UserCreditsComposer(this.client.getHabbo()));
} }
/**
* Gives pixels to the Habbo and updates the pixels balance in game.
*
* @param pixels The amount of pixels to give.
*/
public void givePixels(int pixels) public void givePixels(int pixels)
{ {
if (pixels == 0) if (pixels == 0)
@ -275,22 +254,13 @@ public class Habbo implements Runnable
this.client.sendResponse(new UserCurrencyComposer(this.client.getHabbo())); this.client.sendResponse(new UserCurrencyComposer(this.client.getHabbo()));
} }
/**
* Gives points to the Habbo and updates the points balance in game.
*
* @param points The amount of points to give.
*/
public void givePoints(int points) public void givePoints(int points)
{ {
this.givePoints(Emulator.getConfig().getInt("seasonal.primary.type"), points); this.givePoints(Emulator.getConfig().getInt("seasonal.primary.type"), points);
} }
/**
* Gives points to the Habbo and updates the points balance in game.
*
* @param type The points type to give.
* @param points The amount of points to give.
*/
public void givePoints(int type, int points) public void givePoints(int type, int points)
{ {
if (points == 0) if (points == 0)
@ -304,22 +274,13 @@ public class Habbo implements Runnable
this.client.sendResponse(new UserPointsComposer(this.client.getHabbo().getHabboInfo().getCurrencyAmount(type), event.points, event.type)); this.client.sendResponse(new UserPointsComposer(this.client.getHabbo().getHabboInfo().getCurrencyAmount(type), event.points, event.type));
} }
/**
* Whispers a message to the Habbo.
*
* @param message The message to whisper.
*/
public void whisper(String message) public void whisper(String message)
{ {
this.whisper(message, this.habboStats.chatColor); this.whisper(message, this.habboStats.chatColor);
} }
/**
* Whispers a message to the Habbo.
*
* @param message The message to whisper.
* @param bubble The chat bubble type to use.
*/
public void whisper(String message, RoomChatMessageBubbles bubble) public void whisper(String message, RoomChatMessageBubbles bubble)
{ {
if (this.getRoomUnit().isInRoom()) if (this.getRoomUnit().isInRoom())
@ -328,22 +289,13 @@ public class Habbo implements Runnable
} }
} }
/**
* Makes the Habbo talk in the room.
*
* @param message The message to say.
*/
public void talk(String message) public void talk(String message)
{ {
this.talk(message, this.habboStats.chatColor); this.talk(message, this.habboStats.chatColor);
} }
/**
* Makes the Habbo talk in the room.
*
* @param message The message to say.
* @param bubble The chat bubble type to use.
*/
public void talk(String message, RoomChatMessageBubbles bubble) public void talk(String message, RoomChatMessageBubbles bubble)
{ {
if (this.getRoomUnit().isInRoom()) if (this.getRoomUnit().isInRoom())
@ -352,22 +304,13 @@ public class Habbo implements Runnable
} }
} }
/**
* Makes the Habbo shout in the room.
*
* @param message The message to shout.
*/
public void shout(String message) public void shout(String message)
{ {
this.shout(message, this.habboStats.chatColor); this.shout(message, this.habboStats.chatColor);
} }
/**
* Makes the Habbo shout in the room.
*
* @param message The message to shout.
* @param bubble The chat bubble type to use.
*/
public void shout(String message, RoomChatMessageBubbles bubble) public void shout(String message, RoomChatMessageBubbles bubble)
{ {
if (this.getRoomUnit().isInRoom()) if (this.getRoomUnit().isInRoom())
@ -376,51 +319,31 @@ public class Habbo implements Runnable
} }
} }
/**
* Sends an alert to the Habbo.
*
* @param message The message the alert contains.
*/
public void alert(String message) public void alert(String message)
{ {
this.client.sendResponse(new GenericAlertComposer(message)); this.client.sendResponse(new GenericAlertComposer(message));
} }
/**
* Sends an old style alert to the Habbo.
*
* @param messages The messages the alert contains.
*/
public void alert(String[] messages) public void alert(String[] messages)
{ {
this.client.sendResponse(new MessagesForYouComposer(messages)); this.client.sendResponse(new MessagesForYouComposer(messages));
} }
/**
* Sends an alert with url to the Habbo.
*
* @param message The message the alert contains.
* @param url The URL the alert contains.
*/
public void alertWithUrl(String message, String url) public void alertWithUrl(String message, String url)
{ {
this.client.sendResponse(new StaffAlertWithLinkComposer(message, url)); this.client.sendResponse(new StaffAlertWithLinkComposer(message, url));
} }
/**
* Forwards the Habbo to a room.
*
* @param id The id of the room to go to.
*/
public void goToRoom(int id) public void goToRoom(int id)
{ {
this.client.sendResponse(new ForwardToRoomComposer(id)); this.client.sendResponse(new ForwardToRoomComposer(id));
} }
/**
* Adds a new furniture to the inventory and also updates the client.
* @param item The furniture to add.
*/
public void addFurniture(HabboItem item) public void addFurniture(HabboItem item)
{ {
this.habboInventory.getItemsComponent().addItem(item); this.habboInventory.getItemsComponent().addItem(item);
@ -428,10 +351,7 @@ public class Habbo implements Runnable
this.client.sendResponse(new InventoryRefreshComposer()); this.client.sendResponse(new InventoryRefreshComposer());
} }
/**
* Adds new furniture to the inventory and also updates the client.
* @param items The furniture to add.
*/
public void addFurniture(THashSet<HabboItem> items) public void addFurniture(THashSet<HabboItem> items)
{ {
this.habboInventory.getItemsComponent().addItems(items); this.habboInventory.getItemsComponent().addItems(items);
@ -439,40 +359,28 @@ public class Habbo implements Runnable
this.client.sendResponse(new InventoryRefreshComposer()); this.client.sendResponse(new InventoryRefreshComposer());
} }
/**
* Removes a furniture from the inventory and also updates the client.
* @param item The furniture to remove.
*/
public void removeFurniture(HabboItem item) public void removeFurniture(HabboItem item)
{ {
this.habboInventory.getItemsComponent().removeHabboItem(item); this.habboInventory.getItemsComponent().removeHabboItem(item);
this.client.sendResponse(new RemoveHabboItemComposer(item.getId())); this.client.sendResponse(new RemoveHabboItemComposer(item.getId()));
} }
/**
* Adds a bot to the HabboInventory.
* @param bot The bot to add.
*/
public void addBot(Bot bot) public void addBot(Bot bot)
{ {
this.habboInventory.getBotsComponent().addBot(bot); this.habboInventory.getBotsComponent().addBot(bot);
this.client.sendResponse(new AddBotComposer(bot)); this.client.sendResponse(new AddBotComposer(bot));
} }
/**
* Removes a bot from the HabboInventory.
* @param bot The bot to remove.
*/
public void removeBot(Bot bot) public void removeBot(Bot bot)
{ {
this.habboInventory.getBotsComponent().removeBot(bot); this.habboInventory.getBotsComponent().removeBot(bot);
this.client.sendResponse(new RemoveBotComposer(bot)); this.client.sendResponse(new RemoveBotComposer(bot));
} }
/**
* Deletes a bot from the database. Also picks it up from the room or removes it from the inventory.
* @param bot The Bot to delete.
*/
public void deleteBot(Bot bot) public void deleteBot(Bot bot)
{ {
this.removeBot(bot); this.removeBot(bot);
@ -480,31 +388,21 @@ public class Habbo implements Runnable
Emulator.getGameEnvironment().getBotManager().deleteBot(bot); Emulator.getGameEnvironment().getBotManager().deleteBot(bot);
} }
/**
* Adds a pet to the HabboInventory.
* @param pet The Pet to add.
*/
public void addPet(Pet pet) public void addPet(Pet pet)
{ {
this.habboInventory.getPetsComponent().addPet(pet); this.habboInventory.getPetsComponent().addPet(pet);
this.client.sendResponse(new AddPetComposer(pet)); this.client.sendResponse(new AddPetComposer(pet));
} }
/**
* Removes a pet from the HabboInventory.
* @param pet The Pet to remove.
*/
public void removePet(Pet pet) public void removePet(Pet pet)
{ {
this.habboInventory.getPetsComponent().removePet(pet); this.habboInventory.getPetsComponent().removePet(pet);
this.client.sendResponse(new RemovePetComposer(pet)); this.client.sendResponse(new RemovePetComposer(pet));
} }
/**
* Creates a new badge and adds it to the HabboInventory.
* @param code The badgecode to use.
* @return true if succesfully added. False otherwise.
*/
public boolean addBadge(String code) public boolean addBadge(String code)
{ {
if (this.habboInventory.getBadgesComponent().getBadge(code) == null) if (this.habboInventory.getBadgesComponent().getBadge(code) == null)
@ -518,10 +416,7 @@ public class Habbo implements Runnable
return false; return false;
} }
/**
* Deletes a badge from the database and removes it from the inventory.
* @param badge The Badge to delete.
*/
public void deleteBadge(HabboBadge badge) public void deleteBadge(HabboBadge badge)
{ {
this.habboInventory.getBadgesComponent().removeBadge(badge); this.habboInventory.getBadgesComponent().removeBadge(badge);

View File

@ -313,6 +313,9 @@ public abstract class HabboItem implements Runnable, IEventTriggers
@Override @Override
public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception public void onWalkOn(RoomUnit roomUnit, Room room, Object[] objects) throws Exception
{ {
if (objects != null && objects.length >= 1 && objects[0] instanceof InteractionWired)
return;
WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, roomUnit, room, new Object[]{this}); WiredHandler.handle(WiredTriggerType.WALKS_ON_FURNI, roomUnit, room, new Object[]{this});
} }

View File

@ -321,13 +321,7 @@ public class HabboManager
return nameChanges; return nameChanges;
} }
/**
* Sets the rank for an user.
* Updates the database if the user is offline.
* @param userId The ID of the user.
* @param rankId The new rank ID for the user.
* @throws Exception When the rank does not exist.
*/
public void setRank(int userId, int rankId) throws Exception public void setRank(int userId, int rankId) throws Exception
{ {
Habbo habbo = this.getHabbo(userId); Habbo habbo = this.getHabbo(userId);

View File

@ -83,7 +83,8 @@ public class WiredHandler
public static boolean handle(InteractionWiredTrigger trigger, final RoomUnit roomUnit, final Room room, final Object[] stuff) public static boolean handle(InteractionWiredTrigger trigger, final RoomUnit roomUnit, final Room room, final Object[] stuff)
{ {
if(trigger.execute(roomUnit, room, stuff)) long millis = System.currentTimeMillis();
if(trigger.canExecute(millis) && trigger.execute(roomUnit, room, stuff))
{ {
trigger.activateBox(room); trigger.activateBox(room);
@ -123,7 +124,6 @@ public class WiredHandler
Collections.shuffle(effectList); Collections.shuffle(effectList);
} }
long millis = System.currentTimeMillis();
if (hasExtraUnseen) if (hasExtraUnseen)
{ {

View File

@ -4,442 +4,32 @@ public class Incoming_1006
{ {
/*
Achievements
*/
//public static final int RequestAchievementsEvent = 2562; //public static final int RequestAchievementsEvent = 2562;
/*
Wired
*/
/*public static final int WiredTriggerSaveDataEvent = 3201;
public static final int WiredEffectSaveDataEvent = 3006;
public static final int WiredConditionSaveDataEvent = 1041;*/
/*
Pets
*/
/*public static final int RequestPetInformationEvent = 777;
public static final int PetPickupEvent = 863;
public static final int ScratchPetEvent = 3464;
public static final int RequestPetTrainingPanelEvent = 2476;
public static final int HorseUseItemEvent = 1616;
public static final int HorseRideSettingsEvent = 2448;
public static final int HorseRideEvent = 3268;*/
/*
Groups
*/
/* public static final int RequestGuildBuyRoomsEvent = 701;
public static final int RequestGuildPartsEvent = 2344;
public static final int RequestGuildBuyEvent = 872;
public static final int RequestGuildInfoEvent = 2079;
public static final int RequestGuildManageEvent = 2418;
public static final int RequestGuildMembersEvent = 2382;
public static final int RequestGuildJoinEvent = 77;
public static final int GuildChangeNameDescEvent = 3232;
public static final int GuildChangeBadgeEvent = 1475;
public static final int GuildChangeColorsEvent = 463;
public static final int GuildRemoveMemberEvent = 3002;
public static final int GuildRemoveAdminEvent = 3264;
public static final int GuildChangeSettingsEvent = 2156;
public static final int GuildAcceptMembershipEvent = 1066;
public static final int GuildDeclineMembershipEvent = 1320;
public static final int GuildSetAdminEvent = 2957;
public static final int GuildSetFavoriteEvent = 1463;
public static final int RequestOwnGuildsEvent = 2240;
public static final int RequestGuildFurniWidgetEvent = 3031;
/*
Trading
*/
/*public static final int TradeStartEvent = 466;
public static final int TradeOfferItemEvent = 2223;
public static final int TradeCancelOfferItemEvent = 373;
public static final int TradeAcceptEvent = 1062;
public static final int TradeUnAcceptEvent = 1131;
public static final int TradeConfirmEvent = 1144;
public static final int TradeCloseEvent = 3387;
/*
ModTool
*/
/* public static final int ModToolRequestRoomInfoEvent = 225;
public static final int ModToolRequestRoomChatlogEvent = 1903;
public static final int ModToolRequestUserInfoEvent = 3077;
public static final int ModToolPickTicketEvent = 3975;
public static final int ModToolAlertEvent = 1980;
public static final int ModToolKickEvent = 3418;
public static final int ModToolBanEvent = 2930;
public static final int ModToolWarnEvent = 3763;
public static final int ModToolRequestUserChatlogEvent = 203;
public static final int ModToolRoomAlertEvent = 295;
public static final int ModToolChangeRoomSettingsEvent = 2530;
public static final int ModToolRequestRoomVisitsEvent = 2549;
/*
Catalog
*/
/*public static final int Unknown3 = 3794; //Catalogue Initialized Composer?
public static final int RequestRecylerLogicEvent = 1077;
public static final int RequestCatalogIndexEvent = 81;
public static final int GetMarketplaceConfigEvent = 1952; //Configuration IDs composer?
public static final int RequestDiscountEvent = 3794;
public static final int RequestCatalogModeEvent = 3406;
public static final int RequestGiftConfigurationEvent = 382;
public static final int RequestCatalogPageEvent = 1754;
public static final int CatalogBuyItemEvent = 2967;
public static final int CatalogBuyItemAsGiftEvent = 2474;
public static final int RedeemVoucherEvent = 1571;
public static final int ReloadRecyclerEvent = 2779;
public static final int RecycleEvent = 2318;
public static final int OpenRecycleBoxEvent = 3977;
public static final int RequestPetBreedsEvent = 1064;
public static final int CheckPetNameEvent = 678;
public static final int GetClubDataEvent = 1608;
/*
Polls
*/
/* public static final int CancelPollEvent = 276;
public static final int GetPollDataEvent = 1960;
public static final int AnswerPollEvent = 1847;
/*
Marketplace
*/
/*public static final int RequestOwnItemsEvent = 829;
public static final int TakeBackItemEvent = 2910;
public static final int RequestOffersEvent = 541;
public static final int RequestItemInfoEvent = 36;
public static final int BuyItemEvent = 3878;
public static final int RequestSellItemEvent = 2087;
public static final int SellItemEvent = 172;
public static final int RequestCreditsEvent = 2138;
/*
Handshake
*/
/* public static final int ReleaseVersionEvent = 4000;
public static final int RequestBannerToken = 2619;
public static final int GenerateSecretKeyEvent = 3575;
public static final int MachineIDEvent = 512;
public static final int SecureLoginEvent = 1309;
/*
Friends
*/
/*public static final int RequestFriendsEvent = 776;
public static final int ChangeRelationEvent = 2521;
public static final int RemoveFriendEvent = 2786;
public static final int SearchUserEvent = 1267;
public static final int FriendRequestEvent = 3765;
public static final int AcceptFriendRequest = 333;
public static final int FriendPrivateMessageEvent = 1527;
public static final int RequestFriendRequestEvent = 275;
public static final int StalkFriendEvent = 3394;
/*
HotelView
*/
/* public static final int HotelViewEvent = 3266;
public static final int RequestBonusRareEvent = 1199;
public static final int RequestNewsListEvent = 896;
public static final int HotelViewDataEvent = 595;
/*
Navigator
*/
/*public static final int RequestRoomCategoriesEvent = 1431;
public static final int RequestPublicRoomsEvent = 3735;
public static final int RequestPopularRoomsEvent = 235;
public static final int RequestHighestScoreRoomsEvent = 1728;
public static final int RequestMyRoomsEvent = 2676;
public static final int RequestCanCreateRoomEvent = 3844;
public static final int RequestPromotedRoomsEvent = 3030;
public static final int RequestCreateRoomEvent = 3524;
public static final int RequestTagsEvent = 1337;
public static final int SearchRoomsByTagEvent = 1956;
public static final int SearchRoomsEvent = 3551;
public static final int SearchRoomsFriendsNowEvent = 3306;
public static final int SearchRoomsFriendsOwnEvent = 3478;
public static final int SearchRoomsWithRightsEvent = 3785;
public static final int SearchRoomsInGroupEvent = 1160;
public static final int SearchRoomsMyFavoriteEvent = 1532;
public static final int SearchRoomsVisitedEvent = 589;
/*
Rooms
*/
/* public static final int RequestRoomLoadEvent = 3751; //3751
public static final int RoomVoteEvent = 242;
public static final int RequestRoomSettingsEvent = 3741;
public static final int RequestHeightmapEvent = 308;
public static final int RequestRoomDataEvent = 183;
public static final int RoomSettingsSaveEvent = 2384;
public static final int RoomUserTalkEvent = 3349;
public static final int RoomUserShoutEvent = 936;
public static final int RoomUserWhisperEvent = 1362;
public static final int RoomUserActionEvent = 475;
public static final int RoomUserSitEvent = 484;
public static final int RoomUserDanceEvent = 1139;
public static final int RoomUserSignEvent = 2189;
public static final int RoomUserGiveRespectEvent = 2041;
public static final int RoomUserWalkEvent = 951;
public static final int RoomPlaceItemEvent = 474;
public static final int RotateMoveItemEvent = 194;
public static final int MoveWallItemEvent = 1029;
public static final int RoomPickupItemEvent = 152;
public static final int RoomPlacePaintEvent = 874;
public static final int RoomUserStartTypingEvent = 3684;
public static final int RoomUserStopTypingEvent = 2005;
public static final int ToggleFloorItemEvent = 120;
public static final int ToggleWallItemEvent = 2650;
public static final int RoomUserLookAtPoint = 1365;
public static final int RoomBackgroundEvent = 2715;
public static final int MannequinSaveNameEvent = 2098;
public static final int MannequinSaveLookEvent = 1804;
public static final int AdvertisingSaveEvent = 68;
public static final int RoomUserDropHandItemEvent = 157;
public static final int BotPlaceEvent = 148;
public static final int BotPickupEvent = 2865;
public static final int BotSaveSettingsEvent = 1384;
public static final int BotSettingsEvent = 3098;
public static final int TriggerDiceEvent = 987;
public static final int CloseDiceEvent = 1739;
public static final int TriggerColorWheelEvent = 2367;
public static final int MoodLightSettingsEvent = 2468;
public static final int MoodLightTurnOnEvent = 1181;
public static final int RedeemItemEvent = 3599;
public static final int RequestRoomRightsEvent = 2928;
public static final int RoomRemoveAllRightsEvent = 405;
public static final int RoomUserGiveRightsEvent = 2221;
public static final int RoomUserRemoveRightsEvent = 3639;
public static final int PetPlaceEvent = 3711;
public static final int RoomUserKickEvent = 1874;
public static final int SetStackHelperHeightEvent = 2540;
/*
Users
*/
/* public static final int RequestUserDataEvent = 112;
public static final int RequestUserCreditsEvent = 938;
public static final int RequestUserClubEvent = 3874;
public static final int RequestMeMenuSettingsEvent = 671;
public static final int RequestUserCitizinShipEvent = 3096;
public static final int RequestUserProfileEvent = 532;
public static final int RequestProfileFriendsEvent = 3925;
public static final int RequestUserTagsEvent = 3102;
public static final int RequestUserWardrobeEvent = 1251;
public static final int SaveWardrobeEvent = 637;
public static final int UserSaveLookEvent = 2404;
public static final int SaveMottoEvent = 2832;
public static final int UserWearBadgeEvent = 2473;
public static final int RequestWearingBadgesEvent = 3968;
/*
Inventory
*/
/* public static final int RequestInventoryItemsEvent = 372; // 1223
public static final int RequestInventoryPetsEvent = 1900;
public static final int RequestInventoryBadgesEvent = 3072;
public static final int RequestInventoryBotsEvent = 1351;
/*
Not correctly implemented
*/
/*public static final int RequestResolutionEvent = 1854;*/
/*public static final int MannequinSaveLookEvent = 2252;//1804
public static final int RequestCatalogPageEvent = 1904;//1754
public static final int RequestWearingBadgesEvent = 3364;//3968
public static final int BotPickupEvent = 1890;//2865
public static final int HorseRideEvent = 1425;//3268
public static final int RequestCreateRoomEvent = 1075;//3524
public static final int SaveMottoEvent = 3060;//2832
public static final int GenerateSecretKeyEvent = 2342;//3575
public static final int ModToolAlertEvent = 641;//1980
public static final int TradeAcceptEvent = 843;//1062
public static final int RequestCatalogModeEvent = 2941;//3406
public static final int RequestUserCreditsEvent = 3985;//938
public static final int FriendPrivateMessageEvent = 2046;//1527
public static final int CloseDiceEvent = 2438;//1739
public static final int RoomUserRemoveRightsEvent = 1872;//3639
public static final int GuildDeclineMembershipEvent = 3464;//1320
public static final int AnswerPollEvent = 3647;//1847
public static final int UserWearBadgeEvent = 2265;//2473
public static final int RoomVoteEvent = -242;//242
public static final int RoomUserSignEvent = 1037;//2189
public static final int RequestUserDataEvent = 3243;//112
public static final int RoomUserShoutEvent = 1559;//936
public static final int ScratchPetEvent = 2363;//3464
public static final int RoomUserWalkEvent = 3264;//951
public static final int RequestUserTagsEvent = 3364;//3102
public static final int RequestTagsEvent = 3906;//1337
public static final int GetMarketplaceConfigEvent = 1142;//1952
public static final int RequestHeightmapEvent = 2450;//308
public static final int TradeCloseEvent = 759;//3387
public static final int CatalogBuyItemEvent = 3269;//2967
public static final int RequestGuildMembersEvent = 556;//2382
public static final int RequestPetInformationEvent = 1330;//777
public static final int RoomUserWhisperEvent = 3700;//1362
public static final int ModToolRequestUserInfoEvent = 852;//3077
public static final int RotateMoveItemEvent = 3753;//194
public static final int CancelPollEvent = 797;//276
public static final int RequestRoomLoadEvent = 2144;//3751 //2086 //2144
public static final int RequestGuildPartsEvent = 2165;//2344
public static final int RoomPlacePaintEvent = 2534;//874
public static final int RequestPopularRoomsEvent = 1627;//2346;//235
public static final int ModToolRequestRoomInfoEvent = 346;//225
public static final int FriendRequestEvent = 3667;//3765
public static final int RecycleEvent = 2627;//2318
public static final int RequestRoomCategoriesEvent = 783;//1431
public static final int ToggleWallItemEvent = 3649;//2650
public static final int RoomUserTalkEvent = 2462;//3349
public static final int HotelViewDataEvent = 3813;//595
public static final int RoomUserDanceEvent = 1764;//1139
public static final int RequestUserProfileEvent = 1299;//532
public static final int SearchRoomsFriendsNowEvent = 542;//3306
public static final int SetStackHelperHeightEvent = 3280;//2540
public static final int RedeemVoucherEvent = 114;//1571
public static final int HorseUseItemEvent = 1105;//1616
public static final int BuyItemEvent = 3161;//3878
public static final int AdvertisingSaveEvent = 3645;//68
public static final int RequestPetTrainingPanelEvent = 2867;//2476
public static final int RoomBackgroundEvent = 1275;//2715
public static final int RequestNewsListEvent = 1205;//896
public static final int RequestPromotedRoomsEvent = 3527;//3030
public static final int GuildSetAdminEvent = 1954;//2957
public static final int GetClubDataEvent = 1232;//1608
public static final int RequestMeMenuSettingsEvent = 254;//671
public static final int MannequinSaveNameEvent = 2872;//2098
public static final int SellItemEvent = 1147;//172
public static final int GuildAcceptMembershipEvent = 816;//1066
public static final int RequestBannerToken = 1497;//2619
public static final int RequestRecylerLogicEvent = 2669;//1077
public static final int RequestGuildJoinEvent = 1971;//77
public static final int RequestCatalogIndexEvent = 1789;//81
public static final int RequestInventoryPetsEvent = 3555;//1900
public static final int ModToolRequestRoomVisitsEvent = 1854;//2549
public static final int ModToolWarnEvent = 2891;//3763
public static final int RequestItemInfoEvent = 2326;//36
public static final int ModToolRequestRoomChatlogEvent = 2285;//1903
public static final int UserSaveLookEvent = 2889;//2404
public static final int ToggleFloorItemEvent = 2970;//120
public static final int TradeUnAcceptEvent = 1287;//1131
public static final int WiredTriggerSaveDataEvent = 3931;//3201
public static final int RoomRemoveAllRightsEvent = 36;//405
public static final int TakeBackItemEvent = 560;//2910
public static final int OpenRecycleBoxEvent = 3502;//3977
public static final int GuildChangeNameDescEvent = 3503;//3232
public static final int RequestSellItemEvent = 1380;//2087
public static final int ModToolChangeRoomSettingsEvent = 2571;//2530
public static final int ModToolRequestUserChatlogEvent = 600;//203
public static final int GuildChangeSettingsEvent = 1026;//2156
public static final int RoomUserDropHandItemEvent = 1699;//157
public static final int RequestProfileFriendsEvent = 3510;//3925
public static final int TradeCancelOfferItemEvent = 2646;//373
public static final int TriggerDiceEvent = 1000;//987
public static final int GetPollDataEvent = 491;//1960
public static final int MachineIDEvent = -512;//512
public static final int RequestDiscountEvent = 458;//3794
public static final int RequestFriendRequestEvent = 1823;//275
public static final int RoomSettingsSaveEvent = 1824;//2384
public static final int AcceptFriendRequest = 3110;//333
public static final int ReleaseVersionEvent = 4000;//4000
public static final int SearchRoomsMyFavoriteEvent = 1181;//1532
public static final int TradeStartEvent = 2842;//466
public static final int ChangeRelationEvent = 668;//2521
public static final int RoomUserSitEvent = 2292;//484
public static final int RequestCanCreateRoomEvent = 3929;//3844
public static final int ModToolKickEvent = 1132;//3418
public static final int MoveWallItemEvent = 3043;//1029
public static final int SearchRoomsEvent = 2188;//3551
public static final int RequestHighestScoreRoomsEvent = 1379;//1728
public static final int CatalogBuyItemAsGiftEvent = 3186;//2474
public static final int RoomUserGiveRespectEvent = 2901;//2041
public static final int RemoveFriendEvent = 3767;//2786
public static final int SearchRoomsFriendsOwnEvent = 1870;//3478
public static final int GuildSetFavoriteEvent = 2864;//1463
public static final int PetPlaceEvent = 81;//3711
public static final int BotSettingsEvent = 3630;//3098
public static final int StalkFriendEvent = 3829;//3394
public static final int RoomPickupItemEvent = 2316;//152
public static final int RedeemItemEvent = 3333;//3599
public static final int RequestFriendsEvent = 2386;//776
public static final int RequestAchievementsEvent = 3474;//2562
public static final int GuildChangeColorsEvent = 3260;//463
public static final int RequestInventoryBadgesEvent = 2480;//3072
public static final int RequestPetBreedsEvent = 3851;//1064
public static final int GuildChangeBadgeEvent = 2754;//1475
public static final int ModToolBanEvent = 574;//2930
public static final int SaveWardrobeEvent = 1188;//637
public static final int HotelViewEvent = 1784;//3266
public static final int ModToolPickTicketEvent = 3088;//3975
public static final int ModToolReleaseTicketEvent = 734;
public static final int ModToolCloseTicketEvent = 1837;
public static final int TriggerColorWheelEvent = 2882;//2367
public static final int SearchRoomsByTagEvent = -1956;//1956
public static final int RequestPublicRoomsEvent = 2021;//3735 //UPDATED OLD 3178
public static final int RequestResolutionEvent = 3871;//1854
public static final int Unknown3 = 458;//3794
public static final int RequestInventoryItemsEvent = 1920;//372
public static final int ModToolRoomAlertEvent = 1863;//295
public static final int WiredEffectSaveDataEvent = 1645;//3006
public static final int CheckPetNameEvent = 3567;//678
public static final int SecureLoginEvent = 1957;//1309
public static final int BotSaveSettingsEvent = 736;//1384
public static final int RequestGuildBuyEvent = 2594;//872
public static final int SearchUserEvent = 3026;//1267
public static final int GuildRemoveMemberEvent = 353;//3002
public static final int WiredConditionSaveDataEvent = 2096;//1041
public static final int RoomUserLookAtPoint = 2115;//1365
public static final int MoodLightTurnOnEvent = 883;//1181
public static final int MoodLightSettingsEvent = 3878;//2468
public static final int RequestMyRoomsEvent = 2360;//2676
public static final int RequestCreditsEvent = 1623;//2138
public static final int SearchRoomsInGroupEvent = 2066;//1160
public static final int HorseRideSettingsEvent = 1731;//2448
public static final int HandleDoorbellEvent = 91;
public static final int RoomUserKickEvent = 1718;//1874
public static final int RoomPlaceItemEvent = 2554;//474
public static final int RequestInventoryBotsEvent = 3549;//1351
public static final int RequestUserWardrobeEvent = 3057;//1251
public static final int RequestRoomRightsEvent = 2197;//2928
public static final int RequestGuildBuyRoomsEvent = 1035;//701
public static final int BotPlaceEvent = 2143;//148
public static final int SearchRoomsWithRightsEvent = 307;//3785
public static final int RequestBonusRareEvent = 1966;//1199
public static final int GuildRemoveAdminEvent = 864;//3264
public static final int RequestRoomSettingsEvent = 2176;//3741
public static final int RequestOffersEvent = 2688;//541
public static final int RequestUserCitizinShipEvent = 2151;//3096
public static final int RoomUserStopTypingEvent = 3890;//2005
public static final int RoomUserStartTypingEvent = 3896;//3684
public static final int RequestGuildManageEvent = 3169;//2418
public static final int RequestUserClubEvent = 2189;//3874
public static final int PetPickupEvent = -3167;//863
public static final int RequestOwnGuildsEvent = 484;//2240
public static final int SearchRoomsVisitedEvent = 24;//589
public static final int TradeOfferItemEvent = 1324;//2223
public static final int TradeConfirmEvent = 3866;//1144
public static final int RoomUserGiveRightsEvent = 3167;//2221
public static final int RequestGuildInfoEvent = 331;//2079
public static final int ReloadRecyclerEvent = 72;//2779
public static final int RoomUserActionEvent = 2000;//475
public static final int RequestGiftConfigurationEvent = 102;//382
public static final int RequestRoomDataEvent = 2086;//183
public static final int RequestRoomHeightmapEvent = 3075;
public static final int RequestGuildFurniWidgetEvent = 3239;//3031
public static final int RequestOwnItemsEvent = 1486;//829
public static final int RequestReportRoomEvent = 2343;
public static final int ReportEvent = 330;
public static final int TriggerOneWayGateEvent = 408;
public static final int FloorPlanEditorSaveEvent = 2324;
public static final int FloorPlanEditorRequestDoorSettingsEvent = 1168;
public static final int FloorPlanEditorRequestBlockedTilesEvent = 1241;*/
public static final int MannequinSaveLookEvent = 3770;//1804 //Updated public static final int MannequinSaveLookEvent = 3770;//1804 //Updated
public static final int RequestCatalogPageEvent = 2914;//1754 //Updated public static final int RequestCatalogPageEvent = 2914;//1754 //Updated

View File

@ -4,442 +4,32 @@ public class Incoming_Back
{ {
/*
Achievements
*/
//public static final int RequestAchievementsEvent = 2562; //public static final int RequestAchievementsEvent = 2562;
/*
Wired
*/
/*public static final int WiredTriggerSaveDataEvent = 3201;
public static final int WiredEffectSaveDataEvent = 3006;
public static final int WiredConditionSaveDataEvent = 1041;*/
/*
Pets
*/
/*public static final int RequestPetInformationEvent = 777;
public static final int PetPickupEvent = 863;
public static final int ScratchPetEvent = 3464;
public static final int RequestPetTrainingPanelEvent = 2476;
public static final int HorseUseItemEvent = 1616;
public static final int HorseRideSettingsEvent = 2448;
public static final int HorseRideEvent = 3268;*/
/*
Groups
*/
/* public static final int RequestGuildBuyRoomsEvent = 701;
public static final int RequestGuildPartsEvent = 2344;
public static final int RequestGuildBuyEvent = 872;
public static final int RequestGuildInfoEvent = 2079;
public static final int RequestGuildManageEvent = 2418;
public static final int RequestGuildMembersEvent = 2382;
public static final int RequestGuildJoinEvent = 77;
public static final int GuildChangeNameDescEvent = 3232;
public static final int GuildChangeBadgeEvent = 1475;
public static final int GuildChangeColorsEvent = 463;
public static final int GuildRemoveMemberEvent = 3002;
public static final int GuildRemoveAdminEvent = 3264;
public static final int GuildChangeSettingsEvent = 2156;
public static final int GuildAcceptMembershipEvent = 1066;
public static final int GuildDeclineMembershipEvent = 1320;
public static final int GuildSetAdminEvent = 2957;
public static final int GuildSetFavoriteEvent = 1463;
public static final int RequestOwnGuildsEvent = 2240;
public static final int RequestGuildFurniWidgetEvent = 3031;
/*
Trading
*/
/*public static final int TradeStartEvent = 466;
public static final int TradeOfferItemEvent = 2223;
public static final int TradeCancelOfferItemEvent = 373;
public static final int TradeAcceptEvent = 1062;
public static final int TradeUnAcceptEvent = 1131;
public static final int TradeConfirmEvent = 1144;
public static final int TradeCloseEvent = 3387;
/*
ModTool
*/
/* public static final int ModToolRequestRoomInfoEvent = 225;
public static final int ModToolRequestRoomChatlogEvent = 1903;
public static final int ModToolRequestUserInfoEvent = 3077;
public static final int ModToolPickTicketEvent = 3975;
public static final int ModToolAlertEvent = 1980;
public static final int ModToolKickEvent = 3418;
public static final int ModToolBanEvent = 2930;
public static final int ModToolWarnEvent = 3763;
public static final int ModToolRequestUserChatlogEvent = 203;
public static final int ModToolRoomAlertEvent = 295;
public static final int ModToolChangeRoomSettingsEvent = 2530;
public static final int ModToolRequestRoomVisitsEvent = 2549;
/*
Catalog
*/
/*public static final int Unknown3 = 3794; //Catalogue Initialized Composer?
public static final int RequestRecylerLogicEvent = 1077;
public static final int RequestCatalogIndexEvent = 81;
public static final int GetMarketplaceConfigEvent = 1952; //Configuration IDs composer?
public static final int RequestDiscountEvent = 3794;
public static final int RequestCatalogModeEvent = 3406;
public static final int RequestGiftConfigurationEvent = 382;
public static final int RequestCatalogPageEvent = 1754;
public static final int CatalogBuyItemEvent = 2967;
public static final int CatalogBuyItemAsGiftEvent = 2474;
public static final int RedeemVoucherEvent = 1571;
public static final int ReloadRecyclerEvent = 2779;
public static final int RecycleEvent = 2318;
public static final int OpenRecycleBoxEvent = 3977;
public static final int RequestPetBreedsEvent = 1064;
public static final int CheckPetNameEvent = 678;
public static final int GetClubDataEvent = 1608;
/*
Polls
*/
/* public static final int CancelPollEvent = 276;
public static final int GetPollDataEvent = 1960;
public static final int AnswerPollEvent = 1847;
/*
Marketplace
*/
/*public static final int RequestOwnItemsEvent = 829;
public static final int TakeBackItemEvent = 2910;
public static final int RequestOffersEvent = 541;
public static final int RequestItemInfoEvent = 36;
public static final int BuyItemEvent = 3878;
public static final int RequestSellItemEvent = 2087;
public static final int SellItemEvent = 172;
public static final int RequestCreditsEvent = 2138;
/*
Handshake
*/
/* public static final int ReleaseVersionEvent = 4000;
public static final int RequestBannerToken = 2619;
public static final int GenerateSecretKeyEvent = 3575;
public static final int MachineIDEvent = 512;
public static final int SecureLoginEvent = 1309;
/*
Friends
*/
/*public static final int RequestFriendsEvent = 776;
public static final int ChangeRelationEvent = 2521;
public static final int RemoveFriendEvent = 2786;
public static final int SearchUserEvent = 1267;
public static final int FriendRequestEvent = 3765;
public static final int AcceptFriendRequest = 333;
public static final int FriendPrivateMessageEvent = 1527;
public static final int RequestFriendRequestEvent = 275;
public static final int StalkFriendEvent = 3394;
/*
HotelView
*/
/* public static final int HotelViewEvent = 3266;
public static final int RequestBonusRareEvent = 1199;
public static final int RequestNewsListEvent = 896;
public static final int HotelViewDataEvent = 595;
/*
Navigator
*/
/*public static final int RequestRoomCategoriesEvent = 1431;
public static final int RequestPublicRoomsEvent = 3735;
public static final int RequestPopularRoomsEvent = 235;
public static final int RequestHighestScoreRoomsEvent = 1728;
public static final int RequestMyRoomsEvent = 2676;
public static final int RequestCanCreateRoomEvent = 3844;
public static final int RequestPromotedRoomsEvent = 3030;
public static final int RequestCreateRoomEvent = 3524;
public static final int RequestTagsEvent = 1337;
public static final int SearchRoomsByTagEvent = 1956;
public static final int SearchRoomsEvent = 3551;
public static final int SearchRoomsFriendsNowEvent = 3306;
public static final int SearchRoomsFriendsOwnEvent = 3478;
public static final int SearchRoomsWithRightsEvent = 3785;
public static final int SearchRoomsInGroupEvent = 1160;
public static final int SearchRoomsMyFavoriteEvent = 1532;
public static final int SearchRoomsVisitedEvent = 589;
/*
Rooms
*/
/* public static final int RequestRoomLoadEvent = 3751; //3751
public static final int RoomVoteEvent = 242;
public static final int RequestRoomSettingsEvent = 3741;
public static final int RequestHeightmapEvent = 308;
public static final int RequestRoomDataEvent = 183;
public static final int RoomSettingsSaveEvent = 2384;
public static final int RoomUserTalkEvent = 3349;
public static final int RoomUserShoutEvent = 936;
public static final int RoomUserWhisperEvent = 1362;
public static final int RoomUserActionEvent = 475;
public static final int RoomUserSitEvent = 484;
public static final int RoomUserDanceEvent = 1139;
public static final int RoomUserSignEvent = 2189;
public static final int RoomUserGiveRespectEvent = 2041;
public static final int RoomUserWalkEvent = 951;
public static final int RoomPlaceItemEvent = 474;
public static final int RotateMoveItemEvent = 194;
public static final int MoveWallItemEvent = 1029;
public static final int RoomPickupItemEvent = 152;
public static final int RoomPlacePaintEvent = 874;
public static final int RoomUserStartTypingEvent = 3684;
public static final int RoomUserStopTypingEvent = 2005;
public static final int ToggleFloorItemEvent = 120;
public static final int ToggleWallItemEvent = 2650;
public static final int RoomUserLookAtPoint = 1365;
public static final int RoomBackgroundEvent = 2715;
public static final int MannequinSaveNameEvent = 2098;
public static final int MannequinSaveLookEvent = 1804;
public static final int AdvertisingSaveEvent = 68;
public static final int RoomUserDropHandItemEvent = 157;
public static final int BotPlaceEvent = 148;
public static final int BotPickupEvent = 2865;
public static final int BotSaveSettingsEvent = 1384;
public static final int BotSettingsEvent = 3098;
public static final int TriggerDiceEvent = 987;
public static final int CloseDiceEvent = 1739;
public static final int TriggerColorWheelEvent = 2367;
public static final int MoodLightSettingsEvent = 2468;
public static final int MoodLightTurnOnEvent = 1181;
public static final int RedeemItemEvent = 3599;
public static final int RequestRoomRightsEvent = 2928;
public static final int RoomRemoveAllRightsEvent = 405;
public static final int RoomUserGiveRightsEvent = 2221;
public static final int RoomUserRemoveRightsEvent = 3639;
public static final int PetPlaceEvent = 3711;
public static final int RoomUserKickEvent = 1874;
public static final int SetStackHelperHeightEvent = 2540;
/*
Users
*/
/* public static final int RequestUserDataEvent = 112;
public static final int RequestUserCreditsEvent = 938;
public static final int RequestUserClubEvent = 3874;
public static final int RequestMeMenuSettingsEvent = 671;
public static final int RequestUserCitizinShipEvent = 3096;
public static final int RequestUserProfileEvent = 532;
public static final int RequestProfileFriendsEvent = 3925;
public static final int RequestUserTagsEvent = 3102;
public static final int RequestUserWardrobeEvent = 1251;
public static final int SaveWardrobeEvent = 637;
public static final int UserSaveLookEvent = 2404;
public static final int SaveMottoEvent = 2832;
public static final int UserWearBadgeEvent = 2473;
public static final int RequestWearingBadgesEvent = 3968;
/*
Inventory
*/
/* public static final int RequestInventoryItemsEvent = 372; // 1223
public static final int RequestInventoryPetsEvent = 1900;
public static final int RequestInventoryBadgesEvent = 3072;
public static final int RequestInventoryBotsEvent = 1351;
/*
Not correctly implemented
*/
/*public static final int RequestResolutionEvent = 1854;*/
/*public static final int MannequinSaveLookEvent = 2252;//1804
public static final int RequestCatalogPageEvent = 1904;//1754
public static final int RequestWearingBadgesEvent = 3364;//3968
public static final int BotPickupEvent = 1890;//2865
public static final int HorseRideEvent = 1425;//3268
public static final int RequestCreateRoomEvent = 1075;//3524
public static final int SaveMottoEvent = 3060;//2832
public static final int GenerateSecretKeyEvent = 2342;//3575
public static final int ModToolAlertEvent = 641;//1980
public static final int TradeAcceptEvent = 843;//1062
public static final int RequestCatalogModeEvent = 2941;//3406
public static final int RequestUserCreditsEvent = 3985;//938
public static final int FriendPrivateMessageEvent = 2046;//1527
public static final int CloseDiceEvent = 2438;//1739
public static final int RoomUserRemoveRightsEvent = 1872;//3639
public static final int GuildDeclineMembershipEvent = 3464;//1320
public static final int AnswerPollEvent = 3647;//1847
public static final int UserWearBadgeEvent = 2265;//2473
public static final int RoomVoteEvent = -242;//242
public static final int RoomUserSignEvent = 1037;//2189
public static final int RequestUserDataEvent = 3243;//112
public static final int RoomUserShoutEvent = 1559;//936
public static final int ScratchPetEvent = 2363;//3464
public static final int RoomUserWalkEvent = 3264;//951
public static final int RequestUserTagsEvent = 3364;//3102
public static final int RequestTagsEvent = 3906;//1337
public static final int GetMarketplaceConfigEvent = 1142;//1952
public static final int RequestHeightmapEvent = 2450;//308
public static final int TradeCloseEvent = 759;//3387
public static final int CatalogBuyItemEvent = 3269;//2967
public static final int RequestGuildMembersEvent = 556;//2382
public static final int RequestPetInformationEvent = 1330;//777
public static final int RoomUserWhisperEvent = 3700;//1362
public static final int ModToolRequestUserInfoEvent = 852;//3077
public static final int RotateMoveItemEvent = 3753;//194
public static final int CancelPollEvent = 797;//276
public static final int RequestRoomLoadEvent = 2144;//3751 //2086 //2144
public static final int RequestGuildPartsEvent = 2165;//2344
public static final int RoomPlacePaintEvent = 2534;//874
public static final int RequestPopularRoomsEvent = 1627;//2346;//235
public static final int ModToolRequestRoomInfoEvent = 346;//225
public static final int FriendRequestEvent = 3667;//3765
public static final int RecycleEvent = 2627;//2318
public static final int RequestRoomCategoriesEvent = 783;//1431
public static final int ToggleWallItemEvent = 3649;//2650
public static final int RoomUserTalkEvent = 2462;//3349
public static final int HotelViewDataEvent = 3813;//595
public static final int RoomUserDanceEvent = 1764;//1139
public static final int RequestUserProfileEvent = 1299;//532
public static final int SearchRoomsFriendsNowEvent = 542;//3306
public static final int SetStackHelperHeightEvent = 3280;//2540
public static final int RedeemVoucherEvent = 114;//1571
public static final int HorseUseItemEvent = 1105;//1616
public static final int BuyItemEvent = 3161;//3878
public static final int AdvertisingSaveEvent = 3645;//68
public static final int RequestPetTrainingPanelEvent = 2867;//2476
public static final int RoomBackgroundEvent = 1275;//2715
public static final int RequestNewsListEvent = 1205;//896
public static final int RequestPromotedRoomsEvent = 3527;//3030
public static final int GuildSetAdminEvent = 1954;//2957
public static final int GetClubDataEvent = 1232;//1608
public static final int RequestMeMenuSettingsEvent = 254;//671
public static final int MannequinSaveNameEvent = 2872;//2098
public static final int SellItemEvent = 1147;//172
public static final int GuildAcceptMembershipEvent = 816;//1066
public static final int RequestBannerToken = 1497;//2619
public static final int RequestRecylerLogicEvent = 2669;//1077
public static final int RequestGuildJoinEvent = 1971;//77
public static final int RequestCatalogIndexEvent = 1789;//81
public static final int RequestInventoryPetsEvent = 3555;//1900
public static final int ModToolRequestRoomVisitsEvent = 1854;//2549
public static final int ModToolWarnEvent = 2891;//3763
public static final int RequestItemInfoEvent = 2326;//36
public static final int ModToolRequestRoomChatlogEvent = 2285;//1903
public static final int UserSaveLookEvent = 2889;//2404
public static final int ToggleFloorItemEvent = 2970;//120
public static final int TradeUnAcceptEvent = 1287;//1131
public static final int WiredTriggerSaveDataEvent = 3931;//3201
public static final int RoomRemoveAllRightsEvent = 36;//405
public static final int TakeBackItemEvent = 560;//2910
public static final int OpenRecycleBoxEvent = 3502;//3977
public static final int GuildChangeNameDescEvent = 3503;//3232
public static final int RequestSellItemEvent = 1380;//2087
public static final int ModToolChangeRoomSettingsEvent = 2571;//2530
public static final int ModToolRequestUserChatlogEvent = 600;//203
public static final int GuildChangeSettingsEvent = 1026;//2156
public static final int RoomUserDropHandItemEvent = 1699;//157
public static final int RequestProfileFriendsEvent = 3510;//3925
public static final int TradeCancelOfferItemEvent = 2646;//373
public static final int TriggerDiceEvent = 1000;//987
public static final int GetPollDataEvent = 491;//1960
public static final int MachineIDEvent = -512;//512
public static final int RequestDiscountEvent = 458;//3794
public static final int RequestFriendRequestEvent = 1823;//275
public static final int RoomSettingsSaveEvent = 1824;//2384
public static final int AcceptFriendRequest = 3110;//333
public static final int ReleaseVersionEvent = 4000;//4000
public static final int SearchRoomsMyFavoriteEvent = 1181;//1532
public static final int TradeStartEvent = 2842;//466
public static final int ChangeRelationEvent = 668;//2521
public static final int RoomUserSitEvent = 2292;//484
public static final int RequestCanCreateRoomEvent = 3929;//3844
public static final int ModToolKickEvent = 1132;//3418
public static final int MoveWallItemEvent = 3043;//1029
public static final int SearchRoomsEvent = 2188;//3551
public static final int RequestHighestScoreRoomsEvent = 1379;//1728
public static final int CatalogBuyItemAsGiftEvent = 3186;//2474
public static final int RoomUserGiveRespectEvent = 2901;//2041
public static final int RemoveFriendEvent = 3767;//2786
public static final int SearchRoomsFriendsOwnEvent = 1870;//3478
public static final int GuildSetFavoriteEvent = 2864;//1463
public static final int PetPlaceEvent = 81;//3711
public static final int BotSettingsEvent = 3630;//3098
public static final int StalkFriendEvent = 3829;//3394
public static final int RoomPickupItemEvent = 2316;//152
public static final int RedeemItemEvent = 3333;//3599
public static final int RequestFriendsEvent = 2386;//776
public static final int RequestAchievementsEvent = 3474;//2562
public static final int GuildChangeColorsEvent = 3260;//463
public static final int RequestInventoryBadgesEvent = 2480;//3072
public static final int RequestPetBreedsEvent = 3851;//1064
public static final int GuildChangeBadgeEvent = 2754;//1475
public static final int ModToolBanEvent = 574;//2930
public static final int SaveWardrobeEvent = 1188;//637
public static final int HotelViewEvent = 1784;//3266
public static final int ModToolPickTicketEvent = 3088;//3975
public static final int ModToolReleaseTicketEvent = 734;
public static final int ModToolCloseTicketEvent = 1837;
public static final int TriggerColorWheelEvent = 2882;//2367
public static final int SearchRoomsByTagEvent = -1956;//1956
public static final int RequestPublicRoomsEvent = 2021;//3735 //UPDATED OLD 3178
public static final int RequestResolutionEvent = 3871;//1854
public static final int Unknown3 = 458;//3794
public static final int RequestInventoryItemsEvent = 1920;//372
public static final int ModToolRoomAlertEvent = 1863;//295
public static final int WiredEffectSaveDataEvent = 1645;//3006
public static final int CheckPetNameEvent = 3567;//678
public static final int SecureLoginEvent = 1957;//1309
public static final int BotSaveSettingsEvent = 736;//1384
public static final int RequestGuildBuyEvent = 2594;//872
public static final int SearchUserEvent = 3026;//1267
public static final int GuildRemoveMemberEvent = 353;//3002
public static final int WiredConditionSaveDataEvent = 2096;//1041
public static final int RoomUserLookAtPoint = 2115;//1365
public static final int MoodLightTurnOnEvent = 883;//1181
public static final int MoodLightSettingsEvent = 3878;//2468
public static final int RequestMyRoomsEvent = 2360;//2676
public static final int RequestCreditsEvent = 1623;//2138
public static final int SearchRoomsInGroupEvent = 2066;//1160
public static final int HorseRideSettingsEvent = 1731;//2448
public static final int HandleDoorbellEvent = 91;
public static final int RoomUserKickEvent = 1718;//1874
public static final int RoomPlaceItemEvent = 2554;//474
public static final int RequestInventoryBotsEvent = 3549;//1351
public static final int RequestUserWardrobeEvent = 3057;//1251
public static final int RequestRoomRightsEvent = 2197;//2928
public static final int RequestGuildBuyRoomsEvent = 1035;//701
public static final int BotPlaceEvent = 2143;//148
public static final int SearchRoomsWithRightsEvent = 307;//3785
public static final int RequestBonusRareEvent = 1966;//1199
public static final int GuildRemoveAdminEvent = 864;//3264
public static final int RequestRoomSettingsEvent = 2176;//3741
public static final int RequestOffersEvent = 2688;//541
public static final int RequestUserCitizinShipEvent = 2151;//3096
public static final int RoomUserStopTypingEvent = 3890;//2005
public static final int RoomUserStartTypingEvent = 3896;//3684
public static final int RequestGuildManageEvent = 3169;//2418
public static final int RequestUserClubEvent = 2189;//3874
public static final int PetPickupEvent = -3167;//863
public static final int RequestOwnGuildsEvent = 484;//2240
public static final int SearchRoomsVisitedEvent = 24;//589
public static final int TradeOfferItemEvent = 1324;//2223
public static final int TradeConfirmEvent = 3866;//1144
public static final int RoomUserGiveRightsEvent = 3167;//2221
public static final int RequestGuildInfoEvent = 331;//2079
public static final int ReloadRecyclerEvent = 72;//2779
public static final int RoomUserActionEvent = 2000;//475
public static final int RequestGiftConfigurationEvent = 102;//382
public static final int RequestRoomDataEvent = 2086;//183
public static final int RequestRoomHeightmapEvent = 3075;
public static final int RequestGuildFurniWidgetEvent = 3239;//3031
public static final int RequestOwnItemsEvent = 1486;//829
public static final int RequestReportRoomEvent = 2343;
public static final int ReportEvent = 330;
public static final int TriggerOneWayGateEvent = 408;
public static final int FloorPlanEditorSaveEvent = 2324;
public static final int FloorPlanEditorRequestDoorSettingsEvent = 1168;
public static final int FloorPlanEditorRequestBlockedTilesEvent = 1241;*/
public static final int MannequinSaveLookEvent = 3770;//1804 //Updated public static final int MannequinSaveLookEvent = 3770;//1804 //Updated
public static final int RequestCatalogPageEvent = 2914;//1754 //Updated public static final int RequestCatalogPageEvent = 2914;//1754 //Updated

View File

@ -14,9 +14,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.SQLException; import java.sql.SQLException;
/**
* Created on 25-8-2014 18:11.
*/
public class FriendRequestEvent extends MessageHandler public class FriendRequestEvent extends MessageHandler
{ {
@Override @Override

View File

@ -9,12 +9,7 @@ public class RequestFriendsEvent extends MessageHandler
@Override @Override
public void handle() throws Exception public void handle() throws Exception
{ {
/*ArrayList<ServerMessage> messages = new ArrayList<ServerMessage>();
messages.add(new FriendsComposer(this.client.getHabbo()).compose());
messages.add(new MessengerInitComposer(this.client.getHabbo()).compose());
this.client.sendResponses(messages);*/
//this.client.sendResponse(new FriendsComposer(this.client.getHabbo())); //this.client.sendResponse(new FriendsComposer(this.client.getHabbo()));

View File

@ -26,17 +26,7 @@ import java.util.ArrayList;
public class SecureLoginEvent extends MessageHandler public class SecureLoginEvent extends MessageHandler
{ {
/*************************************************************************************************
*
##### ####### # # ####### ####### ####### ###### ### #######
# # # # ## # # # # # # # # #
# # # # # # # # # # # # # # #
# # # # # # # # # # ##### # # # #
# # # # # # # # # # # # # # #
# # # # # ## # # # # # # # #
##### ####### # # ####### # ####### ###### ### #
* -The General
*************************************************************************************************/
@Override @Override
public void handle() throws Exception public void handle() throws Exception

View File

@ -20,17 +20,7 @@ import java.util.ArrayList;
public class SecureLoginEvent_BACKUP extends MessageHandler public class SecureLoginEvent_BACKUP extends MessageHandler
{ {
/*************************************************************************************************
*
##### ####### # # ####### ####### ####### ###### ### #######
# # # # ## # # # # # # # # #
# # # # # # # # # # # # # # #
# # # # # # # # # # ##### # # # #
# # # # # # # # # # # # # # #
# # # # # ## # # # # # # # #
##### ####### # # ####### # ####### ###### ### #
* -The General
*************************************************************************************************/
@Override @Override
public void handle() throws Exception public void handle() throws Exception
@ -55,26 +45,9 @@ public class SecureLoginEvent_BACKUP extends MessageHandler
ArrayList<ServerMessage> messages = new ArrayList<ServerMessage>(); ArrayList<ServerMessage> messages = new ArrayList<ServerMessage>();
/*messages.add(new SecureLoginOKComposer().compose());
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose());
messages.add(new FriendsComposer(this.client.getHabbo()).compose());
messages.add(new MessengerInitComposer(this.client.getHabbo()).compose());
messages.add(new HotelViewDataComposer(",2013-05-08 13:00,gamesmaker;2013-05-11 13:00", "").compose());
messages.add(new AddHabboItemComposer(this.client.getHabbo().getInventory().getItemsComponent().getItemsAsValueCollection()).compose());
for(int i = 0; i < 9; i++)
{
messages.add(new MinimailCountComposer().compose());
}
messages.add(new UserEffectsListComposer().compose());
this.client.sendResponses(messages);*/
/*messages.add(new SecureLoginOKComposer().compose());
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose());
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
messages.add(new MessengerInitComposer(this.client.getHabbo()).compose());
messages.add(new FriendsComposer(this.client.getHabbo()).compose());*/
messages.add(new SecureLoginOKComposer().compose()); messages.add(new SecureLoginOKComposer().compose());
messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), 0).compose()); messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), 0).compose());
@ -112,31 +85,8 @@ public class SecureLoginEvent_BACKUP extends MessageHandler
//this.client.sendResponse(new UserEffectsListComposer()); //this.client.sendResponse(new UserEffectsListComposer());
/* ServerMessage msg = new MinimailCountComposer().compose();
for(int i = 0; i < 9; i++)
{
//Not sure why habbo does this. ohwell.
this.client.sendResponse(msg);
}*/
/*
this.client.sendResponse(new DebugConsoleComposer());
this.client.sendResponse(new MessengerInitComposer(this.client.getHabbo()));
this.client.sendResponse(new NewUserIdentityComposer());
this.client.sendResponse(new UserPermissionsComposer(this.client.getHabbo()));
this.client.sendResponse(new UserPerksComposer());
this.client.sendResponse(new SessionRightsComposer());
//this.client.sendResponse(new AddHabboItemComposer(this.client.getHabbo().getInventory().getItemsComponent().getItemsAsValueCollection()));
this.client.sendResponse(new UserClothesComposer());
//this.client.sendResponse(new UnknownComposer4());
//this.client.sendResponse(new UnknownComposer5());
this.client.sendResponse(new BuildersClubExpiredComposer());
this.client.sendResponse(new FavoriteRoomsCountComposer());
this.client.sendResponse(new UserCurrencyComposer(this.client.getHabbo()));
this.client.sendResponse(new UserAchievementScoreComposer(this.client.getHabbo()));
this.client.sendResponse(new HotelViewDataComposer(",2013-05-08 13:00,gamesmaker;2013-05-11 13:00", ""));*/
Emulator.getPluginManager().fireEvent(new UserLoginEvent(habbo, this.client.getChannel().localAddress())); Emulator.getPluginManager().fireEvent(new UserLoginEvent(habbo, this.client.getChannel().localAddress()));

View File

@ -9,30 +9,8 @@ public class HotelViewDataEvent extends MessageHandler {
public void handle() public void handle()
{ {
/*String[] data = hotelViewData.split(",");
if(data.length > 1)
{
this.client.sendResponse(new HotelViewDataComposer(hotelViewData, data[data.length - 1].replace(";", "")));
System.out.println("Hotelview Data: " + hotelViewData);
}
else
{
System.out.println("Hotelview Data error: " + hotelViewData);
this.client.sendResponse(new HotelViewDataComposer(hotelViewData, ""));
}*/
/*String hotelViewData = this.packet.readString();
String[] types = hotelViewData.split(";");
for(String s : types)
{
if(!s.contains(","))
continue;
String[] data = s.split(",");
this.client.sendResponse(new HotelViewDataComposer(hotelViewData, data[data.length - 1]));
}*/
try try
{ {

View File

@ -33,58 +33,7 @@ public class JukeBoxAddSoundTrackEvent extends MessageHandler
if (item instanceof InteractionMusicDisc) if (item instanceof InteractionMusicDisc)
{ {
/*for (HabboItem jukeBox : room.getRoomSpecialTypes().getItemsOfType(InteractionJukeBox.class))
{
if (jukeBox instanceof InteractionJukeBox)
{
SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(((InteractionMusicDisc) item).getSongId());
ArrayList<SoundTrack> soundTracks = new ArrayList<SoundTrack>();
soundTracks.add(track);
if (!((InteractionJukeBox)jukeBox).hasItemInPlaylist(itemId))
{
((InteractionJukeBox) jukeBox).addToPlayList(itemId, room);
}
else
{
((InteractionJukeBox) jukeBox).removeFromPlayList(itemId, room);
}
//room.sendComposer(new JukeBoxPlayListComposer(((InteractionJukeBox) jukeBox), room).compose());
THashSet<SoundTrack> soundTrackTHashSet = new THashSet<>();
List<Integer> toRemove = new ArrayList<Integer>();
((InteractionJukeBox) jukeBox).getMusicDisks().forEach(new TIntProcedure()
{
@Override
public boolean execute(int i)
{
HabboItem item = room.getHabboItem(i);
if (item != null && item instanceof InteractionMusicDisc)
{
SoundTrack track = Emulator.getGameEnvironment().getItemManager().getSoundTrack(((InteractionMusicDisc) item).getSongId());
if (track != null)
{
soundTrackTHashSet.add(track);
return true;
}
}
toRemove.add(i);
return true;
}
});
for (Integer i : toRemove)
{
((InteractionJukeBox) jukeBox).removeFromPlayList(i, room);
}
room.sendComposer(new JukeBoxPlayListUpdatedComposer(soundTrackTHashSet).compose());
}
break;
}*/
if (this.client.getHabbo().getHabboInfo().getCurrentRoom().hasRights(this.client.getHabbo())) if (this.client.getHabbo().getHabboInfo().getCurrentRoom().hasRights(this.client.getHabbo()))
{ {

View File

@ -17,10 +17,7 @@ public class RequestUserDataEvent extends MessageHandler
if (this.client.getHabbo() != null) if (this.client.getHabbo() != null)
{ {
//this.client.sendResponse(new TestComposer()); //this.client.sendResponse(new TestComposer());
/*this.client.sendResponse(new MinimailCountComposer());
this.client.sendResponse(new MessengerInitComposer(this.client.getHabbo()));
this.client.sendResponse(new UserPermissionsComposer(this.client.getHabbo()));
this.client.sendResponse(new SessionRightsComposer());*/
//this.client.sendResponse(new UserDataComposer(this.client.getHabbo())); //this.client.sendResponse(new UserDataComposer(this.client.getHabbo()));
//this.client.sendResponse(new HotelViewComposer()); //this.client.sendResponse(new HotelViewComposer());
//this.client.sendResponse(new UserHomeRoomComposer()); //this.client.sendResponse(new UserHomeRoomComposer());
@ -35,42 +32,11 @@ public class RequestUserDataEvent extends MessageHandler
//this.client.sendResponse(new GenericAlertComposer(Emulator.getTexts().getValue("hotel.alert.message.welcome").replace("%user%", this.client.getHabbo().getHabboInfo().getUsername()), this.client.getHabbo())); //this.client.sendResponse(new GenericAlertComposer(Emulator.getTexts().getValue("hotel.alert.message.welcome").replace("%user%", this.client.getHabbo().getHabboInfo().getUsername()), this.client.getHabbo()));
//******// //
ArrayList<ServerMessage> messages = new ArrayList<ServerMessage>(); ArrayList<ServerMessage> messages = new ArrayList<ServerMessage>();
/*
messages.add(new MinimailCountComposer().compose());
messages.add(new FavoriteRoomsCountComposer().compose());
messages.add(new UserPermissionsComposer(this.client.getHabbo()).compose());
messages.add(new SessionRightsComposer().compose());
messages.add(new DebugConsoleComposer().compose());
messages.add(new UserCurrencyComposer(this.client.getHabbo()).compose());
messages.add(new UserDataComposer(this.client.getHabbo()).compose());
messages.add(new UserPerksComposer().compose());
messages.add(new BuildersClubExpiredComposer().compose());
messages.add(new UserBCLimitsComposer().compose());
messages.add(new UserAchievementScoreComposer(this.client.getHabbo()).compose());
messages.add(new UserClothesComposer().compose());
messages.add(new UserClubComposer(this.client.getHabbo()).compose());
messages.add(new MeMenuSettingsComposer().compose());
if(this.client.getHabbo().hasPermission("acc_supporttool"))
{
this.client.sendResponse(new ModToolComposer());
}
messages.add(new CatalogUpdatedComposer().compose());
messages.add(new CatalogModeComposer(0).compose());
messages.add(new DiscountComposer().compose());
messages.add(new MarketplaceConfigComposer().compose());
messages.add(new GiftConfigurationComposer().compose());
messages.add(new RecyclerLogicComposer().compose());
//
//messages.add(new MessengerInitComposer(this.client.getHabbo()).compose());
this.client.sendResponses(messages);
*/
// messages.add(new DebugConsoleComposer().compose()); // messages.add(new DebugConsoleComposer().compose());
// messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose()); // messages.add(new UserHomeRoomComposer(this.client.getHabbo().getHabboInfo().getHomeRoom(), this.client.getHabbo().getHabboInfo().getHomeRoom()).compose());
@ -134,19 +100,7 @@ public class RequestUserDataEvent extends MessageHandler
this.client.sendResponses(messages); this.client.sendResponses(messages);
/*this.client.sendResponse(new MinimailCountComposer());
this.client.sendResponse(new UserPermissionsComposer(this.client.getHabbo()));
this.client.sendResponse(new SessionRightsComposer());
this.client.sendResponse(new DebugConsoleComposer());
this.client.sendResponse(new UserCurrencyComposer(this.client.getHabbo()));
this.client.sendResponse(new UserDataComposer(this.client.getHabbo()));
this.client.sendResponse(new UserPerksComposer());
this.client.sendResponse(new HotelViewDataComposer(",2013-05-08 13:00,gamesmaker;2013-05-11 13:00", ""));
//this.client.sendResponse(new MessengerInitComposer(this.client.getHabbo()));
this.client.sendResponse(new FavoriteRoomsCountComposer());
this.client.sendResponse(new UserBCLimitsComposer());
this.client.sendResponse(new UserAchievementScoreComposer(this.client.getHabbo()));
this.client.sendResponse(new UserClothesComposer());*/
} }
else else
{ {

View File

@ -397,24 +397,11 @@ public class Outgoing
public final static int UnknownQuestComposer1 = 230; // PRODUCTION-201611291003-338511768 public final static int UnknownQuestComposer1 = 230; // PRODUCTION-201611291003-338511768
public final static int ModToolSanctionDataComposer = 2782; // PRODUCTION-201611291003-338511768 public final static int ModToolSanctionDataComposer = 2782; // PRODUCTION-201611291003-338511768
public final static int RoomEventMessageComposer = 2274; public final static int RoomEventMessageComposer = 2274;
/**
* int << count
* {
* string << ?
* int << Count
* {
* string << Name
* int << ID
* string << Consequence
* }
* }
*/
/**
* Music Disks / Trax / Jukebox
*/
public final static int JukeBoxMySongsComposer = 2602; // PRODUCTION-201611291003-338511768 public final static int JukeBoxMySongsComposer = 2602; // PRODUCTION-201611291003-338511768
public final static int JukeBoxNowPlayingMessageComposer = 469; // PRODUCTION-201611291003-338511768 public final static int JukeBoxNowPlayingMessageComposer = 469; // PRODUCTION-201611291003-338511768
public final static int JukeBoxPlaylistFullComposer = 105; // PRODUCTION-201611291003-338511768 public final static int JukeBoxPlaylistFullComposer = 105; // PRODUCTION-201611291003-338511768
@ -424,9 +411,7 @@ public class Outgoing
public final static int JukeBoxTrackDataComposer = 3365; // PRODUCTION-201611291003-338511768 public final static int JukeBoxTrackDataComposer = 3365; // PRODUCTION-201611291003-338511768
public final static int JukeBoxTrackCodeComposer = 1381; // PRODUCTION-201611291003-338511768 public final static int JukeBoxTrackCodeComposer = 1381; // PRODUCTION-201611291003-338511768
/**
* Crafting
*/
public final static int CraftableProductsComposer = 1000; // PRODUCTION-201611291003-338511768 public final static int CraftableProductsComposer = 1000; // PRODUCTION-201611291003-338511768
public final static int CraftingRecipeComposer = 2774; // PRODUCTION-201611291003-338511768 public final static int CraftingRecipeComposer = 2774; // PRODUCTION-201611291003-338511768
public final static int CraftingResultComposer = 618; // PRODUCTION-201611291003-338511768 public final static int CraftingResultComposer = 618; // PRODUCTION-201611291003-338511768
@ -549,37 +534,7 @@ public class Outgoing
public final static int UnknownGuildComposer3 = 876; public final static int UnknownGuildComposer3 = 876;
public final static int GameCenterGameComposer = 3805; public final static int GameCenterGameComposer = 3805;
/*
0x0909 //unused
1347 //Unused cry[to
195 //unused
1982 //unused
2142 //unused
2494 //u
2668 //u
2756 //u
2819 //u
3035 //u
3099 //u
3138 //u
3191 //u
3560 //Game2WeeklyLeaderboardParser
3684 //u
3805 //u Gamecomposer
3863 //u
3885 //u Crypto
3915 //u
416 //u
463 //u
600 //u
761 //u
872 //u
*/
public static final int SnowStormGameStartedComposer = 5000; public static final int SnowStormGameStartedComposer = 5000;
public static final int SnowStormQuePositionComposer = 5001; public static final int SnowStormQuePositionComposer = 5001;

View File

@ -3,449 +3,33 @@ package com.eu.habbo.messages.outgoing;
public class Outgoing_1006 public class Outgoing_1006
{ {
/*
Talents
*/
//public static final int TalentTrackComposer = 2842; //public static final int TalentTrackComposer = 2842;
/*
Wired
*/
/*public static final int WiredTriggerDataComposer = 861;
public static final int WiredEffectDataComposer = 1279;
public static final int WiredConditionDataComposer = 1639;
public static final int WiredSavedComposer = 39;
/*
Pets
*/
/*public static final int PetInformationComposer = 2286;
public static final int RoomPetRespectComposer = 778;
public static final int RoomPetExperienceComposer = 717;
public static final int PetTrainingPanelComposer = 456;
public static final int RoomPetHorseFigureComposer = 1644;
/*
Groups
*/
/*public static final int GuildBuyRoomsComposer = 3938;
public static final int GroupPartsComposer = 567;
public static final int GuildBoughtComposer = 389;
public static final int GuildInfoComposer = 2978;
public static final int GuildManageComposer = 601;
public static final int GuildMembersComposer = 3986;
public static final int GuildJoinErrorComposer = 1952;
public static final int GuildRefreshMembersListComposer = 2055;
public static final int GuildMemberUpdateComposer = 862;
public static final int GuildListComposer = 587;
public static final int GuildFurniWidgetComposer = 269;
/*
Trading
*/
/*public static final int TradeUpdateComposer = 1221;
public static final int TradeStartComposer = 3713;
public static final int TradeStartFailComposer = 2320;
public static final int TradeCompleteComposer = 3766;
public static final int TradeCloseWindowComposer = 2000;
public static final int TradeStoppedComposer = 2020;
public static final int TradeAcceptedComposer = 741;
/*
ModTool
*/
/*public static final int ModToolComposer = 1901;
public static final int ModToolRoomInfoComposer = 3722;
public static final int ModToolRoomChatlogComposer = 3869;
public static final int ModToolRoomEntryInfoComposer = 2644;
public static final int ModToolUserInfoComposer = 2583;
public static final int ModToolUserChatlogComposer = 3738;
public static final int ModToolUserRoomVisitsComposer = 2129;
public static final int ModToolIssueInfoComposer = 2473;
public static final int ModToolIssueChatlogComposer = 1445;
public static final int ModToolIssueUpdateComposer = 3019;
public static final int ModToolComposerOne = 2303;
public static final int ModToolComposerTwo = 1917;
/*
Catalog
*/
/*public static final int GiftConfigurationComposer = 1048;
public static final int DiscountComposer = 1061;
public static final int MarketplaceConfigComposer = 2524;
public static final int CatalogUpdatedComposer = 2028;
public static final int CatalogModeComposer = 3442;
public static final int CatalogPagesListComposer = 1684;
public static final int CatalogPageComposer = 3518;
public static final int PurchaseOKComposer = 1189;
public static final int RecyclerLogicComposer = 1317;
public static final int ReloadRecyclerComposer = 1093;
public static final int RecyclerCompleteComposer = 2125;
public static final int ClubDataComposer = 1919;
public static final int MarketplaceOwnItemsComposer = 593;
public static final int MarketplaceCancelSaleComposer = 1959;
public static final int MarketplaceOffersComposer = 3289;
public static final int MarketplaceItemInfoComposer = 1066;
public static final int MarketplaceBuyErrorComposer = 1823;
public static final int MarketplaceSellItemComposer = 1932;
public static final int PetBreedsComposer = 3302;
public static final int PetNameErrorComposer = 3575;
/*
Alerts (All of them)
*/
/*public static final int AlertLimitedSoldOutComposer = 3290;
public static final int AlertPurchaseFailedComposer = 2602;
public static final int RedeemVoucherOKComposer = 2719;
public static final int RedeemVoucherErrorComposer = 2630;
public static final int RoomEnterErrorComposer = 1619;
public static final int WiredRewardAlertComposer = 723;
public static final int PetErrorComposer = 779;
public static final int BotErrorComposer = 3420;
public static final int BubbleAlertComposer = 777;
public static final int GenericErrorMessages = 2839;
/*
Handshake
*/
/*public static final int BannerTokenComposer = 3033;
public static final int SecureLoginOKComposer = 2753;
public static final int SessionRightsComposer = 1313;
public static final int DebugConsoleComposer = 336;
/*
HotelView
*/
/* public static final int HotelViewComposer = 3152;
public static final int HallOfFameComposer = 670;
public static final int NewsWidgetsComposer = 1345;
public static final int BonusRareComposer = 3517;
public static final int HotelViewDataComposer = 1374;
/*
Generic
*/
/* public static final int GenericAlertComposer = 1548;
public static final int MinimailCountComposer = 2253;
public static final int FavoriteRoomsCountComposer = 3829;
/*
Polls
*/
//public static final int PollStartComposer = 749; //public static final int PollStartComposer = 749;
//public static final int PollQuestionsComposer = 3187; //public static final int PollQuestionsComposer = 3187;
/*
Friends
*/
/*public static final int FriendsComposer = 2067;
public static final int UpdateFriendComposer = 170;
public static final int UserSearchResultComposer = 1573;
public static final int FriendRequestComposer = 2468;
public static final int RemoveFriendComposer = 1106;
public static final int FriendChatMessageComposer = 2094;
public static final int LoadFriendRequestsComposer = 2193;
public static final int FriendRequestErrorComposer = 2467;
public static final int StalkErrorComposer = 1135;
/*
Inventory
*/
/*public static final int InventoryItemsComposer = 3029;
public static final int InventoryPetsComposer = 435;
public static final int InventoryBotsComposer = 320;
public static final int InventoryBadgesComposer = 1629;
public static final int AddHabboItemComposer = 274;
public static final int AddBotComposer = 3043;
public static final int RemoveBotComposer = 2565;
public static final int RemoveHabboItemComposer = 3233;
public static final int InventoryRefreshComposer = 3243;
public static final int InventoryItemUpdateComposer = 1577;
public static final int AddPetComposer = 3099;
public static final int RemovePetComposer = 467;
public static final int InventoryAchievementsComposer = 3295;
/*
Navigator
*/
/*public static final int RoomCategoriesComposer = 3241;
public static final int PublicRoomsComposer = 2506;
public static final int PrivateRoomsComposer = 2653;
public static final int CanCreateRoomComposer = 2463;
public static final int RoomCreatedComposer = 3373;
public static final int TagsComposer = 3487;
/*
Rooms
*/
/*public static final int RoomPaintComposer = 2979;
public static final int RoomRightsComposer = 520;
public static final int RoomOwnerComposer = 1069;
public static final int RoomScoreComposer = 2805;
public static final int RoomDataComposer = 3995;
public static final int RoomHeightMapComposer = 1624;
public static final int RoomUsersComposer = 1073;
public static final int RoomThicknessComposer = 2627;
public static final int RoomOpenComposer = 925;
public static final int RoomModelComposer = 2297;
public static final int RoomRelativeMapComposer = 1975;
public static final int RoomPaneComposer = 2644;
public static final int RoomFloorItemsComposer = 2124;
public static final int RoomWallItemsComposer = 395;
public static final int RoomUserTalkComposer = 612;
public static final int RoomUserShoutComposer = 3271;
public static final int RoomUserWhisperComposer = 2323;
public static final int RoomUserActionComposer = 12;
public static final int RoomUserRespectComposer = 2143;
public static final int RoomUserDanceComposer = 2091;
public static final int RoomUserEffectComposer = 3040;
public static final int RoomUserStatusComposer = 3386;
public static final int RoomUserRemoveComposer = 2819;
public static final int AddWallItemComposer = 2156;
public static final int AddFloorItemComposer = 1590;
public static final int RemoveWallItemComposer = 2466;
public static final int RemoveFloorItemComposer = 36;
public static final int FloorItemUpdateComposer = 648;
public static final int UpdateStackHeightComposer = 1576;
public static final int RoomUserTypingComposer = 3624;
public static final int WallItemUpdateComposer = 2190;
public static final int RoomUserHandItemComposer = 3664;
public static final int RoomUserRemoveRightsComposer = 1496;
public static final int RoomRightsListComposer = 1891;
public static final int RoomAddRightsListComposer = 3611;
public static final int ChangeNameUpdatedComposer = 542;
public static final int BotSettingsComposer = 1522;
public static final int RoomSettingsUpdatedComposer = 543;
public static final int RoomChatSettingsComposer = 3710;
public static final int DoorbellAddUserComposer = 3198;
public static final int RoomAccessDeniedComposer = 3953;
public static final int MoodLightDataComposer = 2033;
public static final int ObjectOnRollerComposer = 1488;
public static final int PresentItemOpenedComposer = 1540;
public static final int FreezeLivesComposer = 3526;
/*
Users
*/
/*public static final int UserBCLimitsComposer = 3442;
public static final int UserCurrencyComposer = 3454;
public static final int UserDataComposer = 3491;
public static final int UserPerksComposer = 1218;
public static final int UserPermissionsComposer = 3872;
public static final int UserCreditsComposer = 2204;
public static final int UserClubComposer = 2869;
public static final int MeMenuSettingsComposer = 15;
public static final int UserCitizinShipComposer = 3439;
public static final int UserTagsComposer = 933;
public static final int UserHomeRoomComposer = 40;
public static final int UserProfileComposer = 1503;
public static final int ProfileFriendsComposer = 322;
public static final int UserUpdateCurrencyComposer = 1290;
public static final int UserWardrobeComposer = 370;
public static final int RoomUserDataComposer = 3944;
public static final int UserBadgesComposer = 3486;
public static final int AddUserBadgeComposer = 3197;
/*
Ones that are someway implemented but not correctly.
*/
public static final int PetStatusUpdateComposer = 3566; //Updated public static final int PetStatusUpdateComposer = 3566; //Updated
/*
Not implemented but know what they are:
*/
/*public static final int UserAddEffectComposer = 2181; //int, int, int (type, ?? (effectId?), duration
public final static int FavoriteRoomsCountComposer = 2420;//3829
public final static int UserCurrencyComposer = 584;//3454
public final static int RedeemVoucherOKComposer = 2136;//2719
public final static int RoomUserShoutComposer = 3274;//3271
public final static int RoomUserStatusComposer = 2566;//3386
public final static int RoomUserDataComposer = 2538;//3944
public final static int RoomAddRightsListComposer = 1992;//3611
public final static int RoomRemoveRightsListComposer = 2021;
public final static int RoomRightsListComposer = 2857;//1891
public final static int RoomUserHandItemComposer = 2425;//3664
public final static int RoomUsersComposer = 961;//1073
public final static int FriendRequestComposer = 3550;//2468
public final static int GuildBoughtComposer = 2087;//389
public final static int AddUserBadgeComposer = 10;//3197
public final static int RecyclerCompleteComposer = 1513;//2125
public final static int GuildBuyRoomsComposer = 3938;//3938
public final static int FriendsComposer = 1535;//2067
public final static int StalkErrorComposer = 1739;//1135
public final static int TradeCloseWindowComposer = 3545;//2000
public final static int RemoveFloorItemComposer = 679;//36
public final static int InventoryPetsComposer = 2799;//435
public final static int UserCreditsComposer = 689;//2204
public final static int WiredTriggerDataComposer = 3639;//861
public final static int TradeStoppedComposer = 1941;//2020
public final static int ModToolUserChatlogComposer = 912;//3738
public final static int GuildInfoComposer = 3398;//2978
public final static int UserPermissionsComposer = 3514;//3872
public final static int PetNameErrorComposer = 2773;//3575
public final static int TradeStartFailComposer = 796;//2320
public final static int AddHabboItemComposer = 828;//274
public final static int InventoryBotsComposer = 3908;//320
public final static int CanCreateRoomComposer = 1458;//2463
public final static int MarketplaceBuyErrorComposer = 3313;//1823
public final static int BonusRareComposer = 2194;//3517
public final static int HotelViewComposer = 2553;//3152
public final static int UpdateFriendComposer = 2605;//170 //2605
public final static int FloorItemUpdateComposer = 1334;//648
public final static int RoomAccessDeniedComposer = 1504;//3953
public final static int GuildFurniWidgetComposer = 2909;//269
public final static int GiftConfigurationComposer = 1965;//1048
public final static int UserClubComposer = 3926;//2869
public final static int InventoryBadgesComposer = 79;//1629
public final static int RoomUserTypingComposer = 3765;//3624
public final static int GuildJoinErrorComposer = 1551;//1952
public final static int RoomCategoriesComposer = 815;//3241
public final static int InventoryAchievementsComposer = 894;//3295
public final static int MarketplaceItemInfoComposer = 688;//1066
public final static int UserTagsComposer = 1578;//933
public final static int RoomRelativeMapComposer = 124;//1975
public final static int ModToolComposerTwo = 1761;//1917
public final static int ModToolComposerOne = 2621;//2303
public final static int RoomRightsComposer = 3358;//520
public final static int ObjectOnRollerComposer = 1294;//1488
public final static int PollStartComposer = 3353;//749
public final static int GuildRefreshMembersListComposer = 3650;//2055
public final static int UserPerksComposer = 2284;//1218
public final static int UserCitizinShipComposer = 2486;//3439
public final static int PublicRoomsComposer = 2433;//2506
public final static int MarketplaceOffersComposer = 3738;//3289
public final static int ModToolComposer = 3064;//1901
public final static int UserBadgesComposer = 820;//3486
public final static int GuildManageComposer = 1797;//601
public final static int RemoveFriendComposer = -1106;//1106
public final static int BannerTokenComposer = -3033;//3033
public final static int UserDataComposer = 2337;//3491
public final static int UserSearchResultComposer = 1542;//1573
public final static int ModToolUserRoomVisitsComposer = 2728;//2129
public final static int RoomUserRespectComposer = 2019;//2143
public final static int RoomChatSettingsComposer = 864;//3710
public final static int RemoveHabboItemComposer = 2192;//3233
public final static int RoomUserRemoveComposer = 2529;//2819
public final static int RoomHeightMapComposer = 3157;//1624
public final static int RoomPetHorseFigureComposer = 1312;//1644
public final static int PetErrorComposer = 1940;//779
public final static int TradeUpdateComposer = 77;//1221
public final static int PrivateRoomsComposer = 1251;//2653
public final static int RoomModelComposer = 617;//2297
public final static int RoomScoreComposer = 2925;//2805
public final static int DoorbellAddUserComposer = 3556;//3198
public final static int SecureLoginOKComposer = 294;//2753
public final static int SessionRightsComposer = 376;//1313
public final static int GuildMemberUpdateComposer = 3609;//862
public final static int RoomFloorItemsComposer = 2648;//2124
public final static int InventoryItemsComposer = 1927;//3029
public final static int RoomUserTalkComposer = 2735;//612
public final static int TradeStartComposer = 181;//3713
public final static int InventoryItemUpdateComposer = 369;//1577
public final static int ModToolIssueUpdateComposer = 2951;//3019
public final static int MeMenuSettingsComposer = 1362;//15
public final static int ModToolRoomInfoComposer = 84;//3722
public final static int GuildListComposer = 3445;//587
public final static int RecyclerLogicComposer = 3486;//1317
public final static int UserHomeRoomComposer = 1730;//40
public final static int RoomUserDanceComposer = 3848;//2091
public final static int RoomSettingsUpdatedComposer = 3128;//543
public final static int AlertPurchaseFailedComposer = 1860;//2602
public final static int RoomDataComposer = 3986;//3995
public final static int TagsComposer = 3149;//3487
public final static int InventoryRefreshComposer = 1276;//3243
public final static int RemovePetComposer = 3118;//467
public final static int RemoveWallItemComposer = -2466;//2466
public final static int TradeCompleteComposer = 418;//3766
public final static int NewsWidgetsComposer = 72;//1345
public final static int WiredEffectDataComposer = 1532;//1279
public final static int BubbleAlertComposer = 1950;//777
public final static int ReloadRecyclerComposer = 3918;//1093
public final static int MoodLightDataComposer = 1869;//2033
public final static int WiredRewardAlertComposer = 1603;//723
public final static int CatalogPageComposer = 2551;//3518
public final static int CatalogModeComposer = 1942;//3442
public final static int ChangeNameUpdatedComposer = 311;//542
public final static int AddFloorItemComposer = 1880;//1590
public final static int DebugConsoleComposer = 2718;//336
public final static int HallOfFameComposer = 92;//670
public final static int WiredSavedComposer = 2429;//39
public final static int RoomPaintComposer = 2205;//2979
public final static int MarketplaceConfigComposer = 2120;//2524
public final static int AddBotComposer = 254;//3043
public final static int FriendRequestErrorComposer = 3134;//2467
public final static int GuildMembersComposer = 1648;//3986
public final static int RoomOpenComposer = 2561;//925 //2561 1945??
public final static int ModToolRoomChatlogComposer = 3893;//3869
public final static int DiscountComposer = 1768;//1061
public final static int MarketplaceCancelSaleComposer = 2239;//1959
public final static int RoomPetRespectComposer = 3841;//778
public final static int RoomSettingsComposer = 2461;
public final static int TalentTrackComposer = 2912;//2842
public final static int CatalogPagesListComposer = 2353;//1684
public final static int AlertLimitedSoldOutComposer = 604;//3290
public final static int CatalogUpdatedComposer = 1311;//2028
public final static int PurchaseOKComposer = 1636;//1189
public final static int WallItemUpdateComposer = 3292;//2190
public final static int TradeAcceptedComposer = 2316;//741
public final static int AddWallItemComposer = 3887;//2156
public final static int ModToolRoomEntryInfoComposer = 2561;//2644
public final static int HotelViewDataComposer = 1579;//1374
public final static int PresentItemOpenedComposer = 3424;//1540
public final static int RoomUserRemoveRightsComposer = 3566;//1496
public final static int UserBCLimitsComposer = 1942;//3442
public final static int PetTrainingPanelComposer = 3760;//456
public final static int RoomPaneComposer = 2561;//2644
public final static int RedeemVoucherErrorComposer = 2571;//2630
public final static int RoomCreatedComposer = 3648;//3373
public final static int GenericAlertComposer = 3406;//1548
public final static int GroupPartsComposer = 1817;//567
public final static int ModToolIssueInfoComposer = 1848;//2473
public final static int RoomUserWhisperComposer = 1428;//2323
public final static int BotErrorComposer = 3932;//3420
public final static int FreezeLivesComposer = 1128;//3526
public final static int LoadFriendRequestsComposer = 1926;//2193
public final static int MarketplaceSellItemComposer = 1165;//1932
public final static int ClubDataComposer = 3753;//1919
public final static int ProfileFriendsComposer = 168;//322
public final static int MarketplaceOwnItemsComposer = 1181;//593
public final static int RoomOwnerComposer = 2146;//1069
public final static int WiredConditionDataComposer = 856;//1639
public final static int ModToolUserInfoComposer = 1557;//2583
public final static int UserWardrobeComposer = 773;//370
public final static int UserUpdateCurrencyComposer = 1245;//1290
public final static int RoomPetExperienceComposer = 2143;//717
public final static int FriendChatMessageComposer = 625;//2094
public final static int PetInformationComposer = 3752;//2286
public final static int RoomThicknessComposer = 299;//2627
public final static int AddPetComposer = 211;//3099
public final static int UpdateStackHeightComposer = 1350;//1576
public final static int RemoveBotComposer = 397;//2565
public final static int RoomEnterErrorComposer = 1754;//1619
public final static int PollQuestionsComposer = 1745;//3187
public final static int GenericErrorMessages = 3478;//2839
public final static int RoomWallItemsComposer = 3583;//395
public final static int RoomUserEffectComposer = 3863;//3040
public final static int PetBreedsComposer = 1433;//3302
public final static int ModToolIssueChatlogComposer = 610;//1445
public final static int RoomUserActionComposer = 2482;//12
public final static int BotSettingsComposer = 772;//1522
public final static int UserProfileComposer = 2023;//1503
public final static int MinimailCountComposer = 1162;//2253
public final static int UserAchievementScoreComposer = 2994;
public final static int PetLevelUpComposer = 2329;
public final static int UserPointsComposer = 1245;
public final static int ReportRoomFormComposer = 3216;
public final static int ModToolIssueHandledComposer = 2876;
public final static int FloodCounterComposer = 1774;
public final static int UpdateFailedComposer = 2612;
public final static int FloorPlanEditorDoorSettingsComposer = 1633;
public final static int FloorPlanEditorBlockedTilesComposer = 1874;
public final static int BuildersClubExpiredComposer = 108;
public final static int RoomSettingsSavedComposer = 0;*/
public final static int FavoriteRoomsCountComposer = 235;//3829 //Updated public final static int FavoriteRoomsCountComposer = 235;//3829 //Updated
public final static int UserCurrencyComposer = 3574;//3454 //Updated public final static int UserCurrencyComposer = 3574;//3454 //Updated
@ -834,9 +418,7 @@ public class Outgoing_1006
public final static int FriendFindingRoomComposer = 1037; //:test 1037 b:0 public final static int FriendFindingRoomComposer = 1037; //:test 1037 b:0
public final static int UnknownQuestComposer1 = 1010; public final static int UnknownQuestComposer1 = 1010;
/**
* Music Disks / Trax / Jukebox
*/
public final static int JukeBoxMySongsComposer = 2224; public final static int JukeBoxMySongsComposer = 2224;
public final static int JukeBoxNowPlayingMessageComposer = 2197; public final static int JukeBoxNowPlayingMessageComposer = 2197;
public final static int JukeBoxPlaylistFullComposer = 2732; public final static int JukeBoxPlaylistFullComposer = 2732;

View File

@ -3,449 +3,33 @@ package com.eu.habbo.messages.outgoing;
public class Outgoing_Back public class Outgoing_Back
{ {
/*
Talents
*/
//public static final int TalentTrackComposer = 2842; //public static final int TalentTrackComposer = 2842;
/*
Wired
*/
/*public static final int WiredTriggerDataComposer = 861;
public static final int WiredEffectDataComposer = 1279;
public static final int WiredConditionDataComposer = 1639;
public static final int WiredSavedComposer = 39;
/*
Pets
*/
/*public static final int PetInformationComposer = 2286;
public static final int RoomPetRespectComposer = 778;
public static final int RoomPetExperienceComposer = 717;
public static final int PetTrainingPanelComposer = 456;
public static final int RoomPetHorseFigureComposer = 1644;
/*
Groups
*/
/*public static final int GuildBuyRoomsComposer = 3938;
public static final int GroupPartsComposer = 567;
public static final int GuildBoughtComposer = 389;
public static final int GuildInfoComposer = 2978;
public static final int GuildManageComposer = 601;
public static final int GuildMembersComposer = 3986;
public static final int GuildJoinErrorComposer = 1952;
public static final int GuildRefreshMembersListComposer = 2055;
public static final int GuildMemberUpdateComposer = 862;
public static final int GuildListComposer = 587;
public static final int GuildFurniWidgetComposer = 269;
/*
Trading
*/
/*public static final int TradeUpdateComposer = 1221;
public static final int TradeStartComposer = 3713;
public static final int TradeStartFailComposer = 2320;
public static final int TradeCompleteComposer = 3766;
public static final int TradeCloseWindowComposer = 2000;
public static final int TradeStoppedComposer = 2020;
public static final int TradeAcceptedComposer = 741;
/*
ModTool
*/
/*public static final int ModToolComposer = 1901;
public static final int ModToolRoomInfoComposer = 3722;
public static final int ModToolRoomChatlogComposer = 3869;
public static final int ModToolRoomEntryInfoComposer = 2644;
public static final int ModToolUserInfoComposer = 2583;
public static final int ModToolUserChatlogComposer = 3738;
public static final int ModToolUserRoomVisitsComposer = 2129;
public static final int ModToolIssueInfoComposer = 2473;
public static final int ModToolIssueChatlogComposer = 1445;
public static final int ModToolIssueUpdateComposer = 3019;
public static final int ModToolComposerOne = 2303;
public static final int ModToolComposerTwo = 1917;
/*
Catalog
*/
/*public static final int GiftConfigurationComposer = 1048;
public static final int DiscountComposer = 1061;
public static final int MarketplaceConfigComposer = 2524;
public static final int CatalogUpdatedComposer = 2028;
public static final int CatalogModeComposer = 3442;
public static final int CatalogPagesListComposer = 1684;
public static final int CatalogPageComposer = 3518;
public static final int PurchaseOKComposer = 1189;
public static final int RecyclerLogicComposer = 1317;
public static final int ReloadRecyclerComposer = 1093;
public static final int RecyclerCompleteComposer = 2125;
public static final int ClubDataComposer = 1919;
public static final int MarketplaceOwnItemsComposer = 593;
public static final int MarketplaceCancelSaleComposer = 1959;
public static final int MarketplaceOffersComposer = 3289;
public static final int MarketplaceItemInfoComposer = 1066;
public static final int MarketplaceBuyErrorComposer = 1823;
public static final int MarketplaceSellItemComposer = 1932;
public static final int PetBreedsComposer = 3302;
public static final int PetNameErrorComposer = 3575;
/*
Alerts (All of them)
*/
/*public static final int AlertLimitedSoldOutComposer = 3290;
public static final int AlertPurchaseFailedComposer = 2602;
public static final int RedeemVoucherOKComposer = 2719;
public static final int RedeemVoucherErrorComposer = 2630;
public static final int RoomEnterErrorComposer = 1619;
public static final int WiredRewardAlertComposer = 723;
public static final int PetErrorComposer = 779;
public static final int BotErrorComposer = 3420;
public static final int BubbleAlertComposer = 777;
public static final int GenericErrorMessages = 2839;
/*
Handshake
*/
/*public static final int BannerTokenComposer = 3033;
public static final int SecureLoginOKComposer = 2753;
public static final int SessionRightsComposer = 1313;
public static final int DebugConsoleComposer = 336;
/*
HotelView
*/
/* public static final int HotelViewComposer = 3152;
public static final int HallOfFameComposer = 670;
public static final int NewsWidgetsComposer = 1345;
public static final int BonusRareComposer = 3517;
public static final int HotelViewDataComposer = 1374;
/*
Generic
*/
/* public static final int GenericAlertComposer = 1548;
public static final int MinimailCountComposer = 2253;
public static final int FavoriteRoomsCountComposer = 3829;
/*
Polls
*/
//public static final int PollStartComposer = 749; //public static final int PollStartComposer = 749;
//public static final int PollQuestionsComposer = 3187; //public static final int PollQuestionsComposer = 3187;
/*
Friends
*/
/*public static final int FriendsComposer = 2067;
public static final int UpdateFriendComposer = 170;
public static final int UserSearchResultComposer = 1573;
public static final int FriendRequestComposer = 2468;
public static final int RemoveFriendComposer = 1106;
public static final int FriendChatMessageComposer = 2094;
public static final int LoadFriendRequestsComposer = 2193;
public static final int FriendRequestErrorComposer = 2467;
public static final int StalkErrorComposer = 1135;
/*
Inventory
*/
/*public static final int InventoryItemsComposer = 3029;
public static final int InventoryPetsComposer = 435;
public static final int InventoryBotsComposer = 320;
public static final int InventoryBadgesComposer = 1629;
public static final int AddHabboItemComposer = 274;
public static final int AddBotComposer = 3043;
public static final int RemoveBotComposer = 2565;
public static final int RemoveHabboItemComposer = 3233;
public static final int InventoryRefreshComposer = 3243;
public static final int InventoryItemUpdateComposer = 1577;
public static final int AddPetComposer = 3099;
public static final int RemovePetComposer = 467;
public static final int InventoryAchievementsComposer = 3295;
/*
Navigator
*/
/*public static final int RoomCategoriesComposer = 3241;
public static final int PublicRoomsComposer = 2506;
public static final int PrivateRoomsComposer = 2653;
public static final int CanCreateRoomComposer = 2463;
public static final int RoomCreatedComposer = 3373;
public static final int TagsComposer = 3487;
/*
Rooms
*/
/*public static final int RoomPaintComposer = 2979;
public static final int RoomRightsComposer = 520;
public static final int RoomOwnerComposer = 1069;
public static final int RoomScoreComposer = 2805;
public static final int RoomDataComposer = 3995;
public static final int RoomHeightMapComposer = 1624;
public static final int RoomUsersComposer = 1073;
public static final int RoomThicknessComposer = 2627;
public static final int RoomOpenComposer = 925;
public static final int RoomModelComposer = 2297;
public static final int RoomRelativeMapComposer = 1975;
public static final int RoomPaneComposer = 2644;
public static final int RoomFloorItemsComposer = 2124;
public static final int RoomWallItemsComposer = 395;
public static final int RoomUserTalkComposer = 612;
public static final int RoomUserShoutComposer = 3271;
public static final int RoomUserWhisperComposer = 2323;
public static final int RoomUserActionComposer = 12;
public static final int RoomUserRespectComposer = 2143;
public static final int RoomUserDanceComposer = 2091;
public static final int RoomUserEffectComposer = 3040;
public static final int RoomUserStatusComposer = 3386;
public static final int RoomUserRemoveComposer = 2819;
public static final int AddWallItemComposer = 2156;
public static final int AddFloorItemComposer = 1590;
public static final int RemoveWallItemComposer = 2466;
public static final int RemoveFloorItemComposer = 36;
public static final int FloorItemUpdateComposer = 648;
public static final int UpdateStackHeightComposer = 1576;
public static final int RoomUserTypingComposer = 3624;
public static final int WallItemUpdateComposer = 2190;
public static final int RoomUserHandItemComposer = 3664;
public static final int RoomUserRemoveRightsComposer = 1496;
public static final int RoomRightsListComposer = 1891;
public static final int RoomAddRightsListComposer = 3611;
public static final int ChangeNameUpdatedComposer = 542;
public static final int BotSettingsComposer = 1522;
public static final int RoomSettingsUpdatedComposer = 543;
public static final int RoomChatSettingsComposer = 3710;
public static final int DoorbellAddUserComposer = 3198;
public static final int RoomAccessDeniedComposer = 3953;
public static final int MoodLightDataComposer = 2033;
public static final int ObjectOnRollerComposer = 1488;
public static final int PresentItemOpenedComposer = 1540;
public static final int FreezeLivesComposer = 3526;
/*
Users
*/
/*public static final int UserBCLimitsComposer = 3442;
public static final int UserCurrencyComposer = 3454;
public static final int UserDataComposer = 3491;
public static final int UserPerksComposer = 1218;
public static final int UserPermissionsComposer = 3872;
public static final int UserCreditsComposer = 2204;
public static final int UserClubComposer = 2869;
public static final int MeMenuSettingsComposer = 15;
public static final int UserCitizinShipComposer = 3439;
public static final int UserTagsComposer = 933;
public static final int UserHomeRoomComposer = 40;
public static final int UserProfileComposer = 1503;
public static final int ProfileFriendsComposer = 322;
public static final int UserUpdateCurrencyComposer = 1290;
public static final int UserWardrobeComposer = 370;
public static final int RoomUserDataComposer = 3944;
public static final int UserBadgesComposer = 3486;
public static final int AddUserBadgeComposer = 3197;
/*
Ones that are someway implemented but not correctly.
*/
public static final int PetStatusUpdateComposer = 3566; //Updated public static final int PetStatusUpdateComposer = 3566; //Updated
/*
Not implemented but know what they are:
*/
/*public static final int UserAddEffectComposer = 2181; //int, int, int (type, ?? (effectId?), duration
public final static int FavoriteRoomsCountComposer = 2420;//3829
public final static int UserCurrencyComposer = 584;//3454
public final static int RedeemVoucherOKComposer = 2136;//2719
public final static int RoomUserShoutComposer = 3274;//3271
public final static int RoomUserStatusComposer = 2566;//3386
public final static int RoomUserDataComposer = 2538;//3944
public final static int RoomAddRightsListComposer = 1992;//3611
public final static int RoomRemoveRightsListComposer = 2021;
public final static int RoomRightsListComposer = 2857;//1891
public final static int RoomUserHandItemComposer = 2425;//3664
public final static int RoomUsersComposer = 961;//1073
public final static int FriendRequestComposer = 3550;//2468
public final static int GuildBoughtComposer = 2087;//389
public final static int AddUserBadgeComposer = 10;//3197
public final static int RecyclerCompleteComposer = 1513;//2125
public final static int GuildBuyRoomsComposer = 3938;//3938
public final static int FriendsComposer = 1535;//2067
public final static int StalkErrorComposer = 1739;//1135
public final static int TradeCloseWindowComposer = 3545;//2000
public final static int RemoveFloorItemComposer = 679;//36
public final static int InventoryPetsComposer = 2799;//435
public final static int UserCreditsComposer = 689;//2204
public final static int WiredTriggerDataComposer = 3639;//861
public final static int TradeStoppedComposer = 1941;//2020
public final static int ModToolUserChatlogComposer = 912;//3738
public final static int GuildInfoComposer = 3398;//2978
public final static int UserPermissionsComposer = 3514;//3872
public final static int PetNameErrorComposer = 2773;//3575
public final static int TradeStartFailComposer = 796;//2320
public final static int AddHabboItemComposer = 828;//274
public final static int InventoryBotsComposer = 3908;//320
public final static int CanCreateRoomComposer = 1458;//2463
public final static int MarketplaceBuyErrorComposer = 3313;//1823
public final static int BonusRareComposer = 2194;//3517
public final static int HotelViewComposer = 2553;//3152
public final static int UpdateFriendComposer = 2605;//170 //2605
public final static int FloorItemUpdateComposer = 1334;//648
public final static int RoomAccessDeniedComposer = 1504;//3953
public final static int GuildFurniWidgetComposer = 2909;//269
public final static int GiftConfigurationComposer = 1965;//1048
public final static int UserClubComposer = 3926;//2869
public final static int InventoryBadgesComposer = 79;//1629
public final static int RoomUserTypingComposer = 3765;//3624
public final static int GuildJoinErrorComposer = 1551;//1952
public final static int RoomCategoriesComposer = 815;//3241
public final static int InventoryAchievementsComposer = 894;//3295
public final static int MarketplaceItemInfoComposer = 688;//1066
public final static int UserTagsComposer = 1578;//933
public final static int RoomRelativeMapComposer = 124;//1975
public final static int ModToolComposerTwo = 1761;//1917
public final static int ModToolComposerOne = 2621;//2303
public final static int RoomRightsComposer = 3358;//520
public final static int ObjectOnRollerComposer = 1294;//1488
public final static int PollStartComposer = 3353;//749
public final static int GuildRefreshMembersListComposer = 3650;//2055
public final static int UserPerksComposer = 2284;//1218
public final static int UserCitizinShipComposer = 2486;//3439
public final static int PublicRoomsComposer = 2433;//2506
public final static int MarketplaceOffersComposer = 3738;//3289
public final static int ModToolComposer = 3064;//1901
public final static int UserBadgesComposer = 820;//3486
public final static int GuildManageComposer = 1797;//601
public final static int RemoveFriendComposer = -1106;//1106
public final static int BannerTokenComposer = -3033;//3033
public final static int UserDataComposer = 2337;//3491
public final static int UserSearchResultComposer = 1542;//1573
public final static int ModToolUserRoomVisitsComposer = 2728;//2129
public final static int RoomUserRespectComposer = 2019;//2143
public final static int RoomChatSettingsComposer = 864;//3710
public final static int RemoveHabboItemComposer = 2192;//3233
public final static int RoomUserRemoveComposer = 2529;//2819
public final static int RoomHeightMapComposer = 3157;//1624
public final static int RoomPetHorseFigureComposer = 1312;//1644
public final static int PetErrorComposer = 1940;//779
public final static int TradeUpdateComposer = 77;//1221
public final static int PrivateRoomsComposer = 1251;//2653
public final static int RoomModelComposer = 617;//2297
public final static int RoomScoreComposer = 2925;//2805
public final static int DoorbellAddUserComposer = 3556;//3198
public final static int SecureLoginOKComposer = 294;//2753
public final static int SessionRightsComposer = 376;//1313
public final static int GuildMemberUpdateComposer = 3609;//862
public final static int RoomFloorItemsComposer = 2648;//2124
public final static int InventoryItemsComposer = 1927;//3029
public final static int RoomUserTalkComposer = 2735;//612
public final static int TradeStartComposer = 181;//3713
public final static int InventoryItemUpdateComposer = 369;//1577
public final static int ModToolIssueUpdateComposer = 2951;//3019
public final static int MeMenuSettingsComposer = 1362;//15
public final static int ModToolRoomInfoComposer = 84;//3722
public final static int GuildListComposer = 3445;//587
public final static int RecyclerLogicComposer = 3486;//1317
public final static int UserHomeRoomComposer = 1730;//40
public final static int RoomUserDanceComposer = 3848;//2091
public final static int RoomSettingsUpdatedComposer = 3128;//543
public final static int AlertPurchaseFailedComposer = 1860;//2602
public final static int RoomDataComposer = 3986;//3995
public final static int TagsComposer = 3149;//3487
public final static int InventoryRefreshComposer = 1276;//3243
public final static int RemovePetComposer = 3118;//467
public final static int RemoveWallItemComposer = -2466;//2466
public final static int TradeCompleteComposer = 418;//3766
public final static int NewsWidgetsComposer = 72;//1345
public final static int WiredEffectDataComposer = 1532;//1279
public final static int BubbleAlertComposer = 1950;//777
public final static int ReloadRecyclerComposer = 3918;//1093
public final static int MoodLightDataComposer = 1869;//2033
public final static int WiredRewardAlertComposer = 1603;//723
public final static int CatalogPageComposer = 2551;//3518
public final static int CatalogModeComposer = 1942;//3442
public final static int ChangeNameUpdatedComposer = 311;//542
public final static int AddFloorItemComposer = 1880;//1590
public final static int DebugConsoleComposer = 2718;//336
public final static int HallOfFameComposer = 92;//670
public final static int WiredSavedComposer = 2429;//39
public final static int RoomPaintComposer = 2205;//2979
public final static int MarketplaceConfigComposer = 2120;//2524
public final static int AddBotComposer = 254;//3043
public final static int FriendRequestErrorComposer = 3134;//2467
public final static int GuildMembersComposer = 1648;//3986
public final static int RoomOpenComposer = 2561;//925 //2561 1945??
public final static int ModToolRoomChatlogComposer = 3893;//3869
public final static int DiscountComposer = 1768;//1061
public final static int MarketplaceCancelSaleComposer = 2239;//1959
public final static int RoomPetRespectComposer = 3841;//778
public final static int RoomSettingsComposer = 2461;
public final static int TalentTrackComposer = 2912;//2842
public final static int CatalogPagesListComposer = 2353;//1684
public final static int AlertLimitedSoldOutComposer = 604;//3290
public final static int CatalogUpdatedComposer = 1311;//2028
public final static int PurchaseOKComposer = 1636;//1189
public final static int WallItemUpdateComposer = 3292;//2190
public final static int TradeAcceptedComposer = 2316;//741
public final static int AddWallItemComposer = 3887;//2156
public final static int ModToolRoomEntryInfoComposer = 2561;//2644
public final static int HotelViewDataComposer = 1579;//1374
public final static int PresentItemOpenedComposer = 3424;//1540
public final static int RoomUserRemoveRightsComposer = 3566;//1496
public final static int UserBCLimitsComposer = 1942;//3442
public final static int PetTrainingPanelComposer = 3760;//456
public final static int RoomPaneComposer = 2561;//2644
public final static int RedeemVoucherErrorComposer = 2571;//2630
public final static int RoomCreatedComposer = 3648;//3373
public final static int GenericAlertComposer = 3406;//1548
public final static int GroupPartsComposer = 1817;//567
public final static int ModToolIssueInfoComposer = 1848;//2473
public final static int RoomUserWhisperComposer = 1428;//2323
public final static int BotErrorComposer = 3932;//3420
public final static int FreezeLivesComposer = 1128;//3526
public final static int LoadFriendRequestsComposer = 1926;//2193
public final static int MarketplaceSellItemComposer = 1165;//1932
public final static int ClubDataComposer = 3753;//1919
public final static int ProfileFriendsComposer = 168;//322
public final static int MarketplaceOwnItemsComposer = 1181;//593
public final static int RoomOwnerComposer = 2146;//1069
public final static int WiredConditionDataComposer = 856;//1639
public final static int ModToolUserInfoComposer = 1557;//2583
public final static int UserWardrobeComposer = 773;//370
public final static int UserUpdateCurrencyComposer = 1245;//1290
public final static int RoomPetExperienceComposer = 2143;//717
public final static int FriendChatMessageComposer = 625;//2094
public final static int PetInformationComposer = 3752;//2286
public final static int RoomThicknessComposer = 299;//2627
public final static int AddPetComposer = 211;//3099
public final static int UpdateStackHeightComposer = 1350;//1576
public final static int RemoveBotComposer = 397;//2565
public final static int RoomEnterErrorComposer = 1754;//1619
public final static int PollQuestionsComposer = 1745;//3187
public final static int GenericErrorMessages = 3478;//2839
public final static int RoomWallItemsComposer = 3583;//395
public final static int RoomUserEffectComposer = 3863;//3040
public final static int PetBreedsComposer = 1433;//3302
public final static int ModToolIssueChatlogComposer = 610;//1445
public final static int RoomUserActionComposer = 2482;//12
public final static int BotSettingsComposer = 772;//1522
public final static int UserProfileComposer = 2023;//1503
public final static int MinimailCountComposer = 1162;//2253
public final static int UserAchievementScoreComposer = 2994;
public final static int PetLevelUpComposer = 2329;
public final static int UserPointsComposer = 1245;
public final static int ReportRoomFormComposer = 3216;
public final static int ModToolIssueHandledComposer = 2876;
public final static int FloodCounterComposer = 1774;
public final static int UpdateFailedComposer = 2612;
public final static int FloorPlanEditorDoorSettingsComposer = 1633;
public final static int FloorPlanEditorBlockedTilesComposer = 1874;
public final static int BuildersClubExpiredComposer = 108;
public final static int RoomSettingsSavedComposer = 0;*/
public final static int FavoriteRoomsCountComposer = 235;//3829 //Updated public final static int FavoriteRoomsCountComposer = 235;//3829 //Updated
public final static int UserCurrencyComposer = 3574;//3454 //Updated public final static int UserCurrencyComposer = 3574;//3454 //Updated
@ -743,7 +327,7 @@ public class Outgoing_Back
public final static int OpenRoomCreationWindowComposer = 497; //:test 497 public final static int OpenRoomCreationWindowComposer = 497; //:test 497
public final static int ItemsDataUpdateComposer = 466; public final static int ItemsDataUpdateComposer = 466;
public final static int WelcomeGiftComposer = 445; //:test 445 s:derp@derp.com b:0 b:1 i:230 b:1 public final static int WelcomeGiftComposer = 445; //:test 445 s:derp@derp.com b:0 b:1 i:230 b:1
/* TODO: */ public final static int SimplePollStartComposer = 3047; //:test 3047 s:a i:10 i:20 i:10000 i:1 i:1 i:3 s:abcdefghijklmnopqrstuvwxyz12345678901234? i:1 s:a s:b public final static int SimplePollStartComposer = 3047; //:test 3047 s:a i:10 i:20 i:10000 i:1 i:1 i:3 s:abcdefghijklmnopqrstuvwxyz12345678901234? i:1 s:a s:b
public final static int RoomNoRightsComposer = 3929; //Removes also the 'use' button. :D public final static int RoomNoRightsComposer = 3929; //Removes also the 'use' button. :D
public final static int GuildEditFailComposer = 3918; public final static int GuildEditFailComposer = 3918;
public final static int MinimailNewMessageComposer = 3903; public final static int MinimailNewMessageComposer = 3903;
@ -837,9 +421,7 @@ public class Outgoing_Back
public final static int UnknownQuestComposer1 = 1010; public final static int UnknownQuestComposer1 = 1010;
/**
* Music Disks / Trax / Jukebox
*/
public final static int JukeBoxMySongsComposer = 2224; public final static int JukeBoxMySongsComposer = 2224;
public final static int JukeBoxNowPlayingMessageComposer = 2197; public final static int JukeBoxNowPlayingMessageComposer = 2197;
public final static int JukeBoxPlaylistFullComposer = 2732; public final static int JukeBoxPlaylistFullComposer = 2732;

View File

@ -11,15 +11,7 @@ public class TestComposer extends MessageComposer
this.response.init(3662); this.response.init(3662);
this.response.appendBoolean(true); this.response.appendBoolean(true);
this.response.appendString("LOL"); this.response.appendString("LOL");
/*
this.response.init(3269);
this.response.appendString("cannon.png");
this.response.appendInt(2);
this.response.appendString("title");
this.response.appendString("${notification.room.kick.cannonball.title}");
this.response.appendString("message");
this.response.appendString("${notification.room.kick.cannonball.message}");
*/
return this.response; return this.response;
} }

View File

@ -18,10 +18,7 @@ public class UpdateFriendComposer extends MessageComposer
this.buddy = buddy; this.buddy = buddy;
} }
/**
* Updates the staff chat so the look matches the user. Does not do any other stuff.
* @param habbo
*/
public UpdateFriendComposer(Habbo habbo) public UpdateFriendComposer(Habbo habbo)
{ {
this.habbo = habbo; this.habbo = habbo;

Some files were not shown because too many files have changed in this diff Show More